use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class AdminObjectResourceDeployer method undeployResource.
/**
* {@inheritDoc}
*/
public void undeployResource(Object resource, String applicationName, String moduleName) throws Exception {
final AdminObjectResource aor = (AdminObjectResource) resource;
ResourceInfo resourceInfo = new ResourceInfo(aor.getJndiName(), applicationName, moduleName);
deleteAdminObjectResource(aor, resourceInfo);
}
use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class ConnectorResourceDeployer method deleteConnectorResource.
private void deleteConnectorResource(ConnectorResource connectorResource, ResourceInfo resourceInfo) throws Exception {
runtime.deleteConnectorResource(resourceInfo);
// In-case the resource is explicitly created with a suffix (__nontx or __PM), no need to delete one
if (ConnectorsUtil.getValidSuffix(resourceInfo.getName()) == null) {
String pmJndiName = ConnectorsUtil.getPMJndiName(resourceInfo.getName());
ResourceInfo pmResourceInfo = new ResourceInfo(pmJndiName, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
runtime.deleteConnectorResource(pmResourceInfo);
}
// Since 8.1 PE/SE/EE - if no more resource-ref to the pool
// of this resource in this server instance, remove pool from connector
// runtime
checkAndDeletePool(connectorResource);
}
use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class ConnectorResourceDeployer method deployResource.
/**
* {@inheritDoc}
*/
public void deployResource(Object resource) throws Exception {
// deployResource is not synchronized as there is only one caller
// ResourceProxy which is synchronized
ConnectorResource domainResource = (ConnectorResource) resource;
String poolName = domainResource.getPoolName();
ResourceInfo resourceInfo = ConnectorsUtil.getResourceInfo(domainResource);
PoolInfo poolInfo = new PoolInfo(poolName, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
createConnectorResource(domainResource, resourceInfo, poolInfo);
}
use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class ConnectorResourceDeployer method undeployResource.
/**
* {@inheritDoc}
*/
public void undeployResource(Object resource, String applicationName, String moduleName) throws Exception {
ConnectorResource domainResource = (ConnectorResource) resource;
ResourceInfo resourceInfo = new ResourceInfo(domainResource.getJndiName(), applicationName, moduleName);
deleteConnectorResource(domainResource, resourceInfo);
}
use of org.glassfish.resourcebase.resources.api.ResourceInfo in project Payara by payara.
the class ConnectorResourceDeployer method undeployResource.
/**
* {@inheritDoc}
*/
public synchronized void undeployResource(Object resource) throws Exception {
ConnectorResource domainResource = (ConnectorResource) resource;
ResourceInfo resourceInfo = ConnectorsUtil.getResourceInfo(domainResource);
deleteConnectorResource(domainResource, resourceInfo);
}
Aggregations