I have an MDB which uses container managed transaction (my container is IBM Websphere 7).
Websphere is using a global (JTA) transaction.
If my MDB thread starts a worker thread, and that thread begins a transaction, will that new thread be within the same transaction as the MDB?
I want the MDB thread to commit its transaction and acknowledge the MQ message as soon as my worker thread is successfully started. I do not want my MDB to rollback if the worker thread rolls back.
Edit: The code in the thread has this - it is not using annotations:
txn = (UserTransaction)ctx.lookup("java:comp/UserTransaction");
txn.begin();
So if look at txn.getStatus() it will be something other than STATUS_NO_TRANSACTION. Therefore I need to get the transaction manager appropriate for Websphere 7 and call "suspend()" before the txn.begin()? Is the correct approach to prevent problems?