[JBoss Seam] - Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?
by bsmithjj
is this dependency no longer sufficient?
| <dependency>
| <groupId>org.testng</groupId>
| <artifactId>testng</artifactId>
| <version>4.7</version>
| <scope>test</scope>
| <classifier>jdk15</classifier>
| </dependency>
|
here is the test I am working with at the moment:
| public class BootStrapTest extends SeamTest {
|
| @Test
| public void test_persistenceMappingsGuud() throws Exception {
|
| new ComponentTest() {
|
| protected void testComponents() throws Exception {
| init();
| begin();
| EntityManager entityManager = (EntityManager) getInstance("entityManager");
| assert entityManager != null;
| List<Type> types = entityManager.createQuery(
| "from Type t"
| ).getResultList();
| assert types != null;
| assert types.size() > 0;
| }
|
| }.run();
|
| }
| }
|
I just want to be sure the container is booted and my entity model is 'correct' before other tests fire, but right now I am stuck with just trying to boot the container.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099940#4099940
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099940
18Â years, 6Â months
[JNDI/Naming/Network] - Re: ClassCastException on PortableRemoteObject.narrow(object
by lavkul
I have created a new project and did a fresh deployment such that there is only one ejb project deployed but still problem is same.
I am attaching the logs again
[cmd /c D:\jboss-4.2.1.GA\bin\run.bat -c all
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: D:\jboss-4.2.1.GA
JAVA: D:\Program Files\Java\jdk1.5.0_06\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
CLASSPATH: D:\Program Files\Java\jdk1.5.0_06\lib\tools.jar;D:\jboss-4.2.1.GA\bin\run.jar
===============================================================================
22:46:05,811 INFO [Server] Starting JBoss (MX MicroKernel)...
22:46:05,811 INFO [Server] Release ID: JBoss [Trinity] 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)
22:46:05,811 INFO [Server] Home Dir: D:\jboss-4.2.1.GA
22:46:05,811 INFO [Server] Home URL: file:/D:/jboss-4.2.1.GA/
22:46:05,811 INFO [Server] Patch URL: null
22:46:05,811 INFO [Server] Server Name: all
22:46:05,811 INFO [Server] Server Home Dir: D:\jboss-4.2.1.GA\server\all
22:46:05,826 INFO [Server] Server Home URL: file:/D:/jboss-4.2.1.GA/server/all/
22:46:05,826 INFO [Server] Server Log Dir: D:\jboss-4.2.1.GA\server\all\log
22:46:05,826 INFO [Server] Server Temp Dir: D:\jboss-4.2.1.GA\server\all\tmp
22:46:05,826 INFO [Server] Root Deployment Filename: jboss-service.xml
22:46:06,467 INFO [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
22:46:06,467 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_06-b05,Sun Microsystems Inc.
22:46:06,467 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
22:46:08,029 INFO [Server] Core system initialized
22:46:16,108 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
22:46:16,123 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
22:46:18,920 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
22:46:18,920 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
22:46:19,936 INFO [TransactionManagerService] Starting recovery manager
22:46:20,123 INFO [TransactionManagerService] Recovery manager started
22:46:20,123 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
22:46:28,842 INFO [EJB3Deployer] Starting java:comp multiplexer
22:46:30,764 INFO [InterceptorChainFactory] interceptor chain is:
class org.jboss.cache.interceptors.CallInterceptor
class org.jboss.cache.interceptors.PessimisticLockInterceptor
class org.jboss.cache.interceptors.UnlockInterceptor
class org.jboss.cache.interceptors.ReplicationInterceptor
class org.jboss.cache.interceptors.TxInterceptor
class org.jboss.cache.interceptors.CacheMgmtInterceptor
22:46:31,576 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 192.168.1.3:1884
-------------------------------------------------------
22:46:33,608 INFO [TreeCache] viewAccepted(): [192.168.1.3:1884|0] [192.168.1.3:1884]
22:46:33,639 INFO [TreeCache] TreeCache local address is 192.168.1.3:1884
22:46:33,639 INFO [TreeCache] State could not be retrieved (we are the first member in group)
22:46:33,639 INFO [TreeCache] parseConfig(): PojoCacheConfig is empty
22:46:36,639 INFO [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
22:46:40,264 INFO [SnmpAgentService] SNMP agent going active
22:46:42,404 INFO [DefaultPartition] Initializing
22:46:42,514 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 192.168.1.3:1890
-------------------------------------------------------
22:46:44,529 INFO [DefaultPartition] Number of cluster members: 1
22:46:44,529 INFO [DefaultPartition] Other members: 0
22:46:44,529 INFO [DefaultPartition] Fetching state (will wait for 30000 milliseconds):
22:46:44,529 INFO [DefaultPartition] State could not be retrieved (we are the first member in group)
22:46:44,608 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=/127.0.0.1
22:46:44,670 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /127.0.0.1:1102, group=230.0.0.4, HA-JNDI address=127.0.0.1:1100
22:46:47,061 INFO [TreeCache] No transaction manager lookup class has been defined. Transactions cannot be used
22:46:47,201 INFO [InterceptorChainFactory] interceptor chain is:
class org.jboss.cache.interceptors.CallInterceptor
class org.jboss.cache.interceptors.EvictionInterceptor
class org.jboss.cache.interceptors.PessimisticLockInterceptor
class org.jboss.cache.interceptors.PassivationInterceptor
class org.jboss.cache.interceptors.ActivationInterceptor
class org.jboss.cache.interceptors.UnlockInterceptor
class org.jboss.cache.interceptors.ReplicationInterceptor
class org.jboss.cache.interceptors.TxInterceptor
class org.jboss.cache.interceptors.CacheMgmtInterceptor
22:46:47,248 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 192.168.1.3:1896
-------------------------------------------------------
22:46:49,264 INFO [TreeCache] viewAccepted(): [192.168.1.3:1896|0] [192.168.1.3:1896]
22:46:49,264 INFO [TreeCache] TreeCache local address is 192.168.1.3:1896
22:46:49,373 INFO [InterceptorChainFactory] interceptor chain is:
class org.jboss.cache.interceptors.CallInterceptor
class org.jboss.cache.interceptors.EvictionInterceptor
class org.jboss.cache.interceptors.PessimisticLockInterceptor
class org.jboss.cache.interceptors.UnlockInterceptor
class org.jboss.cache.interceptors.ReplicationInterceptor
class org.jboss.cache.interceptors.TxInterceptor
class org.jboss.cache.interceptors.CacheMgmtInterceptor
22:46:49,436 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 192.168.1.3:1901
-------------------------------------------------------
22:46:51,889 INFO [TreeCache] viewAccepted(): [192.168.1.3:1901|0] [192.168.1.3:1901]
22:46:51,889 INFO [TreeCache] TreeCache local address is 192.168.1.3:1901
22:46:53,576 INFO [CorbaNamingService] Naming: [IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E3000000000000200000000000000E4000102000000000A3132372E302E302E31000DC8000000114A426F73732F4E616D696E672F726F6F74000000000000050000000000000008000000004A414300000000010000001C000000000001000100000001050100010001010900000001050100010000002100000060000000000000000100000000000000240000001E0000007E00000000000000010000000C3139322E3136382E312E33000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
22:46:53,717 INFO [CorbaTransactionService] TransactionFactory: [IOR:000000000000003049444C3A6F72672F6A626F73732F746D2F69696F702F5472616E73616374696F6E466163746F72794578743A312E30000000000200000000000000E4000102000000000A3132372E302E302E31000DC8000000144A426F73732F5472616E73616374696F6E732F46000000050000000000000008000000004A414300000000010000001C000000000001000100000001050100010001010900000001050100010000002100000060000000000000000100000000000000240000001E0000007E00000000000000010000000C3139322E3136382E312E33000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
22:46:55,936 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jdk1.5.0_06\bin;.;D:\WINDOWS\System32;D:\WINDOWS;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS\System32\Wbem;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS\System32\Wbem;D:\GlassFish\glassfish\bin;C:\orawin95\bin
22:46:57,358 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
22:46:57,358 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
22:46:57,358 INFO [Catalina] Initialization processed in 1786 ms
22:46:57,358 INFO [StandardService] Starting service jboss.web
22:46:57,358 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
22:46:57,873 INFO [Catalina] Server startup in 524 ms
22:46:58,139 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
22:47:00,123 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/httpha-invoker.sar/invoker.war/
22:47:00,748 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp61882jbossws-context-exp.war/
22:47:01,779 INFO [TomcatDeployer] deploy, ctxPath=/juddi, warUrl=.../deploy/juddi-service.sar/juddi.war/
22:47:02,983 INFO [RegistryServlet] Loading jUDDI configuration.
22:47:02,983 INFO [RegistryServlet] Resources loaded from: /WEB-INF/juddi.properties
22:47:02,983 INFO [RegistryServlet] Initializing jUDDI components.
22:47:04,029 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy-hasingleton/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
22:47:05,248 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
22:47:07,248 INFO [MailService] Mail Service bound to java:/Mail
22:47:08,295 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
22:47:08,389 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
22:47:08,451 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
22:47:08,529 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
22:47:08,842 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
22:47:08,920 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
22:47:08,936 INFO [QuartzResourceAdapter] start quartz!!!
22:47:09,029 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
22:47:09,076 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
22:47:09,076 INFO [RAMJobStore] RAMJobStore initialized.
22:47:09,076 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
22:47:09,076 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
22:47:09,076 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
22:47:11,920 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
22:47:12,904 INFO [A] Bound to JNDI name: queue/A
22:47:12,904 INFO [B] Bound to JNDI name: queue/B
22:47:12,904 INFO [C] Bound to JNDI name: queue/C
22:47:12,904 INFO [D] Bound to JNDI name: queue/D
22:47:12,904 INFO [ex] Bound to JNDI name: queue/ex
22:47:12,951 INFO [testTopic] Bound to JNDI name: topic/testTopic
22:47:12,951 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
22:47:12,951 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
22:47:12,951 INFO [testQueue] Bound to JNDI name: queue/testQueue
22:47:13,014 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
22:47:13,092 INFO [DLQ] Bound to JNDI name: queue/DLQ
22:47:13,920 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
22:47:13,983 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
22:47:15,123 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
22:47:15,248 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
22:47:15,264 INFO [Server] JBoss (MX MicroKernel) [4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)] Started in 1m:9s:438ms
Connected to server
[2007-10-29 10:47:15,467] Module app: Module is being deployed, please wait...
22:47:15,483 INFO [EARDeployer] Init J2EE application: file:/D:/Documents%20and%20Settings/Lave/IdeaProjects/AjaxProject/app/app.ear
22:47:18,733 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
22:47:18,764 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=app.ear,jar=EJB3.jar,name=loggerEJB,service=EJB3 with dependencies:
22:47:19,076 INFO [EJBContainer] STARTED EJB: sample.loggerBean ejbName: loggerEJB
22:47:19,139 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
22:47:19,139 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=app.ear,jar=EJB3.jar,name=NewEJBEJB,service=EJB3 with dependencies:
22:47:19,186 INFO [EJBContainer] STARTED EJB: com.NewEJBBean ejbName: NewEJBEJB
22:47:19,342 INFO [EJB3Deployer] Deployed: file:/D:/jboss-4.2.1.GA/server/all/tmp/deploy/tmp61923app.ear-contents/EJB3.jar
22:47:19,358 INFO [TomcatDeployer] deploy, ctxPath=/web, warUrl=.../tmp/deploy/tmp61923app.ear-contents/web-exp.war/
22:47:19,373 WARN [EjbUtil] Can't locate deploymentInfo for target: file:/D:/jboss-4.2.1.GA/server/all/tmp/deploy/EJB3.jar
22:47:19,654 INFO [EARDeployer] Started J2EE application: file:/D:/Documents%20and%20Settings/Lave/IdeaProjects/AjaxProject/app/app.ear
[2007-10-29 10:47:19,654] Module app: Module is deployed successfully
22:47:52,858 INFO [STDOUT] ejbservlet: Before look up
22:47:52,858 ERROR [[ejbservlet]] Servlet.service() for servlet ejbservlet threw exception
java.lang.ClassCastException
at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at newejb.ejbservlet.doGet(ejbservlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: $Proxy81
at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:212)
... 22 more
]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099937#4099937
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099937
18Â years, 6Â months
[JBoss Seam] - Custom validator disables hibernate default validator
by dapeng
Hi,
on one column (property) of my entity, a unique constraint needs to be defined. To avoiding a duplication of this property, I implemented a custom validator method to check the uniqueness. So far it works fine. But I found out, that the default hibernate validator doesn't work anymore (have got a @Length (max=11) annotation on the same property), as soon as the validator binding is added to the component, though the text field is put inside a validateAll tag.
<h:inputText id="vinPrefix" value="#{entity.vinPrefix}" required="true" label="#{masterDataMsgs['vingroup.edit.label.name']}" styleClass="text" rendered="#{entity.transient}" validator="#{vinGroupEditAction.checkVinPrefix}">
| <a4j:support event="onblur" reRender="vinPrefixDecorate" />
| </h:inputText>
|
After checking the source code, I found the following line in the method addValidators of ValidateAllRendererBase.java.
if ( evh.getValidators().length==0 && evh.getValidators().length == 0 )
| {
| evh.addValidator( new ModelValidator() );
| }
First of all, I don't understand, why you check the same condition twice. Second, I have no clue, why you only add the ModelValidator, if here is no other validator. I would exactly like to combine the hibernate validator with my custom one.
Any explanation is appreciated
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099934#4099934
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099934
18Â years, 6Â months
[JBoss Seam] - itext pdf in Firefox
by vlaugier
Hi,
I have a trouble visualizing pdfs with firefox
even when I use :
| <pdf:documentStore useExtensions="true" />
|
Firefox takes me to a page with the following source code
| <?xml version='1.0' encoding='UTF-8' ?>
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
| <html><head><meta http-equiv="Refresh" content="0; URL=ticket.pdf?docId=1&cid=9&clr=true" /></head><body></body></html>
|
I guess this is because I do not manage to use the useExtensions="true" property well
This pdf page is called from a button that triggers a method that loads some parameters before it redirects to the pdf page.
Here is the calling snipet from the web page :
|
| <h:dataTable value="#{client.serviceOrders}" var="so" rendered="#{not empty client.serviceOrders}">
|
|
| <h:column >
| <c:facet name="header">Identifiant Artemis</c:facet>
| <h:outputText value="#{so.artemisId}" rendered="#{so.status.code != 2}" />
| </h:column>
|
| <h:column >
| <c:facet name="header">Date de prise commande</c:facet>
| <h:outputText value="#{so.sellTime}" rendered="#{so.status.code != 2}" />
| </h:column>
|
|
| <h:column >
| <c:facet name="header">Prix TTC</c:facet>
| <h:outputText value="#{so.amountWithTaxes}" rendered="#{so.status.code != 2}" />
| </h:column>
|
| <h:column>
| <c:facet name="header">Detail - Prestations complémentaires</c:facet>
| <!--#{potentialEditedAccount.account.fullname}-->
| <h:commandButton action="#{serviceOrderManager.viewOrder(so)}" value="Detail" rendered="#{so.status.code != 2}" />
| </h:column>
|
| <h:column>
| <c:facet name="header">Cloture - Encaissement - Reçu - Facture</c:facet>
| <h:commandButton action="#{serviceOrderManager.startClosingOrder(so)}" value="Cloturer la commande" rendered="#{so.status.code == 0 and empty so.payments }"/>
| <h:commandButton action="#{paymentHandler.setOrderforCBPayment(so)}" value="Payer la commande par CB" rendered="#{so.status.code == 1 and not so.paid}"/>
| <h:commandButton action="#{paymentHandler.setOrderForChequePayment(so)}" value="Payer la commande par chèque" rendered="#{so.status.code == 1 and not so.paid}"/>
|
|
| <h:commandButton action="#{serviceOrderManager.viewTicket(so)}" value="Reçu" rendered="#{not empty so.payments }"/>
|
| <h:commandButton action="#{serviceOrderManager.viewTicket(so)}" value="Facture" rendered="#{not empty so.payments }"/>
| </h:column>
|
|
|
| </h:dataTable>
|
|
here is the called method :
| public String viewTicket(ServiceOrder order) {
|
| serviceOrder = entityManager.merge(order);
| return "ticket";
| }
|
here is my pages.xml snipet
| <rule if-outcome="ticket">
| <redirect view-id="/ticket.xhtml"/>
| </rule>
|
I have also added the needed modification to components.xml
| <pdf:documentStore useExtensions="true" />
|
and in web.xml
| <!-- PDF filter -->
| <filter>
| <filter-name>Seam Servlet Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Servlet Filter</filter-name>
| <url-pattern>*.pdf</url-pattern>
| </filter-mapping>
|
| <servlet>
| <servlet-name>Document Store Servlet</servlet-name>
| <servlet-class>org.jboss.seam.pdf.DocumentStoreServlet</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Document Store Servlet</servlet-name>
| <url-pattern>*.pdf</url-pattern>
| </servlet-mapping>
|
my pdf renders well with IE and Konqueror (which do not need the useExtensions)
Thanks in advance for your help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099928#4099928
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099928
18Â years, 6Â months
[JBoss Seam] - Re: Storing large recordset in memory
by damianharvey
I've been looking into the second level cache and following this rather good article: http://www.devx.com/dbzone/Article/29685/0/page/1. My setup appears correct however I'm getting no performance improvement.
My test reads 10,000 UN Location codes in 10 iterations. I would expect the last 9 to be quicker but the reverse is happening:
| 16:31:45,699 INFO [STDOUT] Iteration 0 took 3190 ms
| 16:31:51,757 INFO [STDOUT] Iteration 1 took 6058 ms
| 16:31:57,237 INFO [STDOUT] Iteration 2 took 5480 ms
| 16:32:02,964 INFO [STDOUT] Iteration 3 took 5727 ms
| 16:32:10,310 INFO [STDOUT] Iteration 4 took 7346 ms
| 16:32:15,971 INFO [STDOUT] Iteration 5 took 5661 ms
| 16:32:21,670 INFO [STDOUT] Iteration 6 took 5699 ms
| 16:32:27,176 INFO [STDOUT] Iteration 7 took 5506 ms
| 16:32:32,882 INFO [STDOUT] Iteration 8 took 5706 ms
| 16:32:38,628 INFO [STDOUT] Iteration 9 took 5746 ms
|
On server startup I get the following logs, which to me indicate a working setup:16:21:15,028 INFO [SettingsFactory] Second-level cache: enabled
| 16:21:15,029 INFO [SettingsFactory] Query cache: disabled
| 16:21:15,029 INFO [SettingsFactory] Cache provider: net.sf.ehcache.hibernate.EhCacheProvider
| ...
| ...
| 16:20:59,140 WARN [CacheFactory] read-only cache configured for mutable class: Odyssey0_5_0_ear,Odyssey0_5_0.UnLocode
|
I have an ehcache.xml in my classpath with the following entry:
| <cache name="UnLocode"
| maxElementsInMemory="90000"
| eternal="true"
| overflowToDisk="false"
| />
|
Where my entity is annotated with a region of 'UnLocode' (I've tried with no region and using class as well):
@Entity
| @Table(name = "UN_LOCODE")
| @Cache(usage = CacheConcurrencyStrategy.READ_ONLY, region="UnLocode")
| public class UnLocode implements java.io.Serializable {
|
Interestingly if I change my queries to include .setHint("org.hibernate.cacheable", new Boolean(true)) then I don't get 10 Hibernate queries but the times don't change much at all.
Is there something that I'm missing?
I'll be asking this on the Ehcache forum but thought I'd continue here first.
Thanks,
Damian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099927#4099927
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099927
18Â years, 6Â months