• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Transaction Rollback problem

 
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am getting transaction roll back exception, while trying to call a session bean method with RequiresNew transaction attribute from onMessage of MDB. Any help to resolve this will be appreciated. I am using WAS 6.1.

Code structure:

MyMDBean - CMP, Required
MySessionBean - CMP, RequiresNew (all methods)

MyMDB.onMessage invokes the method processMessage on the MySessionBean. During this call it fails with the below exception. Please note, this error is not consistent, this is happening intermittently. Sometimes the messages gets processed properly, meaning the Session Bean method is invoked and process continues normally.

javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.websphere.csi.CSITransactionRolledbackException: Transaction marked rollbackon
ly
com.ibm.websphere.csi.CSITransactionRolledbackException: Transaction marked rollbackonly
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:200)
at com.ibm.ejs.csi.RequiresNew.postInvoke(RequiresNew.java:93)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3986)
at com.ibm.was.services.EJSLocalStatelessMySessionBean_26b161bc.processMessage(Unknown Source)
at com.ibm.was.services.MNPBSCSServiceMDBean.processMessage(MyMDBean.java:86)


Thanks in advance,
Ankit
 
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi, I am getting transaction roll back exception, while trying to call a session bean method with RequiresNew transaction attribute from onMessage of MDB. Any help to resolve this will be appreciated. I am using WAS 6.1.



This is a perfectly valid and legal scenario and it should work - it does in weblogic. Have you tried the IBM forums to check if there is a problem with this version of the server ? This javaranch post suggests it has.

cheers,
ram.
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ram, thanks for your reply.

I think I figured out the problem. The Session bean was being invoked by WAS, though the overall transaction of SB was taking more time than the default transaction timeout of WAS, and that's why WAS was rolling back the MDB transaction with above exception. I increased the default transaction timeout of WAS and also tweaked the processing in SB to reduce the overall processing time and it worked.

Thanks again.
Ankit
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using WAS 6.0 too.

Setting the transaction life time timeout value to a value like 1200 fixed the issue.

[11/4/11 13:20:15:719 SGT] 0000003a ExceptionUtil E CNTR0019E: EJB threw an unexpected (non-declared) exception during invocation of method "findByParamKey". Exception data: com.ibm.websphere.csi.CSITransactionRolledbackException: Transaction rolled back; nested exception is:
javax.transaction.TransactionRolledbackException: Transaction is ended due to timeout
at com.ibm.ejs.csi.TransactionControlImpl.completeTxTimeout(TransactionControlImpl.java(Compiled Code))
at com.ibm.ejs.csi.TransactionControlImpl.preInvoke(TransactionControlImpl.java(Compiled Code))
at com.ibm.ejs.container.EJSContainer.preInvokeActivate(EJSContainer.java(Compiled Code))
at com.ibm.ejs.container.EJSContainer.preInvoke(EJSContainer.java(Compiled Code))
 
reply
    Bookmark Topic Watch Topic
  • New Topic