|
From: Juergen H. <jue...@in...> - 2007-06-11 14:26:28
|
Indeed, the standard way of integrating a JTA provider is via UserTransaction and TransactionManager objects that are simply linked into Spring's JtaTransactionManager (as shown in that article). That said, note that JtaTransactionManager can work with a plain UserTransaction reference as well (not supporting transaction suspension then), and also with a plain TransactionManager reference (in which case it will simply delegate all calls to the TransactionManager directly). So in case of a standalone JTA setup, it would usually be sufficient to set up the TransactionManager handle only, passing it to the Spring JtaTransactionManager's "transactionManager" property. Unless the JTA provider does special stuff in its UserTransaction implementation, it is not necessary to explicitly set up the UserTransaction handle at all. As for JotmFactoryBean: JOTM is a bit different there in that it has this notion of a Jotm object and a Current handle. While that stuff could be set up in a completely decoupled fashion using factory methods and property-path navigation, that approach is not very intuitive. The Spring-provided JotmFactoryBean is simply a convenience shortcut for this. JTA providers with straightforward setup do not require such convenience glue. That applies to Atomikos, for example, which doesn't offer special Spring glue in its Spring support, rather 'just' facilities that are somewhat tailored for use in a Spring environment. To the best of my knowledge, Atomikos does *not* have direct Spring dependencies in any of its code. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Mark Pollack Sent: Monday, June 11, 2007 3:57 PM To: spr...@li... Subject: Re: [Springframework-developer] Spring - JBossTS integration Hi, As a starting point, there was an article on Javaworld http://www.javaworld.com/javaworld/jw-04-2007/jw-04-xa.html?nhtje=050807entj ava& that showed some example integration. Cheers, Mark -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Jonathan Halliday Sent: Monday, June 11, 2007 9:42 AM 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 ------------------------------------------------------------------------- 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 |