}
if(cachedCF == null) {
javax.naming.Context ctx = new javax.naming.InitialContext();
if (isCFPM) {
ConnectorRuntime connectorRuntime = ConnectorRuntime.getRuntime();
cachedCF = (ConnectionFactory) connectorRuntime.lookupPMResource(DEFAULT_CF_PHYS, false);
connectionFactoryPM = cachedCF;
} else {
cachedCF = (ConnectionFactory) ctx.lookup(DEFAULT_CF_PHYS);
connectionFactory = cachedCF;
}