diff options
Diffstat (limited to 'src/main/java/com/c2kernel/entity/CorbaServer.java')
| -rw-r--r-- | src/main/java/com/c2kernel/entity/CorbaServer.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/com/c2kernel/entity/CorbaServer.java b/src/main/java/com/c2kernel/entity/CorbaServer.java index 3d7c79b..3a01ed7 100644 --- a/src/main/java/com/c2kernel/entity/CorbaServer.java +++ b/src/main/java/com/c2kernel/entity/CorbaServer.java @@ -14,8 +14,8 @@ import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.entity.agent.ActiveEntity;
import com.c2kernel.entity.agent.ActiveLocator;
import com.c2kernel.lookup.AgentPath;
-import com.c2kernel.lookup.EntityPath;
-import com.c2kernel.lookup.InvalidEntityPathException;
+import com.c2kernel.lookup.InvalidItemPathException;
+import com.c2kernel.lookup.ItemPath;
import com.c2kernel.process.Gateway;
import com.c2kernel.utils.Logger;
import com.c2kernel.utils.SoftCache;
@@ -31,14 +31,14 @@ import com.c2kernel.utils.SoftCache; public class CorbaServer {
- private final Map<EntityPath, Servant> mEntityCache;
+ private final Map<ItemPath, Servant> mEntityCache;
private POA mRootPOA;
private POA mItemPOA;
private POA mAgentPOA;
private POAManager mPOAManager;
public CorbaServer() throws InvalidDataException {
- mEntityCache = new SoftCache<EntityPath, Servant>(50);
+ mEntityCache = new SoftCache<ItemPath, Servant>(50);
// init POA
try {
@@ -119,14 +119,14 @@ public class CorbaServer { **************************************************************************/
private Servant getEntity(int sysKey, org.omg.PortableServer.POA poa) throws ObjectNotFoundException {
try {
- EntityPath entityPath = new EntityPath(sysKey);
+ ItemPath entityPath = new ItemPath(sysKey);
Servant entity = null;
synchronized (mEntityCache) {
entity = mEntityCache.get(entityPath);
if (entity == null) {
Logger.msg(7, "Creating new servant for "+sysKey);
- Class<?> entityClass = Gateway.getLDAPLookup().getEntityClass(entityPath);
+ Class<?> entityClass = Gateway.getLookup().getItemClass(entityPath);
if (entityClass == TraceableEntity.class) {
if (poa == null) poa = mItemPOA;
@@ -141,7 +141,7 @@ public class CorbaServer { }
return entity;
- } catch (InvalidEntityPathException ex) {
+ } catch (InvalidItemPathException ex) {
throw new ObjectNotFoundException("Invalid Entity Key", "");
}
}
@@ -164,10 +164,10 @@ public class CorbaServer { * @param entityPath
* @return
*/
- public Servant createEntity(EntityPath entityPath) throws CannotManageException, ObjectAlreadyExistsException {
+ public Servant createEntity(ItemPath entityPath) throws CannotManageException, ObjectAlreadyExistsException {
try {
if (entityPath == null)
- entityPath = Gateway.getLDAPLookup().getNextKeyManager().generateNextEntityKey();
+ entityPath = Gateway.getNextKeyManager().generateNextEntityKey();
} catch (Exception ex) {
Logger.error(ex);
throw new CannotManageException("Cannot generate next entity key");
|
