tags:

views:

113

answers:

1

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

I deploy my JEE 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?

A: 

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.

skaffman
What about deploy/messaging/connection-factories-service.xml? There is the rest of the factories form the list. And there is one commented as "A clustered connection factory that supports automatic failover and load balancing of created connections". Isn't that suitable?
pregzt
@pregzt: No, because they're not XA-capable.
skaffman