_logger.fine(" ConnectorConnectionPoolDeployer:: Setting matchConnections"); ccp.setMatchConnections(toBoolean(ep.getValue(), true)); } else if ("LAZYCONNECTIONASSOCIATION".equals(ep.getName().toUpperCase())) { ConnectionPoolObjectsUtils.setLazyEnlistAndLazyAssocProperties(ep.getValue(),
/** * Rebinds the connection pool with matchning flag set. * * @param poolInfo pool for which matching need to be switched on * @throws ConnectorRuntimeException , if a Naming error occurs. */ public void switchOnMatching(PoolInfo poolInfo) throws ConnectorRuntimeException { try { ConnectorConnectionPool origCcp = getOriginalConnectorConnectionPool(poolInfo); origCcp.setMatchConnections(true); //now rebind the object in jndi String jndiNameForPool = ConnectorAdminServiceUtils.getReservePrefixedJNDINameForPool(poolInfo); _runtime.getResourceNamingService().unpublishObject(poolInfo, jndiNameForPool); _runtime.getResourceNamingService().publishObject(poolInfo, jndiNameForPool, origCcp, true); } catch (NamingException e) { ConnectorRuntimeException ex = new ConnectorRuntimeException(e.getMessage()); throw(ConnectorRuntimeException) ex.initCause(e); } }
/** * Creates default ConnectorConnectionPool consisting of default * pool values. * * @param poolInfo Name of the pool * @return ConnectorConnectionPool created ConnectorConnectionPool instance */ public static ConnectorConnectionPool createDefaultConnectorPoolObject( PoolInfo poolInfo, String rarName) { ConnectorConnectionPool connectorPoolObj = new ConnectorConnectionPool(poolInfo); connectorPoolObj.setMaxPoolSize("20"); connectorPoolObj.setSteadyPoolSize("10"); connectorPoolObj.setMaxWaitTimeInMillis("7889"); connectorPoolObj.setIdleTimeoutInSeconds("789"); connectorPoolObj.setPoolResizeQuantity("2"); connectorPoolObj.setFailAllConnections(false); connectorPoolObj.setMatchConnections(true); //always setDefaultAdvancedPoolAttributes(connectorPoolObj); try { connectorPoolObj.setTransactionSupport(getTransactionSupportFromRaXml(rarName)); } catch (Exception ex) { if(_logger.isLoggable(Level.FINE)) { _logger.fine("error in setting txSupport"); } } return connectorPoolObj; }
ccp.setMatchConnections(Boolean.valueOf(adminPool.getMatchConnections())); ccp.setAssociateWithThread(Boolean.valueOf(adminPool.getAssociateWithThread())); ccp.setConnectionLeakTracingTimeout(adminPool.getConnectionLeakTimeoutInSeconds());
conConnPool.setMatchConnections(toBoolean(rp.getValue(), false)); logFine("MATCHCONNECTIONS");
connectorPoolObj.setPoolResizeQuantity((String) "2"); connectorPoolObj.setFailAllConnections(false); connectorPoolObj.setMatchConnections(true); //always
ccp.setConnectionReclaim(Boolean.valueOf(domainCcp.getConnectionLeakReclaim())); ccp.setMatchConnections(Boolean.valueOf(domainCcp.getMatchConnections())); ccp.setAssociateWithThread(Boolean.valueOf(domainCcp.getAssociateWithThread())); ccp.setPooling(Boolean.valueOf(domainCcp.getPooling()));
origCcp.setMatchConnections(ccp.matchConnections()); origCcp.setMaxConnectionUsage(ccp.getMaxConnectionUsage()); origCcp.setNonComponent(ccp.isNonComponent());
clone.setNonTransactional(isNonTransactional()); clone.setMatchConnections(matchConnections()); clone.setLazyConnectionAssoc(isLazyConnectionAssoc()); clone.setAssociateWithThread(isAssociateWithThread());