wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes JBoss 3.0 + Castor Transaction Rollback Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JBoss 3.0 + Castor Transaction Rollback Exception" Watch "JBoss 3.0 + Castor Transaction Rollback Exception" New topic
Author

JBoss 3.0 + Castor Transaction Rollback Exception

Arijit Ghosh
Ranch Hand

Joined: Feb 01, 2002
Posts: 174
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


Regards,<br /> Arijit
Arijit Ghosh
Ranch Hand

Joined: Feb 01, 2002
Posts: 174
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

Joined: Feb 01, 2002
Posts: 174
Anyone faced Transaction related exceptions ?
Arijit Ghosh
Ranch Hand

Joined: Feb 01, 2002
Posts: 174
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

Joined: Feb 01, 2002
Posts: 174
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

Joined: Feb 01, 2002
Posts: 174
Could this problem be related to database locking ? Any suggestions ?
Arijit Ghosh
Ranch Hand

Joined: Feb 01, 2002
Posts: 174
Did any one face Undeclared Throwable Exception : Transaction Rollback Exception ?
 
GeeCON Prague 2014
 
subject: JBoss 3.0 + Castor Transaction Rollback Exception