Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI

 
James Clarke
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does anyone know if its possible when using JNDI to use objects bound using JNDI in one JVM from another JVM ?

thanks in advance,

J.C
 
Henry Wong
author
Marshal
Pie
Posts: 21511
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by James Clarke:
Hi,

Does anyone know if its possible when using JNDI to use objects bound using JNDI in one JVM from another JVM ?

thanks in advance,

J.C


Of course. Weblogic, JBoss, Websphere, etc., all use JNDI. If it wasn't possible, then there is no way to get to these highly popular application servers from an external client.

Henry
[ July 14, 2006: Message edited by: Henry Wong ]
 
James Clarke
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the response. How would i go about referencing an object in one JVM from another JVM ? I am not sure what parameters to specify that the objects that I need are in another JVM.

The specific objects that I am trying to get a reference to are JMS Queues and topics so that I can publish some messages to them..

thanks in advance,

J.c
 
Henry Wong
author
Marshal
Pie
Posts: 21511
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't specify the other JVM. Instead you specify the port (and other criteria) that the JDNI service that is running in the other JVM is using. You also don't need to specify the object type, you specify the registered name of the object. Here is an example...



This example is used to connect to the JMX RMI connector, but that's not relevant. Notice that you have to specify the protocol, the port, the server, and the registered name to get the connector object.

Also, notice that it uses JBoss specific classes, as this connects to a JBoss server, so you need to also have the application server's client library in you path.


I suggest that you log into the support web-site, for your application server, for JMS queues, for this important information.

Henry
[ July 14, 2006: Message edited by: Henry Wong ]
 
James Clarke
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry, I am actually trying to lookup the queues and topics created by a middleware product called Tibco, I want to do the lookup from a seperate application that runs on web logic.. do you know if this is possible ?

thanks,

JC
 
Henry Wong
author
Marshal
Pie
Posts: 21511
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course, it is possible... IMHO, Weblogic's implementation is probably more robust than JBoss (although, I am sure that many here would disagree )

However, I have never played with Tibco, so I suggest that you log into into Tibco's or Weblogic's support site for the configuration information (and source code examples).

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic