4
votes

I have generic question on using JMS provided by JBoss 5.1.

I deploy my Java EE application (implemeneted using Spring Framework) on JBoss 5.1. The application is using Spring to consume messages from JMS queues (DefaultMessageListenerContainer) and also sends messages to JMS destinatiosn using Spring's JmsTemplate. What is important here is that the application uses 2PC (JTA and XA). Furthermore there is no MDBs in the application.

Looking at JBoss 5.1 configuration there is several ConnectionFactories available in JNDI:

  • java:/JmsXA
  • java:/ConnectionFactory
  • java:/XAConnectionFactory
  • java:/ClusteredConnectionFactory
  • java:/ClusteredXAConnectionFactory
  • ConnectionFactory
  • XAConnectionFactory
  • ClusteredConnectionFactory
  • ClusteredXAConnectionFactory

I was wondering which one I should be using in my configuration. I always used the java:/JmsXA one, but I'm not too sure if this is a best choice especially for clustered environment.

Can anyone shed some light onto the subject, please?

1

1 Answers

1
votes

The interesting ones are in deploy/messaging/jms-ds.xml

  • java:/JmsXA - "use this to get transacted JMS in beans"
  • java:/XAConnectionFactory - "Currently pointing to a non-clustered ConnectionFactory"

Looks to me like java:/JmsXA is definitely the one to use.