geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Kofler" <mario.kof...@gmail.com>
Subject Re: Stateful Session Bean Problem Geronimo 2.1.1: "Passivation Failed"
Date Sat, 12 Jul 2008 20:49:20 GMT
thanks for the answer, passivation is working fine now, with
explicitely closing the entity manager.

i got one more question, maybe you know what could be the problem..

at higher user rates i get some exception, what looks like the server
cannot take more users.

stateful bean pool is set to 800 and strict pooling to false.

maybe you already saw this exception or know at first sight what might
be the reason.

if not, nevermind. i am fine that passivation works now.

thanks and greetings, mario.


stack trace with exception:

     [exec] javax.ejb.EJBTransactionRolledbackException: Transaction
was rolled back, presumably because setRollbackOnly was called during
a synchronization: Unable to commit: transaction marked for rollback
     [exec]     at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:348)
     [exec]     at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:251)
     [exec]     at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
     [exec]     at $Proxy47.writeToDB(Unknown Source)
     [exec]     at vt.servlet.AddServlet.doGet(AddServlet.java:48)
     [exec]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
     [exec]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
     [exec]     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     [exec]     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     [exec]     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     [exec]     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
     [exec]     at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
     [exec]     at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
     [exec]     at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
     [exec]     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
     [exec]     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     [exec]     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     [exec]     at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
     [exec]     at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
     [exec]     at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
     [exec]     at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
     [exec]     at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     [exec]     at java.lang.Thread.run(Thread.java:619)
     [exec] Caused by:
javax.transaction.TransactionRolledbackException: Transaction was
rolled back, presumably because setRollbackOnly was called during a
synchronization: Unable to commit: transaction marked for rollback
     [exec]     at
org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:146)
     [exec]     at
org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:76)
     [exec]     at
org.apache.openejb.core.stateful.StatefulContainerManagedTxPolicy.afterInvoke(StatefulContainerManagedTxPolicy.java:57)
     [exec]     at
org.apache.openejb.core.stateful.StatefulContainer._invoke(StatefulContainer.java:467)
     [exec]     at
org.apache.openejb.core.stateful.StatefulContainer.businessMethod(StatefulContainer.java:413)
     [exec]     at
org.apache.openejb.core.stateful.StatefulContainer.invoke(StatefulContainer.java:271)
     [exec]     at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
     [exec]     at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
     [exec]     at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:245)
     [exec]     ... 21 more


2008/7/11 David Blevins <david.blevins@visi.com>:
>
> On Jul 10, 2008, at 10:36 PM, Mario Kofler wrote:
>
>> thanks,
>>
>>
>>> if the
>>> persistence provider doesn't want it serialized, there's nothing we can
>>> do
>>> about it.
>>
>> so that means that it is not a bug but the persistence provider
>> hinders a passivation?
>
> Not a container bug but a bean bug.  The container will try to passivate
> you, you just need to make sure it can, which in this case means not holding
> onto a reference to your bean-managed EntityManager.  The easiest way is to
> destroy your EntityManager object in PrePassivate (close it and null the
> ref) and create yourself a new one in PostActivate.
>
> -David
>
>
>

Mime
View raw message