Search in sources :

Example 1 with JMSConnectionFactoryDefinitionDescriptor

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

Example 2 with JMSConnectionFactoryDefinitionDescriptor

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

the class JMSConnectionFactoryDefinitionDeployer method deployResource.

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

Aggregations

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