connectionFactoryManager.addDestinationConfig(destinationConfig);
}
}
if (factoryConfig.getConnection().size() > 0) {
ConnectionConfig connectionConfig = factoryConfig.getConnection().get(0);
ConnectionManager connectionManager = null;
if (connectionConfig.isConnectionPerThread()) {
connectionManager = ConnectionManagerFactory.create(ConnectionManager.Policy.CONNECTION_PER_THREAD);
} else {
connectionManager = ConnectionManagerFactory.create(ConnectionManager.Policy.SHARED_CONNECTION);
}
connectionManager.setClientID(connectionConfig.getClientID());
connectionManager.setUsername(connectionConfig.getUsername());
connectionManager.setPassword(connectionConfig.getPassword());
if (connectionConfig.getSession().size() > 0) {
SessionManager sessionManager;
DestinationManager destinationManager;
SessionConfig sessionConfig = connectionConfig.getSession().get(0);
if (jndiFactory != null) {
jndiFactory._setDelegateClassLoader(classLoader);
destinationManager = new JNDIDestinationManager(jndiFactory._getProperties(), true);