• Post Reply Bookmark Topic Watch Topic
  • New Topic

access jms queue from different servers  RSS feed

 
everson santos
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I would like to know if is possible to access a jms queue of a jboss running on server A from an application running on server B. The server A and B are different machines.

If is possible, how can I do that ?

thanks!
 
ntumba lobo
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it is possible, you need to do a remote JNDI look up.
From server A if you want to access a JMS resource on server B you need to create an InitialContext object with extra parameters
like url provider that is pointing to server B.
 
everson santos
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ntumba lobo wrote:Yes it is possible, you need to do a remote JNDI look up.
From server A if you want to access a JMS resource on server B you need to create an InitialContext object with extra parameters
like url provider that is pointing to server B.


Hi, thanks to answer ..

I understand what you said, but how can I do that using message drive bean deployed on server A listening messages from server B ?

 
ntumba lobo
Ranch Hand
Posts: 180
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you have your mdb running on serverA and the queue on server you can create on serverA a connectionfactory (remoteCF) that points to server B.
your mdb on serverA will get its connections from this remoteCF.

To do this in glassfish you can configure your connection factory with a property called "AddressList" that allows to point remotely.
This property may be server specific so you need to check the doc of your server for the equivalent property.

what you are trying to do is described in the jee5 tutorial from p981 "An Application ExampleThat Consumes Messages froma
Remote Server"
 
everson santos
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ntumba lobo wrote:if you have your mdb running on serverA and the queue on server you can create on serverA a connectionfactory (remoteCF) that points to server B.
your mdb on serverA will get its connections from this remoteCF.

To do this in glassfish you can configure your connection factory with a property called "AddressList" that allows to point remotely.
This property may be server specific so you need to check the doc of your server for the equivalent property.

what you are trying to do is described in the jee5 tutorial from p981 "An Application ExampleThat Consumes Messages froma
Remote Server"


Hi!

I'm using jboss, but it worked. I follow this steps below and jee5 tutorial
http://blog.emmanuelbernard.com/2008/08/remotely-send-and-consume-messages-with.html

Thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!