/** * Creates a new physical connection to the underlying EIS resource manager. * * @param subject Caller's security information * @param cxRequestInfo Additional resource adapter specific connection request information * @return The managed connection * @throws ResourceException Thrown if a managed connection can't be created */ @Override public ManagedConnection createManagedConnection(final Subject subject, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createManagedConnection(" + subject + ", " + cxRequestInfo + ")"); } ActiveMQRAConnectionRequestInfo cri = getCRI((ActiveMQRAConnectionRequestInfo) cxRequestInfo); ActiveMQRACredential credential = ActiveMQRACredential.getCredential(this, subject, cri); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("jms credential: " + credential); } ActiveMQRAManagedConnection mc = new ActiveMQRAManagedConnection(this, cri, ra, credential.getUserName(), credential.getPassword()); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("created new managed connection: " + mc); } registerRecovery(); return mc; }
/** * Creates a new physical connection to the underlying EIS resource manager. * * @param subject Caller's security information * @param cxRequestInfo Additional resource adapter specific connection request information * @return The managed connection * @throws ResourceException Thrown if a managed connection can't be created */ @Override public ManagedConnection createManagedConnection(final Subject subject, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createManagedConnection(" + subject + ", " + cxRequestInfo + ")"); } ActiveMQRAConnectionRequestInfo cri = getCRI((ActiveMQRAConnectionRequestInfo) cxRequestInfo); ActiveMQRACredential credential = ActiveMQRACredential.getCredential(this, subject, cri); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("jms credential: " + credential); } ActiveMQRAManagedConnection mc = new ActiveMQRAManagedConnection(this, cri, ra, credential.getUserName(), credential.getPassword()); if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("created new managed connection: " + mc); } registerRecovery(); return mc; }