Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help on calling remote JVM class method  RSS feed

 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

My application code will run on one box , i have tool that will be executed on different box.

Here i want to access my application code specific class method in the tool where it will executed on different box, how can i do this?

I dont want to change any existing code in application side , i want to add code only in tool side to access the application class method

The class that i want to access is regular java bean class .


 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You will have to have SOME cooperating process on the "tool" side.

Since the motto of Sun - the creators of Java - was "the network is the computer", there are loads of ways to have two computers cooperate.

Bill
 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you guide me how to proceed on this. Is there any existing process i can use.
 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tool is client based application , it doesn't have any server or DB associated with it.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is this tool, and what does "client-based" mean?

Your best bet is to design a distributed application to start with. Writing two chunks of code and then asking how to tie them together is a bad strategy.

And it would help if you explained what it means to "access" a class. Why can't you just copy the class over to where the rest of the code is? Clearly from your point of view this may be a dumb question, but that's mostly because you haven't explained what this tool is, why you need to access some classes for it, and why those classes need to run on the other machine when there's no server or database there.
 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Paul Clapham

Hope i am able to answer your questions.


What is this tool, and what does "client-based" mean?

--- what i meant was it is stand alone java program, Here i want access the piece of code which was in EAR file executing in different box.



Writing two chunks of code and then asking how to tie them together is a bad strategy

-- I have no idea how to start with, i have seen in internet people wrote EJB to access the class from remote box ear file .. in my case it wasn't EJB, it is regular java bean class in remote box ear file


And it would help if you explained what it means to "access" a class

---- Server side ( remote box) ear file has MALAccessService class with method isServiceEnabled() , i want to access this method in tool ( stand alone ) program which runs in different box. if that method returns true stand alone program will instantiated.


why you need to access some classes for it, and why those classes need to run on the other machine when there's no server or database there

-- This standalone program will need to access multiple environments so it will be dedicated to run on different box.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you have a class in an EAR file which is part of a web application. Then your question is how to expose an object of that class so that it can be accessed externally. Hopefully this will help produce an answer from somebody who knows something about this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!