Hi,
Guys, are you aware of the fact that BMT support in jBoss in far from
the specification?
See 16.4.3 in EJB 2.0 specification or 11.3.3 in EJB 1.1 specification.
At least two points:
1) This
con2 = ds2.getConnection();
ut = ejbContext.getUserTransaction();
ut.begin();
don't enlist the resource to the transaction, see XAConnectionFactory:
public Object prepareObject(Object pooledObject) {
...
if(tm.getStatus() != Status.STATUS_NO_TRANSACTION) {
...
trans.enlistResource(res);
2) This
public void method1(...) {
ut = ejbContext.getUserTransaction();
ut.begin();
...
}
...
public void method3(...) {
ut = ejbContext.getUserTransaction();
ut.commit();
...
}
won't work either, just because in EnterpriseContext we see:
public UserTransaction getUserTransaction()
{
return new UserTransactionImpl();
}
Comments?
Best regards,
Oleg Nitz