use of org.omg.PortableServer.ServantLocator in project Payara by payara.
the class POAProtocolMgr method getRemoteNamingReference.
private org.omg.CORBA.Object getRemoteNamingReference(Remote remoteNamingProvider) {
final ServantLocator locator = new RemoteNamingServantLocator(orb, remoteNamingProvider);
final PresentationManager pm = ORB.getPresentationManager();
String repositoryId;
try {
repositoryId = pm.getRepositoryId(remoteNamingProvider);
} catch (Exception exc) {
throw new RuntimeException(exc);
}
final List<Policy> policies = new ArrayList<Policy>();
final ReferenceFactory rf = getRFM().create("RemoteSerialContextProvider", repositoryId, policies, locator);
// arbitrary
final byte[] oid = { 0, 3, 5, 7, 2, 37, 42 };
final org.omg.CORBA.Object ref = rf.createReference(oid);
return ref;
}
Aggregations