Chandan Phukan

Greenhorn
+ Follow
since Jan 10, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Chandan Phukan

I am having a peculiar problem..

I have a Server written in RMI and I am able to connect to the RMI server through a servlet provided I have to start the rmiregistry manually. But if I start the rmiregistry programatically I am unable to connect the sevlet to the rmi server.(I use my own port to start the registry)

I have also given grant permission in the catalina.policy file as well as start tomcat with -security option, but its of no use.

One interesting fact is that the same program , if a try to connect the rmi server with a normal client, the code works fine. Like if I try with a console based client it works fine, the client able to connect the rmi server.

I am using AIX box.

any idea,help will be highly appreciated.
18 years ago
A few things about it..

I am having the same problem but my servlet runs well if I don't run the rmiregistry programatically.

1. run the rmiregistry manually.
In the server code,

bind the object as :
YourServerImplClass implObj=new YourServerImplClass ();
Naming.rebind("refname",implObj);

In the servlet get the object as :
YourServerInterface infObj=(YourServerInterface)Naming.lookup("rmi://IP address wheree your rmi server runs/implObj");

Now with the help of the infObj you can access any method.

Note : Copy the servlet in webapps/ROOT/WEB-INF/classes folder.
You have to copy the stub class as well as your interface class in the classes folder.

That's all.I think it should work.As its working fine with me..

best wishes....
18 years ago
I am having a peculiar problem..

I have a Server written in RMI and I am able to connect to the RMI server through a servlet provided I have to start the rmiregistry manually. But if I start the rmiregistry programatically I am unable to connect the sevlet to the rmi server.(I use my own port to start the registry)

I have also given grant permission in the catalina.policy file as well as start tomcat with -security option, but its of no use.

One interesting fact is that the same program , if a try to connect the rmi server with a normal client, the code works fine. Like if I try with a console based client it works fine, the client able to connect the rmi server.

I am using AIX box.

any idea,help will be highly appreciated.
18 years ago