This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes Accessing classes in other JVM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Accessing classes in other JVM" Watch "Accessing classes in other JVM" New topic
Author

Accessing classes in other JVM

Ajju Chawla
Greenhorn

Joined: Oct 21, 2005
Posts: 21
Hi,

need some help people...
I've an application deployed in tomcat and some java services on the same m/c. Now I want that java service should be able to invoke the classes running in the application deployed in tomcat. Note they both are runnning in different JVM's.

Any suggestions...

Thanks
Ajju
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41592
    
  55
RMI would be one way of doing it. Since you have Tomcat running already, you might also look into web services.
[ October 21, 2005: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Ajju Chawla
Greenhorn

Joined: Oct 21, 2005
Posts: 21
Hi Ulf,
thanx for uor reply...I was wondering can i use JNDI to access those classes in the tomcat. The idea is that classes outside tomcat will call the JNDI service of tomcat and than those tomcat classes can be invoked.

what do u think as Iam not sure that tomcat provides such a JNDI service..

Thanks
Ajju
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41592
    
  55
JNDI, as its name implies, is a naming and directory service, not a remote access service. You can use it in your app to look up a service that connects to a remote Tomcat, but you still need to implement that service.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Accessing classes in other JVM