On 1 Sep 2005, at 10:35, Guillaume Nodet wrote:
Hi all !
Hey Guillaume!
I'm trying to take a look at jencks + xa + spring.
I have several problems and like to have guidance :
* the xa transaction that is started / commited by jencks is in
no way related to spring transaction layer so that there is no way
to use the existing transaction with spring. To solve this, i was
thinking of adding a spring PlatformTransactionManager on the
JCAConnector and maybe a SpringEndpoint
Great idea. Yes we've not yet mixed and matched the XA transactions
with Spring declarative transactions yet - please do feel free to add
that :). BTW I've given you commit karma to Jencks, so please go
right ahead and contribute any classes/tests you like
* in a non-managed environment (using xa with jotm or geronimo
tx manager), there is no automatic enlistement of jms sessions in
spring so that using xa + jms in spring must be done manually. It
should be pretty straightforward to implement a proxy around the
connection factory to do this. Is there any reason why this has not
been done in spring or elsewhere ?
Though you can use Jencks for outbound JMS now - Thierry committed
the code a day or two ago (thanks Thierry!) - which does this. i.e.
it makes a ConnectionFactory which uses the JCA Managed Connection
stuff. There's an example of this in action...
jencks-activemq.xml or
ActivemqOutboundMessagingTest
That could maybe do the trick?
* i saw the org.activemq.ra.jms.ConnectionProxyFactory, to reuse
the same jms session, but it relies on the fact that the invoked
bean has received a message from the activemq resource adapter. Why
does the spring jms layer does not bind the session and reuse it
when inside the same xa transaction ?
The JMS Session is only visible inside a specific RA right; so doing
this would have to be RA-specific right? Or you mean provide a more
general purpose JMS ConnectionFactory/Connection/Session pool which
works with the session thats registered by some RA to make it easier
to do this with other RAs?
* the org.activemq.pool package can not be used with
ActiveMQXAConnectionFactory because it tries to rollback
transactions and exceptions are thrown : is this a bug ?
Yeah good catch. Someone did write an XA version of the pooled JMS
connection factory if you fancy trying it out...
http://jira.logicblaze.com/jira/browse/AMQ-303
James
-------
http://radio.weblogs.com/0112098/