From 6e71f4597050f2c21e39cf319e1f2e6a84fc8d4c Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Thu, 13 May 2010 16:25:40 +0000 Subject: [PATCH] git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@19619 82a268e6-3cf1-43bd-a215-b396298e98cf --- etc/deploy-jndi-config.xml | 4 ++-- schema/RegistryFactory.wsdl | 3 ++- .../registry/impl/porttypes/RegistryFactory.java | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/etc/deploy-jndi-config.xml b/etc/deploy-jndi-config.xml index 9ecd5eb..a03d4a4 100644 --- a/etc/deploy-jndi-config.xml +++ b/etc/deploy-jndi-config.xml @@ -109,7 +109,7 @@ - + diff --git a/schema/RegistryFactory.wsdl b/schema/RegistryFactory.wsdl index 256ece6..d25f212 100644 --- a/schema/RegistryFactory.wsdl +++ b/schema/RegistryFactory.wsdl @@ -81,7 +81,8 @@ - + + diff --git a/src/org/gcube/informationsystem/registry/impl/porttypes/RegistryFactory.java b/src/org/gcube/informationsystem/registry/impl/porttypes/RegistryFactory.java index 1e973a2..e231ed8 100644 --- a/src/org/gcube/informationsystem/registry/impl/porttypes/RegistryFactory.java +++ b/src/org/gcube/informationsystem/registry/impl/porttypes/RegistryFactory.java @@ -172,7 +172,8 @@ public class RegistryFactory extends GCUBEPortType { throw new RemoteException(msg); } try { - updateCounterInfo(resource.getID(), ResourceType.valueOf(mess.getType()), OperationType.create, Calendar.getInstance()); + updateCounterInfo(resource.getID(), ResourceType.valueOf(mess.getType()), OperationType.create, Calendar.getInstance(), mess.getProfile()); + GCUBEEvent event = new GCUBEEvent(); event.setPayload(resource); ServiceContext.getContext().getTopicProducer().notify( @@ -284,7 +285,7 @@ public class RegistryFactory extends GCUBEPortType { } try { - this.updateCounterInfo(ID, ResourceType.valueOf(mess.getType()), OperationType.update, Calendar.getInstance()); + this.updateCounterInfo(ID, ResourceType.valueOf(mess.getType()), OperationType.update, Calendar.getInstance(), xmlProfile); GCUBEEvent event = new GCUBEEvent(); event.setPayload(resource); ServiceContext.getContext().getTopicProducer().notify(ServiceContext.RegistryTopic.UPDATE, event); @@ -350,7 +351,7 @@ public class RegistryFactory extends GCUBEPortType { resource.setID(ID); event.setPayload(resource); ServiceContext.getContext().getTopicProducer().notify(ServiceContext.RegistryTopic.REMOVE, event); - updateCounterInfo(ID, ResourceType.valueOf(type),OperationType.destroy, Calendar.getInstance()); + updateCounterInfo(ID, ResourceType.valueOf(type),OperationType.destroy, Calendar.getInstance(),null); } catch (Exception e) { logger.warn("Error updating counting info for resource with ID " + ID, e); } @@ -409,11 +410,12 @@ public class RegistryFactory extends GCUBEPortType { */ private synchronized void updateCounterInfo(String ID, - ResourceType resType, OperationType opType, Calendar updateTime) + ResourceType resType, OperationType opType, Calendar updateTime, String profile) throws Exception { RegistryProperty property = new RegistryProperty(); property.setUniqueID(ID); + property.setProfile(profile); property.setOperationType(opType.name()); property.setChangeTime(updateTime); // select the type of the resource to update