git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@43 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
dd67a18c20
commit
f4b9dbe2d4
|
@ -12,7 +12,7 @@
|
||||||
<parameter name="scope" value="Application"/>
|
<parameter name="scope" value="Application"/>
|
||||||
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider "/>
|
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider "/>
|
||||||
<parameter name="loadOnStartup" value="false"/>
|
<parameter name="loadOnStartup" value="false"/>
|
||||||
<parameter name="securityDescriptor" value="@config.dir@/security-descriptor-Service.xml"/>
|
<!--parameter name="securityDescriptor" value="@config.dir@/security-descriptor-Service.xml"/-->
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<parameter name="instance" value="gcube/informationsystem/registry/Registry"/>
|
<parameter name="instance" value="gcube/informationsystem/registry/Registry"/>
|
||||||
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider"/>
|
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider"/>
|
||||||
<parameter name="loadOnStartup" value="true"/>
|
<parameter name="loadOnStartup" value="true"/>
|
||||||
<parameter name="securityDescriptor" value="@config.dir@/security-descriptor-Factory.xml"/>
|
<!--parameter name="securityDescriptor" value="@config.dir@/security-descriptor-Factory.xml"/-->
|
||||||
|
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<parameter name="scope" value="Application"/>
|
<parameter name="scope" value="Application"/>
|
||||||
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider "/>
|
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider "/>
|
||||||
<parameter name="loadOnStartup" value="false"/>
|
<parameter name="loadOnStartup" value="false"/>
|
||||||
<parameter name="securityDescriptor" value="@config.dir@/security-descriptor-Service.xml"/>
|
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@
|
||||||
<parameter name="instance" value="gcube/informationsystem/registry/Registry"/>
|
<parameter name="instance" value="gcube/informationsystem/registry/Registry"/>
|
||||||
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider"/>
|
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider"/>
|
||||||
<parameter name="loadOnStartup" value="true"/>
|
<parameter name="loadOnStartup" value="true"/>
|
||||||
<parameter name="securityDescriptor" value="@config.dir@/security-descriptor-Factory.xml"/>
|
|
||||||
|
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
collectionResourceSchema=Collection/Collection_profile.xsd
|
|
||||||
csResourceSchema=CS/CS_profile.xsd
|
|
||||||
csInstanceResourceSchema=CS/CSInstance_profile.xsd
|
|
||||||
dhnResourceSchema=DHN/DHN_profile.xsd
|
|
||||||
gLiteResourceSchema=gLite/gLiteResource_profile.xsd
|
|
||||||
riResourceSchema=RI/RI_profile.xsd
|
|
||||||
serviceResourceSchema=Service/Service_profile.xsd
|
|
||||||
externalRiResourceSchema=ExternalRI/ExternalRI_profile.xsd
|
|
||||||
vdlResourceSchema=VDL/VDL_profile.xsd
|
|
||||||
metaColResourceSchema=MetaCol/MetaCol_profile.xsd
|
|
||||||
transProgramResourceSchema=TransProgram/TransProgram_profile.xsd
|
|
||||||
genericResourceSchema=GenericResource/GenericResource_profile.xsd
|
|
||||||
collectionRegistrationFile=PullRegistration/collection.xml
|
|
||||||
csRegistrationFile=PullRegistration/cs.xml
|
|
||||||
csInstanceRegistrationFile=PullRegistration/csinstance.xml
|
|
||||||
dhnRegistrationFile=PullRegistration/dhn.xml
|
|
||||||
gLiteRegistrationFile=PullRegistration/glite.xml
|
|
||||||
riRegistrationFile=PullRegistration/ri.xml
|
|
||||||
serviceRegistrationFile=PullRegistration/service.xml
|
|
||||||
externalRiRegistrationFile=PullRegistration/externalRi.xml
|
|
||||||
vdlRegistrationFile=PullRegistration/vdl.xml
|
|
||||||
metColRegistrationFile=PullRegistration/metaColl.xml
|
|
||||||
transProgramRegistrationFile=PullRegistration/transProgram.xml
|
|
||||||
genericResourceRegistrationFile=PullRegistration/generic.xml
|
|
|
@ -22,6 +22,7 @@ import org.gcube.common.core.resources.GCUBEGenericResource;
|
||||||
import org.gcube.common.core.resources.GCUBEHostingNode;
|
import org.gcube.common.core.resources.GCUBEHostingNode;
|
||||||
import org.gcube.common.core.resources.GCUBEMCollection;
|
import org.gcube.common.core.resources.GCUBEMCollection;
|
||||||
import org.gcube.common.core.resources.GCUBEResource;
|
import org.gcube.common.core.resources.GCUBEResource;
|
||||||
|
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||||
import org.gcube.common.core.resources.GCUBEService;
|
import org.gcube.common.core.resources.GCUBEService;
|
||||||
import org.gcube.common.core.resources.GCUBETransformationProgram;
|
import org.gcube.common.core.resources.GCUBETransformationProgram;
|
||||||
import org.gcube.common.core.resources.GCUBEVRE;
|
import org.gcube.common.core.resources.GCUBEVRE;
|
||||||
|
@ -480,6 +481,7 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
||||||
|
|
||||||
|
|
||||||
switch (ResourceType.valueOf(type)){
|
switch (ResourceType.valueOf(type)){
|
||||||
|
case RunningInstance:return GHNContext.getImplementation(GCUBERunningInstance.class);
|
||||||
case ExternalRunningInstance:return GHNContext.getImplementation(GCUBEExternalRunningInstance.class);
|
case ExternalRunningInstance:return GHNContext.getImplementation(GCUBEExternalRunningInstance.class);
|
||||||
case Service: return GHNContext.getImplementation(GCUBEService.class);
|
case Service: return GHNContext.getImplementation(GCUBEService.class);
|
||||||
case Collection: return GHNContext.getImplementation(GCUBECollection.class);
|
case Collection: return GHNContext.getImplementation(GCUBECollection.class);
|
||||||
|
@ -496,6 +498,7 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ResourceType {
|
enum ResourceType {
|
||||||
|
RunningInstance,
|
||||||
ExternalRunningInstance,
|
ExternalRunningInstance,
|
||||||
Service,
|
Service,
|
||||||
Collection,
|
Collection,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.gcube.informationsystem.registry.impl.core;
|
package org.gcube.informationsystem.registry.impl.core;
|
||||||
|
|
||||||
|
|
||||||
import java.rmi.RemoteException;
|
|
||||||
|
|
||||||
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
||||||
import org.gcube.common.core.contexts.GHNContext;
|
import org.gcube.common.core.contexts.GHNContext;
|
||||||
|
@ -13,9 +12,13 @@ import org.gcube.common.core.is.publisher.ISPublisherException;
|
||||||
import org.gcube.common.core.resources.GCUBEHostingNode;
|
import org.gcube.common.core.resources.GCUBEHostingNode;
|
||||||
import org.gcube.common.core.resources.GCUBEResource;
|
import org.gcube.common.core.resources.GCUBEResource;
|
||||||
import org.gcube.common.core.resources.GCUBERunningInstance;
|
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||||
import org.gcube.informationsystem.registry.stubs.RegistryFactoryPortType;
|
|
||||||
import org.gcube.informationsystem.registry.stubs.service.RegistryFactoryServiceAddressingLocator;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author Andrea Manzi (ISTI-CNR)
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class ServiceContext extends GCUBEServiceContext{
|
public class ServiceContext extends GCUBEServiceContext{
|
||||||
|
|
||||||
public static final String JNDI_NAME="gcube/informationsystem/registry";
|
public static final String JNDI_NAME="gcube/informationsystem/registry";
|
||||||
|
@ -59,10 +62,6 @@ public class ServiceContext extends GCUBEServiceContext{
|
||||||
ISClient client = null;
|
ISClient client = null;
|
||||||
|
|
||||||
|
|
||||||
RegistryFactoryServiceAddressingLocator registryLocator = new RegistryFactoryServiceAddressingLocator();
|
|
||||||
|
|
||||||
RegistryFactoryPortType registryFactory = null;
|
|
||||||
|
|
||||||
// create GeneralQueryManager
|
// create GeneralQueryManager
|
||||||
try {
|
try {
|
||||||
client = GHNContext.getImplementation(ISClient.class);
|
client = GHNContext.getImplementation(ISClient.class);
|
||||||
|
@ -71,8 +70,6 @@ public class ServiceContext extends GCUBEServiceContext{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
registryFactory = registryLocator.getRegistryFactoryPortTypePort(FactoryContext.getContext().getEPR());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -103,6 +100,8 @@ public class ServiceContext extends GCUBEServiceContext{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ghnProfile=GHNContext.getContext().getGHN();
|
ghnProfile=GHNContext.getContext().getGHN();
|
||||||
|
|
||||||
|
@ -128,6 +127,8 @@ public class ServiceContext extends GCUBEServiceContext{
|
||||||
queryRI.setResourceName("IS-Registry");
|
queryRI.setResourceName("IS-Registry");
|
||||||
if (client.execute(queryRI, GHNContext.getContext().getDefaultScope()).size()==0) registerProfile(RegistryRIProfile,GCUBERunningInstance.TYPE);
|
if (client.execute(queryRI, GHNContext.getContext().getDefaultScope()).size()==0) registerProfile(RegistryRIProfile,GCUBERunningInstance.TYPE);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (isNotifierCodeployed) {
|
if (isNotifierCodeployed) {
|
||||||
queryRI.setEntryName( "gcube/informationsystem/notifier/Notifier");
|
queryRI.setEntryName( "gcube/informationsystem/notifier/Notifier");
|
||||||
queryRI.setResourceClass("InformationSystem");
|
queryRI.setResourceClass("InformationSystem");
|
||||||
|
|
Loading…
Reference in New Issue