I've been fighting against WLI on that matter for the last two days.
In the beginning, when I saw that stacktrace :
<27 mars 2009 12 h 38 IRST> <Error> <WLW> <000000> <Exception processing myProcess
javax.transaction.TransactionRolledbackException: EJB Exception: : javax.transaction.TransactionRolledbackException: EJB Exception: :weblogic.transaction.internal.TimedOutException: Transaction timed out after 303 seconds
BEA1-0141042BE78F2733AB68
at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1600)
at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1147)
at weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1882)
at weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp(ServerTransactionManagerImpl.java:1064)
at weblogic.transaction.internal.WLSTimer.trigger(WLSTimer.java:31)
at weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:243)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:229)
at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:223)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
I thought to myself "This is pretty much annoying, but I guess I can handle that !".
And I started to change the JTA parameters in the console :
But it didn't change a thing ...
Eureka ! It's got to be something related to the EJB as said in the error message.
I then exploded (oh yeah) all my Event Generators (embodied by EJBs) and updated the weblogic DD such as :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd"><weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>CoctosExportCockpitJMSEventGenerator</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>15</max-beans-in-free-pool>
<initial-beans-in-free-pool>15</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>jms.coctos.export.cockpitQueue</destination-jndi-name>
</message-driven-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>3600</trans-timeout-seconds>
</transaction-descriptor>
</weblogic-enterprise-bean>
<disable-warning>BEA-010001</disable-warning> <!-- EJB class loaded from system CL -->
<disable-warning>BEA-010054</disable-warning> <!-- EJB class loaded from system CL (ejbc) -->
<disable-warning>BEA-010200</disable-warning> <!-- EJB class contains static member -->
<disable-warning>BEA-010202</disable-warning> <!-- Call-by-reference disabled -->
</weblogic-ejb-jar>
But it didn't change a thing ...
I was a bit disappointed and lost because, to me, I had done all that was in my power.
Thanks to Google (once again), I finally reached an interesting page saying :
"The default timeout period for a transaction is 300 seconds (5 minutes)."
Oh gush ! Exactly what I was trying to figure out for two days !!!
So, what am I to do to get rid of that exception ??? (thrill)
Well, it's no big deal, but this option is not easily findable :
Take your process project and locate the directory WEB-INF :
In that directory, you''ll find a wlw-config.xml file.
That's this file you'll have to modify to change the JTA timeout.
Example :
<wlw-config xmlns="http://www.bea.com/2003/03/wlw/config/">
<transaction-timeout>3600</transaction-timeout>
</wlw-config>
And voilà ! But be sure you understand the use of wlw-config.xml and wlw-runtime-config.xml.
Quoting Oracle : Note that the values appearing in wlw-config.xml are hardcoded into the deployment EAR and cannot be overridden by other runtime configuration mechanisms.
For most cases you should use wlw-runtime-config.xml to configure the runtime information for your Workshop application.
Hope that helped !
3 comments:
Thanks Maxou for this very useful trick on WLI !
kiss
Héhé :) Sacré Mael !
Je t'embrasse aussi, grand fou ;)
Maxence any idea why "weblogic-ejb-jar "trans-timeout" didn't work?. Is it because it was webservice, due to which you finally had to update "wlw-config.xml"?
Post a Comment