Mantis - Resin
Viewing Issue Advanced Details
462 minor always 11-23-05 00:00 02-02-06 12:06
nquery  
ferg  
urgent  
closed 3.0.15  
3.0.15 fixed  
none    
none 3.0.18  
0000462: EJBLocalObject.remove() inside a JTA UserTransaction doesn't work in resin3
RSN-511
In Resin 3, doing a home.remove(key) or bean.remove() doesn't execute the delete sql immediately when inside a JTA UserTransaction - it seems to be 'withheld' until the transaction is commited. This worked fine in resin 2.

eg.

        UserTransaction tx = new InitialContext().lookup("java:comp/UserTransaction");
        tx.begin();
        myBeanHome.remove(myBean.getPrimaryKey()); // or myBean.remove();
        myBeanHome.create(sameKey, etc); <--- blows up because delete sql from above hasn't executed
      tx.commit();
 
the delete sql doesn't get executed until tx.commit(), but the insert sql from the create does get executed immediately.

all platforms, resin 3, java 1.5

Notes
(0000486)
nquery   
11-23-05 00:00   
forgot to mention that if i comment out the UserTransaction lines then it works fine.

eg.

       myBeanHome.remove(myBean.getPrimaryKey()); // or myBean.remove(); sql get's executed immediately
        myBeanHome.create(sameKey, etc); <--- blows up because delete sql from above hasn't executed

this works fine. but wrapping the Transaction around it causes trouble.
(0000694)
ferg   
01-12-06 15:22   
ejb/0ga3
(0000846)
ferg   
02-02-06 12:06   
ejb/0ga3