This content has been marked as final.
Show 3 replies
-
1. Re: Difference between using JNDI to initiate a jms connection factory and using API directly
jbertram Apr 7, 2013 10:42 PM (in response to ohmygod)I answered the first half of your question on your other post here.
You're correct that there is no HornetQ API for creating a pooled connection factory. That is because a pooled-connection-factory is actually a JCA-based JMS connection factory. The pooling is provided by JCA and the JMS bits are provided by HornetQ. Generally speaking, using a JCA-based JMS connection factory has these benefits:
- Superior performance (due to pooling).
- Superior usability in a JTA context (since the JCA code will automatically detect an ongoing JTA transaction and enlist the connection into the transaction)
- Superior configurability (e.g. change pool size via XML or CLI instead of modifying code).
-
2. Re: Difference between using JNDI to initiate a jms connection factory and using API directly
ohmygod Apr 8, 2013 1:35 AM (in response to jbertram)Thanks so much. Just a confirmation, do you mean the JCA-based JMS connection factory is using JNDI method?
-
3. Re: Difference between using JNDI to initiate a jms connection factory and using API directly
jbertram Apr 8, 2013 9:25 AM (in response to ohmygod)Yes. Since there is no HornetQ API to instantiate a JCA-based JMS connection factory you will need to look it up in JNDI.