How to configure a Message Driven Bean to subscribe to a remote JMS Topic

StackOverflow https://stackoverflow.com/questions/14980136

  •  10-03-2022
  •  | 
  •  

Pergunta

I am trying to get a MessageDriven (EJB 3) bean to subscribe to a JMS Topic on another glassfish instance on another host. Is this possible?

Foi útil?

Solução

In the Glassfish console you can modify the JMS server and point it to another Glassfish instance or a standalone OpenMQ broker. Although you can configure several JMS hosts to my knowledge Glassfish will always use the one called default_JMS_host so that's the one you want to edit.

Just one thing: in such a setup the two server instances will share queues and topics, which may not be what you want if the two servers are for example running the same application but don't want to share e.g a particular queue. This can easily be solved via the Destination Resources configuration, by specifying different physical names for that queue.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top