Changes in the Java API

The IPC Java API provides now a helper class which can be used for publishing CORBA objects to IPC naming service. The new class is called ipc.Servant and can be used as described below.
#include <ipc/ipc.idl>

module ipc
{
interface test : ipc::servant
{
string ping_s(in string bytes);
oneway void ping_a(in string bytes);
};
};
import ipc.*;

class TestServant extends ipc.Servant<ipc.test>
implements ipc.testOperations
{
TestServant( Partition partition, String name )
{
super( partition, name );
}

public java.lang.String ping_s( java.lang.String in )
{
return in;
}

public void ping_a( java.lang.String in )
{
return ;
}
}
TestServant t = new TestServant( new Partition( partition_name ), object_name );
t.publish();
This makes the new object registered in IPC naming service, so any application can get a reference to that object via the ipc.Partition.lookup( object_name ) function and call methods which are delcared in the IDL file.