[JBoss Seam] - XHTML Performance
by monkeyden
I have been profiling our Seam 1.2 (XHTML) application using JProfiler and have discovered an obscene number of HashMap$Entry objects on the heap (typically about 7-8 million). Not withstanding the possibility that this is the most common data structure in a web container/application, I suspect that much of it comes from XHTML. I say this because I can easily reproduce it in the Seam Blog example (XHTML) but cannot in the Seam Messages example (JSP).
We're hosting on 64bit so we get more than 3GB of heap, however, during peak times transactions begin to timeout and the application fails to respond. It recovers for a short time but the threshold for recurrence is much lower.
I'm sure there are ways we can tweak our existing middleware to increase performance and decrease the footprint but this seems to be the most acute issue we have right now.
Can anyone share experiences or suggestions on this topic or is it the cost of using XHTML?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104793#4104793
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104793
18 years, 8 months
[Persistence, JBoss/CMP, Hibernate, Database] - Hibernate outer/inner join problem
by sztank
Hello,
I trying to use Criteria to build some conditional query and I could not manage to set it up well.
The query is:
| Criteria crit = session.createCriteria(Contract.class);
| crit.setFetchMode("product", FetchMode.JOIN);
| crit.createAlias("status", "stat");
| crit.createAlias("client", "cli");
| crit.createAlias("product", "prod");
|
| for(int i=0; i < searchArray.length ; i++) {
| crit.add( Restrictions.disjunction()
| .add( Restrictions.ilike("comment", searchArray, MatchMode.ANYWHERE))
| .add( Restrictions.ilike("clientContractId", searchArray, MatchMode.ANYWHERE))
| .add( Restrictions.ilike("cli.name", searchArray, MatchMode.ANYWHERE))
|
| );
| }
|
| crit.addOrder( Order.asc("contractId"));
| crit.addOrder( Order.asc("contractItem"));
|
| contracts = crit.list();
|
product is defined in the Contract entity as follows:
| @ManyToOne
| @JoinColumn(name="product")
| public Product getProduct()
| {
| return product;
| }
|
and it can be a null value.
The Sql is as follows:
| select
| this_.contract as contract132_3_,
| this_.client as client132_3_,
| this_.client_contract_id as client2_132_3_,
| this_.comment as comment132_3_,
| this_.contract_id as contract4_132_3_,
| this_.contract_item as contract5_132_3_,
| this_.date_client as date6_132_3_,
| this_.date_closed as date7_132_3_,
| this_.date_irga as date8_132_3_,
| this_.date_opened as date9_132_3_,
| this_.price as price132_3_,
| this_.product as product132_3_,
| this_.quantity as quantity132_3_,
| this_.quantity_closed as quantity12_132_3_,
| this_.source_contract as source13_132_3_,
| this_.status as status132_3_,
| this_.status_assembly as status14_132_3_,
| this_.status_pcb as status15_132_3_,
| this_.status_print as status16_132_3_,
| this_.wz as wz132_3_,
| cli2_.client as client134_0_,
| cli2_.name as name134_0_,
| prod3_.product as product143_1_,
| prod3_.casual_name as casual2_143_1_,
| prod3_.client as client143_1_,
| prod3_.close_date as close3_143_1_,
| prod3_.code_name as code4_143_1_,
| prod3_.comments as comments143_1_,
| prod3_.creator as creator143_1_,
| prod3_.group_name as group7_143_1_,
| prod3_.start_date as start8_143_1_,
| stat1_.status as status133_2_,
| stat1_.name as name133_2_
| from
| public.contract this_
| inner join
| public.client cli2_
| on this_.client=cli2_.client
| inner join
| public.product prod3_
| on this_.product=prod3_.product
| inner join
| public.contractstatus stat1_
| on this_.status=stat1_.status
| where
| (
| this_.comment ilike ?
| or this_.client_contract_id ilike ?
| or cli2_.name ilike ?
| )
| order by
| this_.contract_id asc,
| this_.contract_item asc
|
Now the select don't get the results with product set to null value.I can't manage to set Criteria to use outer join with product. I tried to put the setFetchMode("product", FetchMode.JOIN); in few places but it doesn't change anything in result sql. If someone could give me some light on it i would be gratefully!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104784#4104784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104784
18 years, 8 months
[JBoss Seam] - Seam stuck in recursive loop
by pete76
Hi,
I am trying to get a stripped down (no JPA / EJB3, just view to actions) Seam 2 booking app
working inside Tomcat 6.0.14 and am getting the error below (seam get stucks in a loop):
Is what I am trying to do feasible (ie. strip out the JPA/EJB3 stuff)?
Can anyone recommend where the problem might reside?
My components.xml looks like this:
<!--
There is one very important point you should to know about this file.
If you take take a look at line jndiPattern jboss-seam-booking/#{ejbName}/local,
you will probably be kind of surprised. The preceding jboss-seam-booking/ is the name
of the ear file you are deploying (jboss-seam-booking.ear in our case).
Unfortunately we have to provide this information FPRIVATE "TYPE=PICT;ALT="
if we don't use embedded ejb. So don't forget to change this whenever you change the
name of the ear file. :( Currently: you must change property myFacesLifecycleBug to true
-->
<core:init jndi-pattern="nameofmyearfile/#{ejbName}/local" debug="true"/>
<core:manager conversation-timeout="120000"
concurrent-request-timeout="500"
conversation-id-parameter="cid"/>
<transaction:ejb-transaction/>
<security:identity authenticate-method="#{authenticator.authenticate}"/>
14-Nov-2007 17:58:07 org.jboss.seam.contexts.Contexts startup
INFO: starting up: org.jboss.seam.security.identity
14-Nov-2007 17:58:07 org.jboss.seam.contexts.Contexts startup
INFO: starting up: org.jboss.seam.web.session
14-Nov-2007 17:58:07 org.jboss.seam.jsf.SeamPhaseListener beforePhase
SEVERE: uncaught exception
java.lang.RuntimeException: exception invoking: getTransaction
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:135)
at org.jboss.seam.Component.callComponentMethod(Component.java:2074)
at org.jboss.seam.Component.unwrap(Component.java:2100)
at org.jboss.seam.Component.getInstance(Component.java:1879)
at org.jboss.seam.Component.getInstance(Component.java:1844)
at org.jboss.seam.Component.getInstance(Component.java:1821)
at org.jboss.seam.Component.getInstance(Component.java:1816)
at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:301)
at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:142)
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.seam.transaction.Transaction.getUserTransaction(Transaction.java:79)
at org.jboss.seam.transaction.Transaction.createUTTransaction(Transaction.java:71)
at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
... 35 more
14-Nov-2007 17:58:07 org.jboss.seam.jsf.SeamPhaseListener beforePhase
SEVERE: swallowing exception
java.lang.RuntimeException: exception invoking: getTransaction
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:135)
at org.jboss.seam.Component.callComponentMethod(Component.java:2074)
at org.jboss.seam.Component.unwrap(Component.java:2100)
at org.jboss.seam.Component.getInstance(Component.java:1879)
at org.jboss.seam.Component.getInstance(Component.java:1844)
at org.jboss.seam.Component.getInstance(Component.java:1821)
at org.jboss.seam.Component.getInstance(Component.java:1816)
at org.jboss.seam.transaction.Transaction.instance(Transaction.java:36)
at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:301)
at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:142)
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104783#4104783
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104783
18 years, 8 months