|
From: Jonathan H. <jon...@re...> - 2007-06-11 14:12:58
|
Thanks Mark. In that article I think they used the approach of wiring up the TransactionManager and UserTransaction implementations as beans and linking them to the JtaTransactionManager in the .xml config file. That will work fine as long as no additional setup code is needed. I guess the reason Jotm is different is that its implementation class cannot work as a bean in this way. The .xml config approach has some nice effects, like not requiring JBossTS build to depend on Spring classes or v.v. I may stick with it if it proves flexible enough. I guess there is also a middle ground where any setup that is needed is put into the constructor or static block in a bean class that subclasses the TM/UT implementations. Seems odd Jotm integration did not go down that path - there must be some reason for requiring the compile code coupling that currently exists here. Jonathan. Mark Pollack wrote: > 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) |