What JMS ConnectionFactory can I use for JBoss 5.1?

I have a general question about using JMS provided by JBoss 5.1.

I am deploying a Java EE application (deployed using the Spring Framework) on JBoss 5.1. The application uses Spring to use messages from JMS queues (DefaultMessageListenerContainer), and also sends messages to JMS destinatiosn using Spring JmsTemplate. The important thing is that the application uses 2PC (JTA and XA). In addition, there is no MDB in the application.

After looking at the configuration of JBoss 5.1, there are several ConnectionFactories in JNDI:

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

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

Can someone shed some light on the subject, please?

+4
source share
1 answer

Interesting are in deploy/messaging/jms-ds.xml

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

It seems to me that java:/JmsXA definitely the one to use.

+1
source

All Articles