Finally figured it out
The change should be:
Instead of adding a new pool, have to modify the existing hornetq-ra pooled factory,
Just noticed this thread...
There's a couple ways to get an MDB to do what you want:
- You can do what you did and change the default "hornetq-ra" pooled-connection-factory which will impact every MDB.
- You can add a new pooled-connection-factory (e.g. "pooled-remote-connection-factory") and change the "ejb3" subsystem configuration to use that pooled-connection-factory either via XML or via the "ejb.resource-adapter-name" system property. This will also impact every MDB.
- You can use the @ResourceAdapter annotation to tell the MDB to use the "pooled-remote-connection-factory". This will only impact the specific MDB which uses the @ResourceAdapter annotation.
jbertram Thanks for your reply. I tried the tried the @ResourceAdapter approach. Got an exception. How will I define a new adapter for this new pool ? Can I just pass the pool JNDI name to the Adapter and it will work ?
What exception did you get?
I believe the @ResourceAdapter annotation takes the "name" of the <pooled-connection-factory> which in your case would be "pooled-remote-connection-factory" (as I noted in my previous comment). You don't use the JNDI name.