txSupport = containerTxSupport;
} else {
Object params[] = { mcfTS, activeResourceAdapter.getModuleName() };
String i18nMsg = localStrings.getString("ccp_adm_service.incorrect_tx_support", params);
ConnectorRuntimeException cre = new
ConnectorRuntimeException(i18nMsg);
_logger.log(Level.SEVERE, "rardeployment.incorrect_tx_support",
connectorConnectionPool.getName());
throw cre;
}
}
boolean isPM = connectorConnectionPool.isNonComponent();
boolean isNonTx = connectorConnectionPool.isNonTransactional();
ConnectorSecurityMap[] securityMaps =
connectorConnectionPool.getSecurityMaps();
RuntimeSecurityMap runtimeSecurityMap =
SecurityMapUtils.processSecurityMaps(securityMaps);
boolean lazyEnlistable = connectorConnectionPool.isLazyConnectionEnlist();
boolean lazyAssoc = connectorConnectionPool.isLazyConnectionAssoc();
if (isPM || isNonTx) {
/*
We should not do lazyEnlistment if we are an __pm
resource since we won't have an InvocationContext and
the lazy enlistment depends upon an InvocationContext
For a nonTx resource enlistment (lazy or otherwise)
doesn't come into the picture at all
*/
lazyEnlistable = false;
}
if (isPM) {
//We need to switch off lazy association here because of
//the way our Persistence layer behaves. Adding a system
//property here to allow other persistence layers to use
//lazy association with PM resources
if (lazyAssoc) {
String str = System.getProperty(
"com.sun.enterprise.resource.AllowLazyAssociationWithPM", "FALSE");
if (str.toUpperCase(Locale.getDefault()).trim().equals("FALSE")) {
lazyAssoc = false;
}
}
}
PoolMetaData pmd = new PoolMetaData(poolInfo, mcf, s, txSupport, prin,
isPM, isNonTx, lazyEnlistable, runtimeSecurityMap, lazyAssoc);
logFine(pmd.toString());
_registry.addManagedConnectionFactory(poolInfo, pmd);
}
PoolType pt = getPoolType(connectorConnectionPool);
createAndAddPool(poolInfo, pt, env);
return mcf;
}
} catch (NamingException ne) {
String i18nMsg = localStrings.getString("pingpool.name_not_bound", poolInfo);
ConnectorRuntimeException cre = new
ConnectorRuntimeException(i18nMsg);
cre.initCause(ne);
if(_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "rardeployment.jndi_lookup_failed", poolInfo);
_logger.log(Level.FINE, "", cre);
}
throw cre;
}
catch (NullPointerException ne) {
String i18nMsg = localStrings.getString("ccp_adm.failed_to_register_mcf", poolInfo);
ConnectorRuntimeException cre = new ConnectorRuntimeException(i18nMsg);
cre.initCause(ne);
_logger.log(Level.SEVERE, "mcf_add_toregistry_failed", poolInfo);
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "", cre);
}
throw cre;