summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/entity/agent/ActiveLocator.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-09-19 15:40:50 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-09-19 15:40:50 +0200
commit482b98e869d07802310e249d09d784c63f9a86b6 (patch)
treebd6c55d5d5ebf967fb22b5cf1ceb9f3f6a7bbdd9 /src/main/java/com/c2kernel/entity/agent/ActiveLocator.java
parent3743d182d99dbed9d2be84dc357f6839ffe4d2ec (diff)
Introduced static method ItemPath.fromUUIDString and made the UUID
constructor protected to better handle ItemPath and AgentPath construction with String UUIDs, throwing the right exceptions.
Diffstat (limited to 'src/main/java/com/c2kernel/entity/agent/ActiveLocator.java')
-rw-r--r--src/main/java/com/c2kernel/entity/agent/ActiveLocator.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/c2kernel/entity/agent/ActiveLocator.java b/src/main/java/com/c2kernel/entity/agent/ActiveLocator.java
index 966b265..a1561ed 100644
--- a/src/main/java/com/c2kernel/entity/agent/ActiveLocator.java
+++ b/src/main/java/com/c2kernel/entity/agent/ActiveLocator.java
@@ -14,11 +14,11 @@ package com.c2kernel.entity.agent;
import java.nio.ByteBuffer;
import java.sql.Timestamp;
-import java.util.UUID;
import com.c2kernel.common.ObjectNotFoundException;
+import com.c2kernel.common.SystemKey;
import com.c2kernel.lookup.AgentPath;
-import com.c2kernel.lookup.InvalidAgentPathException;
+import com.c2kernel.lookup.InvalidItemPathException;
import com.c2kernel.process.Gateway;
import com.c2kernel.utils.Logger;
@@ -55,7 +55,7 @@ public class ActiveLocator extends org.omg.PortableServer.ServantLocatorPOA
ByteBuffer bb = ByteBuffer.wrap(oid);
long msb = bb.getLong();
long lsb = bb.getLong();
- AgentPath syskey = new AgentPath(new UUID(msb, lsb));
+ AgentPath syskey = new AgentPath(new SystemKey(msb, lsb));
Logger.msg(1,"===========================================================");
Logger.msg(1,"Agent called at "+new Timestamp( System.currentTimeMillis()) +": " + operation +
@@ -68,8 +68,8 @@ public class ActiveLocator extends org.omg.PortableServer.ServantLocatorPOA
{
Logger.error("ObjectNotFoundException::ActiveLocator::preinvoke() "+ex.toString());
throw new org.omg.CORBA.OBJECT_NOT_EXIST();
- } catch (InvalidAgentPathException ex) {
- Logger.error("InvalidAgentPathException::ActiveLocator::preinvoke() "+ex.toString());
+ } catch (InvalidItemPathException ex) {
+ Logger.error("InvalidItemPathException::ActiveLocator::preinvoke() "+ex.toString());
throw new org.omg.CORBA.INV_OBJREF();
}
}