/** * Creates connector connection pool in the connector container. * * @param connectorPoolObj ConnectorConnectionPool instance to be bound to JNDI. This * object contains the pool properties. * @param connectorDescInfo ConnectorDescriptorInfo object which * abstracts the connection definition values * present in ra.xml * @throws ConnectorRuntimeException When creation of pool fails. */ private void createConnectorConnectionPool( ConnectorConnectionPool connectorPoolObj, ConnectorDescriptorInfo connectorDescInfo) throws ConnectorRuntimeException { connectorPoolObj.setConnectorDescriptorInfo(connectorDescInfo); createConnectorConnectionPool(connectorPoolObj); }
/** * 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); } }
connectorPoolObj.setConnectorDescriptorInfo(connectorDescriptorInfo); connectorRuntime_.createConnectorConnectionPool(connectorPoolObj); if(_logger.isLoggable(Level.FINE)) {
cdi.setMCFConfigProperties(mergedProps); cdi.setResourceAdapterConfigProperties(connectorDescriptor.getConfigProperties()); ccp.setConnectorDescriptorInfo(cdi); ccp.setSecurityMaps(SecurityMapUtils.getConnectorSecurityMaps(securityMaps));
public ConnectorConnectionPool createConnectorConnectionPool(JdbcConnectionPool adminPool, PoolInfo poolInfo) throws ConnectorRuntimeException { String moduleName = ResourcesUtil.createInstance().getRANameofJdbcConnectionPool(adminPool); int txSupport = getTxSupport(moduleName); ConnectorDescriptor connDesc = runtime.getConnectorDescriptor(moduleName); //Create the connector Connection Pool object from the configbean object ConnectorConnectionPool conConnPool = new ConnectorConnectionPool(poolInfo); conConnPool.setTransactionSupport(txSupport); setConnectorConnectionPoolAttributes(conConnPool, adminPool); //Initially create the ConnectorDescriptor ConnectorDescriptorInfo connDescInfo = createConnectorDescriptorInfo(connDesc, moduleName); connDescInfo.setMCFConfigProperties( getMCFConfigProperties(adminPool, conConnPool, connDesc)); //since we are deploying a 1.0 RAR, this is null connDescInfo.setResourceAdapterConfigProperties((Set) null); conConnPool.setConnectorDescriptorInfo(connDescInfo); return conConnPool; }
clone.setConnectorDescriptorInfo(cdi); clone.setNonComponent(isNonComponent()); clone.setNonTransactional(isNonTransactional());