S
Sonja Garcia Burgos
Hi @all,
I`m actually working at some piece of software
with RMI and I wonder, if it is possible, to
reference in my remote class to an object wich is
not remote
Example:
//Somewhere at server side
public class Machine extends UnicastRemoteObject implements IMachine,
Serializable
{
//no RemoteObject!
private static Fields fields;
public String getMachineName()
{
return fields.getField("machine_name").getValue();
}
public void setMachineName(String val)
{
fields.setField("machine_name").setValue(val);
}
}
-------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------------------------------
//Somewhere at client side
....
IMachine machine = (IMachine)Naming.lookup....
machine.setMachineName("test");
System.out.println(machine.getMachineName());
I hope someone knows something.
greetings
Sonja
I`m actually working at some piece of software
with RMI and I wonder, if it is possible, to
reference in my remote class to an object wich is
not remote
Example:
//Somewhere at server side
public class Machine extends UnicastRemoteObject implements IMachine,
Serializable
{
//no RemoteObject!
private static Fields fields;
public String getMachineName()
{
return fields.getField("machine_name").getValue();
}
public void setMachineName(String val)
{
fields.setField("machine_name").setValue(val);
}
}
-------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------------------------------
//Somewhere at client side
....
IMachine machine = (IMachine)Naming.lookup....
machine.setMachineName("test");
System.out.println(machine.getMachineName());
I hope someone knows something.
greetings
Sonja