use of org.cristalise.kernel.common.SystemKey in project kernel by cristal-ise.
the class TraceableLocator method preinvoke.
/**
************************************************************************
*
*************************************************************************
*/
@Override
public org.omg.PortableServer.Servant preinvoke(byte[] oid, org.omg.PortableServer.POA poa, String operation, org.omg.PortableServer.ServantLocatorPackage.CookieHolder cookie) {
ByteBuffer bb = ByteBuffer.wrap(oid);
long msb = bb.getLong();
long lsb = bb.getLong();
ItemPath syskey = new ItemPath(new SystemKey(msb, lsb));
Logger.msg(1, "===========================================================");
Logger.msg(1, "Item called at " + new Timestamp(System.currentTimeMillis()) + ": " + operation + "(" + syskey + ").");
try {
return Gateway.getCorbaServer().getItem(syskey);
} catch (ObjectNotFoundException ex) {
Logger.error("ObjectNotFoundException::TraceableLocator::preinvoke() " + ex.toString());
throw new org.omg.CORBA.OBJECT_NOT_EXIST();
}
}
use of org.cristalise.kernel.common.SystemKey in project kernel by cristal-ise.
the class ActiveLocator method preinvoke.
/**
************************************************************************
*
*************************************************************************
*/
@Override
public org.omg.PortableServer.Servant preinvoke(byte[] oid, org.omg.PortableServer.POA poa, String operation, org.omg.PortableServer.ServantLocatorPackage.CookieHolder cookie) {
try {
ByteBuffer bb = ByteBuffer.wrap(oid);
long msb = bb.getLong();
long lsb = bb.getLong();
AgentPath syskey = new AgentPath(new SystemKey(msb, lsb));
Logger.msg(1, "===========================================================");
Logger.msg(1, "Agent called at " + new Timestamp(System.currentTimeMillis()) + ": " + operation + "(" + syskey + ").");
return Gateway.getCorbaServer().getAgent(syskey);
} catch (ObjectNotFoundException ex) {
Logger.error("ObjectNotFoundException::ActiveLocator::preinvoke() " + ex.toString());
throw new org.omg.CORBA.OBJECT_NOT_EXIST();
} catch (InvalidItemPathException ex) {
Logger.error("InvalidItemPathException::ActiveLocator::preinvoke() " + ex.toString());
throw new org.omg.CORBA.INV_OBJREF();
}
}
Aggregations