-
1. Re: Transaction control across multiple threads
marklittle Jun 7, 2007 3:18 PM (in response to chiyuh)If you want all of the threads to be doing work in the scope of the same transaction then you will have to get the UserTransaction within each thread and do a resume on the required transaction in order to associate it with the thread (and vice versa).
JTA does not provide any means for you to do thread synchronization at transaction commit. However, JBossTS provides a CheckedAction class, an instance of which is associated with each transaction. If you check the Programmers Guide about this you should be able to figure out how to get it to do what you want. -
2. Re: Transaction control across multiple threads
chiyuh Jun 7, 2007 6:13 PM (in response to chiyuh)How do I call resume, I have tried to lookup the TransactionManager with "TransactionManager", "javax.transaction.TransactionManager" and "java:/TransactionManager", but always get a "not bound" exception, is TransactionManager only available on the server side and client has no way to access it?
Thanks. -
3. Re: Transaction control across multiple threads
marklittle Jun 8, 2007 6:10 AM (in response to chiyuh)What is your deployment? Which version of JBossAS? Which version of JBossTS? Which JTA implementation within JBossTS? More information is required in order to help you further.
-
4. Re: Transaction control across multiple threads
chiyuh Jun 8, 2007 4:36 PM (in response to chiyuh)I have stateless session beans deployed on JBoss 4.0.3 SP1, with whichever JBossTS, JTA build in with the "all" configuration (i.e. no Aljuna).
Regards, -
5. Re: Transaction control across multiple threads
marklittle Jun 9, 2007 3:47 AM (in response to chiyuh)OK, so for a start I'd recommend you download JBossTS and install it into your AS installation. That way you'll get the synchronization capability I mentioned earlier.