activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: ActiveMQ's JNDI does not resolve XAConnectionFactory
Date Thu, 18 Mar 2010 12:46:47 GMT
you need to change
the org.apache.activemq.jndi.ActiveMQInitialContextFactory.createConnectionFactory(Hashtable)
method to optionally create an ActiveMQXAConnectionFactory
I think it would be a sensible default but having a property that can ensure
that a particular factory is xa would be a nice addition.
have a look
at org.apache.activemq.jndi.ActiveMQInitialContextFactory.createConnectionFactory(String,
Hashtable) to see the naming convention for how additional properties are

Would make a nice patch!

On 17 March 2010 18:45, edan <> wrote:

> I've tried googling for a reasonable amount of Internet time (more than
> 5-10
> minutes), and I've found a few old posts that seem similar but no clear
> answer.   In short, we are using ActiveMQ 5.3.0 to bridge to a third party
> using webMethods.  Everything has been great using ActiveMQ's builtin JNDI
> when we were look up "ConnectionFactory" and using dynamicQueue/QueueName
> syntax for destination names.
> But for a particular work flow, we need to use use XA transactions to
> provide roll back.  I tried several enumerations of getting webMethods to
> lookup "XAConnectionFactory" in ActiveMQ's JNDI.  I tried specifying
> ActiveMQXAConnectionFactory to lookup via JNDI, I tried adding mappings for
> ActiveMQXAConnectionFactory in "Other Properties" for the JNDI Provider
> (which I believe is webMethods speak for
> We have had some success defining an XAConnectionFactory in a Sun Directory
> Server and then defining queues individually in LDAP (there doesn't seem to
> be a way to do a cn=dynamicQueue... bleah), but life would be so much
> easier
> if ActiveMQ's handy little JNDI resolved XAConnectionFactory!
> I tried a quick hack of
>    private static final String[] DEFAULT_CONNECTION_FACTORY_NAMES =
> {"ConnectionFactory", "QueueConnectionFactory", "TopicConnectionFactory",
> "XAConnectionFactory", "ActiveMQXAConnectionFactory"};
> And it compiled, but didn't change anything as far as I can tell.  That
> made
> me think I would have to actual work to fix it.
> Any ideas out there?  Is there some reason the builtin JNDI can't resolve
> XAConnectionFactory?  I'm bit green in this area anyway, so perhaps there
> is
> some trickiness I don't understand.   Should I just dig into the initial
> factory java code a bit more?
> I appreciate any help; it's been enjoyable getting to know the software.
> - edan
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


Open Source Integration

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message