This one time, at band camp, tek1 said:
t>I'm using CastorJDO with my J2EE application to obtain the JDO reference
t>from JNDI. Everything is working fine, except for the transaction
t>management. When an exception occurs, the operations performed by Castor
t>are not rolled back, even though the below is specified in the CastorJDO MBean:
t>
t>_jdo.setTransactionManager("java:/TransactionManager");
This is perplexing because the DatabaseImpl.rollback() method calls TransactionContext.rollback() which should rollback anything in Castor's transactional context. What types of results are you seeing? Please explain what's happening and we'll see if we can work through it or I'll build a simple test case for it.
Bruce
Hi Bruce.
Thanks for your reply.
Basically, I have a Stateless Session Bean ("A") with methods a() and b():
A === public void a() <-- called by web client protected void b(Database db)
1. a() obtains the JDO instance from JNDI, and from the JDO instance, obtains a Database instance.
2. In performing the business logic, a() makes a call to b(), in which a() passes the Database instance to b().
3. b() performs does a db.load(class,id) on an object, and changes the value of one of the object's attributes using setXXX().
4. b() returns a value (that it computed) to a().
5. At some point in the remainder of a()'s execution, an exception occurs.
6. The changes made to the object in b() are not being rolledback. When I check the database, the value has been changed/committed, when it should not have been... :(
Thinking that the cause may have been because I did not set a()'s transaction attributes in ejb-jar.xml, I then added the "Required" transaction attribute for a(). However, after restarting JBoss and re-running my application, the result was the same. :(
My environment is: -J2SE-1.4.1_03 (Sun) -JBoss-3.2.1 -Castor-0.9.4.3 -Postgresql-7.3.2 -pg73jdbc3.jar
Any suggestions are greatly appreciated...
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
