|
From: Juergen H. <jue...@in...> - 2007-06-11 14:32:34
|
Hi Jonathan, As outlined in my previous mail on JTA setup, the preferred approach is setting up a TransactionManager handle as bean and passing it into the "transactionManager" property of Spring's JtaTransactionManager. There is usually no need for explicitly setting up a UserTransaction handle as well. Our unit tests just test Spring's JtaTransactionManager against UserTransaction and TransactionManager mocks. So for integration tests, you'll have to set up an application context with full tx and resource setup. Should be straightforward when using Spring's ClassPathXmlApplicationContext class for bootstrapping. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Jonathan Halliday Sent: Monday, June 11, 2007 3:42 PM To: spr...@li... Subject: [Springframework-developer] Spring - JBossTS integration Hello Spring developers I'm looking at how best to integrate the JBossTS transaction manager with Spring2 for usage outside the application server i.e. when no JNDI is available. It seems I need to provide a factory or factories that know about the JBossTS implementation and can return the classes which implement TransactionManager and UserTransaction. This is the way the Jotm integration appears to work, although it's slightly different in that the same object implements both interfaces in Jotm. Would someone (Juergen?) please indicate if this is indeed the preferred approach? Also, is there a way to configure the unit tests so that they exercise this new code path? If not I guess I'll have to write specific tests for it. Thanks Jonathan Halliday JBossTS developer JBoss, a division of Red Hat. ------------------------------------------------------------ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland) ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |