use of org.glassfish.connectors.config.ConnectorResource in project Payara by payara.
the class ConnectionFactoryDefinitionDeployer method deployResource.
public void deployResource(Object resource) throws Exception {
final ConnectionFactoryDefinitionDescriptor desc = (ConnectionFactoryDefinitionDescriptor) resource;
String poolName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(), CFDPOOL);
String resourceName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(), desc.getResourceType());
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "ConnectionFactoryDefinitionDeployer.deployResource() : pool-name [" + poolName + "], " + " resource-name [" + resourceName + "]");
}
ConnectorConnectionPool connectorCp = new MyConnectorConnectionPool(desc, poolName);
// deploy pool
getDeployer(connectorCp).deployResource(connectorCp);
// deploy resource
ConnectorResource connectorResource = new MyConnectorResource(poolName, resourceName);
getDeployer(connectorResource).deployResource(connectorResource);
}
use of org.glassfish.connectors.config.ConnectorResource 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.connectors.config.ConnectorResource 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.connectors.config.ConnectorResource 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);
}
use of org.glassfish.connectors.config.ConnectorResource in project Payara by payara.
the class JMSConnectionFactoryDefinitionDeployer method undeployResource.
public void undeployResource(Object resource) throws Exception {
final JMSConnectionFactoryDefinitionDescriptor desc = (JMSConnectionFactoryDefinitionDescriptor) resource;
String poolName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(), JMSCFDDPOOL);
String resourceName = ConnectorsUtil.deriveResourceName(desc.getResourceId(), desc.getName(), desc.getResourceType());
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "JMSConnectionFactoryDefinitionDeployer.undeployResource() : pool-name [" + poolName + "], " + " resource-name [" + resourceName + "]");
}
// undeploy resource
ConnectorResource connectorResource = new MyJMSConnectionFactoryResource(poolName, resourceName);
getDeployer(connectorResource).undeployResource(connectorResource);
// undeploy pool
ConnectorConnectionPool connectorCp = new MyJMSConnectionFactoryConnectionPool(desc, poolName);
getDeployer(connectorCp).undeployResource(connectorCp);
}
Aggregations