• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 693
  • Last Modified:

JBoss MQ / JNDI

Hi all

Does it possible to use JBossMQ by external JVM? (ie. a Java process that is not deployed in JBoss but it is run as a standalone process)?

How about the JNDI lookup of JBoss by external JVM?

Rgds/Glogin
0
glogin
Asked:
glogin
1 Solution
 
gdrnecCommented:
Absolutely,

A JMS provider like JBossMQ is an enterprise resource and therefore designed to be accessed by external processes.

The general recipe for doing it is to lookup the resource using something like the following:

Context context = javax.naming.InitialContext(Properties props); // props for the JBoss JNDI tree are in the jboss docs
Object queueOrTopic = context.lookup("the name of the queue or topic on the JNDI tree"); // probably something like /jms/yourTopic

Then use PortableRemoteObject to narrow to the specific JMS interface that you require and use the object.

Geoff
0
 
gloginAuthor Commented:
That means JBossMQ and JBoss JNDI can be used by external processes.

I ask this question, because some forum said that WebsphereMQ cannot be used by external processes. I just doubt if it is built for the EJB container usage only.

Glogin
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now