/** * Deploy the resource into the server's runtime naming context * * @param resource a resource object * @throws Exception thrown if fail */ public void actualDeployResource(Object resource, PoolInfo poolInfo) { if(_logger.isLoggable(Level.FINE)){ _logger.fine(" JdbcConnectionPoolDeployer - actualDeployResource : " + poolInfo); } JdbcConnectionPool adminPool = (JdbcConnectionPool) resource; try { ConnectorConnectionPool connConnPool = createConnectorConnectionPool(adminPool, poolInfo); registerTransparentDynamicReconfigPool(poolInfo, adminPool); //now do internal book keeping runtime.createConnectorConnectionPool(connConnPool); } catch (Exception e) { Object params[] = new Object[]{poolInfo, e}; _logger.log(Level.WARNING, "error.creating.jdbc.pool", params); } }
/** * Creates connector connection pool pertaining to sun-ra.xml. This is * only for 1.0 complient rars. * * @throws ConnectorRuntimeException Thrown when pool creation fails. */ private void createSunRAConnectionPool() throws ConnectorRuntimeException { String defaultPoolName = connectorRuntime_.getDefaultPoolName( moduleName_, connectionDefs_[0].getConnectionFactoryIntf()); String sunRAPoolName = defaultPoolName + ConnectorConstants.SUN_RA_POOL; PoolInfo poolInfo = new PoolInfo(sunRAPoolName); ConnectorDescriptorInfo connectorDescriptorInfo = ConnectorDDTransformUtils.getConnectorDescriptorInfo(connectionDefs_[0]); connectorDescriptorInfo.setRarName(moduleName_); connectorDescriptorInfo.setResourceAdapterClassName(desc_.getResourceAdapterClass()); ConnectorConnectionPool connectorPoolObj = ConnectionPoolObjectsUtils.createSunRaConnectorPoolObject(poolInfo, desc_, moduleName_); connectorPoolObj.setConnectorDescriptorInfo(connectorDescriptorInfo); connectorRuntime_.createConnectorConnectionPool(connectorPoolObj); if(_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Created SUN-RA connection pool:", poolInfo); } String jndiName = (String) desc_.getSunDescriptor(). getResourceAdapter().getValue(ResourceAdapter.JNDI_NAME); ResourceInfo resourceInfo = new ResourceInfo(jndiName); connectorRuntime_.createConnectorResource(resourceInfo, poolInfo, null); if(_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Created SUN-RA connector resource : ", resourceInfo); } }
connectorRuntime_.createConnectorConnectionPool(connectorPoolObj); if(_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Created default connection pool [ "+ poolInfo + " ] ");
_logger.log(Level.FINE, "Calling backend to add connectorConnectionPool", domainCcp.getResourceAdapterName()); runtime.createConnectorConnectionPool(ccp, defName, domainCcp.getResourceAdapterName(), domainCcp.getProperty(), domainCcp.getSecurityMap()); if(_logger.isLoggable(Level.FINE)) {