use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class ManagedExecutorServiceDeployer method undeployResource.
@Override
public void undeployResource(Object resource) throws Exception {
ManagedExecutorService managedExecutorServiceResource = (ManagedExecutorService) resource;
ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(managedExecutorServiceResource);
undeployResource(resource, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
}
use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class ManagedScheduledExecutorServiceDeployer method undeployResource.
@Override
public void undeployResource(Object resource, String applicationName, String moduleName) throws Exception {
ManagedScheduledExecutorService managedscheduledexecutorserviceRes = (ManagedScheduledExecutorService) resource;
ResourceInfo resourceInfo = new ResourceInfo(managedscheduledexecutorserviceRes.getJndiName(), applicationName, moduleName);
namingService.unpublishObject(resourceInfo, managedscheduledexecutorserviceRes.getJndiName());
// stop the runtime object
concurrentRuntime.shutdownScheduledManagedExecutorService(managedscheduledexecutorserviceRes.getJndiName());
}
use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class ManagedThreadFactoryDeployer method deployResource.
@Override
public void deployResource(Object resource) throws Exception {
ManagedThreadFactory ManagedThreadFactoryResource = (ManagedThreadFactory) resource;
ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(ManagedThreadFactoryResource);
deployResource(resource, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
}
use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class ManagedThreadFactoryDeployer method undeployResource.
@Override
public void undeployResource(Object resource, String applicationName, String moduleName) throws Exception {
ManagedThreadFactory managedThreadFactoryRes = (ManagedThreadFactory) resource;
ResourceInfo resourceInfo = new ResourceInfo(managedThreadFactoryRes.getJndiName(), applicationName, moduleName);
namingService.unpublishObject(resourceInfo, managedThreadFactoryRes.getJndiName());
// stop the runtime object
concurrentRuntime.shutdownManagedThreadFactory(managedThreadFactoryRes.getJndiName());
}
use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class CustomResourceDeployer method deployResource.
/**
* {@inheritDoc}
*/
@Override
public synchronized void deployResource(Object resource, String applicationName, String moduleName) throws Exception {
CustomResource customResource = (CustomResource) resource;
ResourceInfo resourceInfo = new ResourceInfo(customResource.getJndiName(), applicationName, moduleName);
deployResource(resource, resourceInfo);
}
Aggregations