Search in sources :

Example 6 with ContextService

use of org.glassfish.concurrent.config.ContextService in project Payara by payara.

the class ContextServiceManager method createResource.

private ContextService createResource(Resources param, Properties properties) throws PropertyVetoException, TransactionFailure {
    ContextService newResource = createConfigBean(param, properties);
    param.getResources().add(newResource);
    return newResource;
}
Also used : ContextService(org.glassfish.concurrent.config.ContextService)

Example 7 with ContextService

use of org.glassfish.concurrent.config.ContextService in project Payara by payara.

the class ContextServiceDeployer method undeployResource.

@Override
public void undeployResource(Object resource, String applicationName, String moduleName) throws Exception {
    ContextService contextServiceRes = (ContextService) resource;
    ResourceInfo resourceInfo = new ResourceInfo(contextServiceRes.getJndiName(), applicationName, moduleName);
    namingService.unpublishObject(resourceInfo, contextServiceRes.getJndiName());
    // stop the runtime object
    concurrentRuntime.shutdownContextService(contextServiceRes.getJndiName());
}
Also used : ResourceInfo(org.glassfish.resourcebase.resources.api.ResourceInfo) ContextService(org.glassfish.concurrent.config.ContextService)

Example 8 with ContextService

use of org.glassfish.concurrent.config.ContextService in project Payara by payara.

the class ContextServiceDeployer method deployResource.

@Override
public void deployResource(Object resource) throws Exception {
    ContextService contextServiceResource = (ContextService) resource;
    ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(contextServiceResource);
    deployResource(resource, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
}
Also used : ResourceInfo(org.glassfish.resourcebase.resources.api.ResourceInfo) ContextService(org.glassfish.concurrent.config.ContextService)

Aggregations

ContextService (org.glassfish.concurrent.config.ContextService)8 ResourceInfo (org.glassfish.resourcebase.resources.api.ResourceInfo)4 Resource (com.sun.enterprise.config.serverbeans.Resource)1 Resources (com.sun.enterprise.config.serverbeans.Resources)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 NamingException (javax.naming.NamingException)1 RefAddr (javax.naming.RefAddr)1 ActionReport (org.glassfish.api.ActionReport)1 DefaultResourceProxy (org.glassfish.api.naming.DefaultResourceProxy)1 DefaultContextService (org.glassfish.concurrent.runtime.deployer.DefaultContextService)1 ResourceStatus (org.glassfish.resourcebase.resources.api.ResourceStatus)1 SerializableObjectRefAddr (org.glassfish.resources.naming.SerializableObjectRefAddr)1 SingleConfigCode (org.jvnet.hk2.config.SingleConfigCode)1 TransactionFailure (org.jvnet.hk2.config.TransactionFailure)1 Property (org.jvnet.hk2.config.types.Property)1