Posted By:
kiran_grandhi
Posted On:
Sunday, April 24, 2005 12:56 AM
Here is my problem... this is my remote interface ... public interface RI extends remote { public void sendMe(CI ) throws RemoteException; } this is my client interface ... public interface CI extends Serializable{ public void increment(); } this is my client program ... public class Client extends CI implements{ int i; public Client() { i=0; } public increment() { i++; } public static void main() { Client cl=new Client(); try {
More>>
Here is my problem...
this is my remote interface ...
public interface RI extends remote {
public void sendMe(CI ) throws RemoteException;
}
this is my client interface ...
public interface CI extends Serializable{
public void increment();
}
this is my client program ...
public class Client extends CI implements{
int i;
public Client() {
i=0;
}
public increment() {
i++;
}
public static void main() {
Client cl=new Client();
try {
RI server=(RI) Naming.lookup("rmi://localhost/serverObject");
server.sendMe(cl);
System.out.println(cl.i);
}
catch(Exception e) {
}
}
}
here is the code of the sendMe method of the Server ..
public void sendMe(CI ci) {
ci.increment();
ci.increment();
}
the client side it is printing 0 only it is not incremented what i have to do...
thanq for the answer.
i am using java 1.5
<<Less