-
1. Re: MDB Consuming messages from a remote queue
arnab_ghosh Jul 7, 2015 7:01 PM (in response to arnab_ghosh)Finally figured it out
The change should be:
!
<pooled-connection-factory name="hornetq-ra">
<transaction mode="xa"/>
<connectors>
<connector-ref connector-name="netty-remote-aoma-queue-server-connector"/>
</connectors>
<entries>
<entry name="java:/JmsXA"/>
<entry name="java:jboss/DefaultJMSConnectionFactory"/>
</entries>
</pooled-connection-factory>
Instead of adding a new pool, have to modify the existing hornetq-ra pooled factory,
-
2. Re: MDB Consuming messages from a remote queue
jbertram Jul 7, 2015 9:54 PM (in response to arnab_ghosh)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.
-
3. Re: MDB Consuming messages from a remote queue
arnab_ghosh Jul 8, 2015 4:26 PM (in response to jbertram)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 ?
-
4. Re: MDB Consuming messages from a remote queue
jbertram Jul 8, 2015 4:30 PM (in response to arnab_ghosh)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.
-
5. Re: MDB Consuming messages from a remote queue
arnab_ghosh Jul 8, 2015 8:28 PM (in response to jbertram)jbertram It worked. I was using the jndi name last time, hence the exception. Thanks for your help. Is there a place where the supported ActivationConfigs for an MDB in this scenario can be located ?
-
6. Re: MDB Consuming messages from a remote queue
jbertram Jul 8, 2015 8:50 PM (in response to arnab_ghosh)Since the MDB is using the HornetQ JCA RA you can find the relevant information in the HornetQ documentation.