当前位置: 首页>>代码示例>>Java>>正文


Java PersistenceCallback类代码示例

本文整理汇总了Java中org.globus.wsrf.PersistenceCallback的典型用法代码示例。如果您正苦于以下问题:Java PersistenceCallback类的具体用法?Java PersistenceCallback怎么用?Java PersistenceCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PersistenceCallback类属于org.globus.wsrf包,在下文中一共展示了PersistenceCallback类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    CaNanoLabServiceResourceProperties props = new CaNanoLabServiceResourceProperties();
		CaNanoLabServiceResource resource = new CaNanoLabServiceResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, CaNanoLabServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, CaNanoLabServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cananolab,代码行数:24,代码来源:CaNanoLabServiceResourceHome.java

示例2: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    PhotoSharingRegistrationResourceProperties props = new PhotoSharingRegistrationResourceProperties();
		PhotoSharingRegistrationResource resource = new PhotoSharingRegistrationResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, PhotoSharingRegistrationConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, PhotoSharingRegistrationConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:24,代码来源:PhotoSharingRegistrationResourceHome.java

示例3: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    PhotoSharingResourceProperties props = new PhotoSharingResourceProperties();
		PhotoSharingResource resource = new PhotoSharingResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, PhotoSharingConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, PhotoSharingConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:24,代码来源:PhotoSharingResourceHome.java

示例4: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    StockManagerResourceProperties props = new StockManagerResourceProperties();
		StockManagerResource resource = new StockManagerResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, StockManagerConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, StockManagerConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:24,代码来源:StockManagerResourceHome.java

示例5: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    IdentifiersNAServiceResourceProperties props = new IdentifiersNAServiceResourceProperties();
		IdentifiersNAServiceResource resource = new IdentifiersNAServiceResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, IdentifiersNAServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, IdentifiersNAServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:gsid,代码行数:24,代码来源:IdentifiersNAServiceResourceHome.java

示例6: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    CBMResourceProperties props = new CBMResourceProperties();
		CBMResource resource = new CBMResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, CBMConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, CBMConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:common-biorepository-model,代码行数:24,代码来源:CBMResourceHome.java

示例7: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    GlobalModelExchangeResourceProperties props = new GlobalModelExchangeResourceProperties();
		GlobalModelExchangeResource resource = new GlobalModelExchangeResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, GlobalModelExchangeConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, GlobalModelExchangeConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:GlobalModelExchangeResourceHome.java

示例8: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    TavernaWorkflowServiceResourceProperties props = new TavernaWorkflowServiceResourceProperties();
		TavernaWorkflowServiceResource resource = new TavernaWorkflowServiceResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, TavernaWorkflowServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, TavernaWorkflowServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:TavernaWorkflowServiceResourceHome.java

示例9: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    AuthenticationServiceResourceProperties props = new AuthenticationServiceResourceProperties();
		AuthenticationServiceResource resource = new AuthenticationServiceResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, AuthenticationServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, AuthenticationServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:AuthenticationServiceResourceHome.java

示例10: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    TransferServiceResourceProperties props = new TransferServiceResourceProperties();
		TransferServiceResource resource = new TransferServiceResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, TransferServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, TransferServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:TransferServiceResourceHome.java

示例11: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    DorianResourceProperties props = new DorianResourceProperties();
		DorianResource resource = new DorianResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, DorianConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, DorianConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:DorianResourceHome.java

示例12: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    CredentialDelegationServiceResourceProperties props = new CredentialDelegationServiceResourceProperties();
		CredentialDelegationServiceResource resource = new CredentialDelegationServiceResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, CredentialDelegationServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, CredentialDelegationServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:CredentialDelegationServiceResourceHome.java

示例13: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    GTSResourceProperties props = new GTSResourceProperties();
		GTSResource resource = new GTSResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, GTSConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, GTSConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:GTSResourceHome.java

示例14: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    GridGrouperResourceProperties props = new GridGrouperResourceProperties();
		GridGrouperResource resource = new GridGrouperResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, GridGrouperConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, GridGrouperConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:GridGrouperResourceHome.java

示例15: createSingleton

import org.globus.wsrf.PersistenceCallback; //导入依赖的package包/类
public Resource createSingleton() {
	logger.info("Creating a single resource.");
	try {
	    MetadataModelServiceResourceProperties props = new MetadataModelServiceResourceProperties();
		MetadataModelServiceResource resource = new MetadataModelServiceResource();
		if (resource instanceof PersistenceCallback) {
		      //try to load the resource if it was persisted
                 try{
                   ((PersistenceCallback) resource).load(null);
		      } catch (InvalidResourceKeyException ex){
		      	  //persisted singleton resource was not found so we will just create a new one
		          resource.initialize(props, MetadataModelServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
		      }
           } else {
                   resource.initialize(props, MetadataModelServiceConstants.RESOURCE_PROPERTY_SET, UUIDGEN.nextUUID());
           }
		
		return resource;
	} catch (Exception e) {
		logger.error("Exception when creating the resource",e);
		return null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:MetadataModelServiceResourceHome.java


注:本文中的org.globus.wsrf.PersistenceCallback类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。