java - How to configure Message Driven Bean Application & Glassfish to consume messages from remote Message Broker? -


i've created simple mdb application , deployed glassfish v 3.1 embedded mq broker. destination resource name "jms/queue" created well. please see part of code below:

    @messagedriven(        mappedname = "jms/queue",        activationconfig = {           @activationconfigproperty(propertyname = "destinationtype", propertyvalue = "javax.jms.queue"),         }     )      public class messagebean implements messagelistener {           public void onmessage(message message) { ........ 

this works fine, how configure application work remote mq broker instance(located on host)?

you have 2 options:

  • use remote mode when configuring jndi resources connectionfactory , queue entities these entities hosted remote openmq.

  • configure bridge connect 2 queues hosted in difference instances. here documentation reference feature.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -