Trying out XA, part 5: a resource adapter rabbit trail
Posted by danielmeyer on July 8, 2008
In Part 4, we ended up stuck and wanting to post a question somewhere. As often happens, as part of pulling together data to ask a question, I do more research…
> Are the connection factories/queues/topics just exposed by the RAR for use
> within the J2EE server only.
Yes – as they are not using the regular JMS client API – they are
using J2EE RA stuff
You’ll need to setup a regular JMS connection and any destination
objects you want in JNDI somewhere. Using JBoss’s JNDI provider could
well work fine though – just make sure its actually normal JMS client
objects (ConnectionFactory & destinations) – and not RA stuff. Also
make sure the J2EE server and your stand alone client are using the
exact same ActiveMQ jars since its gonna be using Java serialization
to transmit the Java objects in JNDI
(Emphasis mine.) Ok, so looks like the classes I’m JNDI-lookuping aren’t intended for outside-the-app-server use. But there is a way… the rest of the thread discusses an alternative, but I’m not sure that it would work with XA transactions.
Update 7/23/2008: See the Something works! post for what was actually the cause of the