• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JBoss 3.0 + Castor Transaction Rollback Exception

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm using container based transaction of Jboss 3.0. We are using the Struts framework and Castor.

When i try to modify an existing object, the first time it works fine. the next time it throws the
exception given below. Again the third time it works,4th time exception and so on..
However if we try to modify different objects there is no problem.

In the Deployment descriptor, ejb-jar.xml, <tran-attribute> under <assembly-descriptor> tag is set to "Required". We also tried using "RequiresNew".



Here is the code -


Thanks in advance
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Everytime a Client Object needs to be modified, modifyClientDetails is called from Action class and the control shifts to Bean. In the method declared in the BEAN, findByPrimaryKey method is called declared in Castor.
Now this provess is executed for each Client object to be modified. Client Object 1 is modified, it works fine. Then Client Object 2 is modified, it works fine. However, if Client Object 1 is now again modified, an error is thrown. However on 3rd try, again it works.
Can't figure out as to why is it working for odd numbers but not for even nos.
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone faced Transaction related exceptions ?
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Transaction is presently being handled by the container. As mentioned in the ejb-jar.xml file, I have set <trans-attribute> Required under <assembly-descriptor>.
Since I am using Castor, I have the following piece of code...

I have set <res-auth> to Container. So everything is supposed to be handled by the JBoss container.
Any pointers ?
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How should the Castor JDO transaction handling be done ? Should it be Application or Container managed since we are using JBoss 3.0 integrated
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could this problem be related to database locking ? Any suggestions ?
 
Arijit Ghosh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did any one face Undeclared Throwable Exception : Transaction Rollback Exception ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic