Search in sources :

Example 1 with ConnectionFactoryDefinitionDescriptor

use of com.sun.enterprise.deployment.ConnectionFactoryDefinitionDescriptor in project Payara by payara.

the class ConnectionFactoryDefinitionDeployer method undeployResource.

public void undeployResource(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.undeployResource() : pool-name [" + poolName + "], " + " resource-name [" + resourceName + "]");
    }
    // undeploy resource
    ConnectorResource connectorResource = new MyConnectorResource(poolName, resourceName);
    getDeployer(connectorResource).undeployResource(connectorResource);
    // undeploy pool
    ConnectorConnectionPool connectorCp = new MyConnectorConnectionPool(desc, poolName);
    getDeployer(connectorCp).undeployResource(connectorCp);
}
Also used : ConnectorConnectionPool(org.glassfish.connectors.config.ConnectorConnectionPool) ConnectionFactoryDefinitionDescriptor(com.sun.enterprise.deployment.ConnectionFactoryDefinitionDescriptor) ConnectorResource(org.glassfish.connectors.config.ConnectorResource)

Example 2 with ConnectionFactoryDefinitionDescriptor

use of com.sun.enterprise.deployment.ConnectionFactoryDefinitionDescriptor 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);
}
Also used : ConnectorConnectionPool(org.glassfish.connectors.config.ConnectorConnectionPool) ConnectionFactoryDefinitionDescriptor(com.sun.enterprise.deployment.ConnectionFactoryDefinitionDescriptor) ConnectorResource(org.glassfish.connectors.config.ConnectorResource)

Aggregations

ConnectionFactoryDefinitionDescriptor (com.sun.enterprise.deployment.ConnectionFactoryDefinitionDescriptor)2 ConnectorConnectionPool (org.glassfish.connectors.config.ConnectorConnectionPool)2 ConnectorResource (org.glassfish.connectors.config.ConnectorResource)2