JMS pools configuration
BTM XA connection factories can be created - like their JDBC counterparts - via some java code or via a BTM-specific tool called the Resource Loader. You are free to choose the method you prefer, there is absolutely no difference between them.
BTM only supports the JMS 1.1 API. Only servers supporting it can be used with BTM. There is currently no way to make BTM work with JMS 1.0.2 API.
|Table of Contents|
Using the BTM API
BTM comes bundled with a JMS XA connection pool which is very easy to configure. You basically have to create an instance of bitronix.tm.resource.jms.PoolingConnectionFactory set some properties and you're done.
It might be that the
Like for JDBC, the connection pool will be initialized during the first call to
createConnection(). It might be desirable to initialize the pool eagerly, like during application startup rather than having to wait for the first request. This can be done by calling
Now line 7 will initialize the pool and create the 5 connections to the JMS server instead of line 8.
Using the Resource Loader
A connection factory configuration utility is also bundled with BTM. It is convenient to use it rather than create your connection factory in code. Refer to the Resource Loader page for more details.