/** * Move a handler from one mc to this one. * * @param obj An object of type ActiveMQSession. * @throws ResourceException Failed to associate connection. * @throws IllegalStateException ManagedConnection in an illegal state. */ @Override public void associateConnection(final Object obj) throws ResourceException { if (logger.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("associateConnection(" + obj + ")"); } if (!isDestroyed.get() && obj instanceof ActiveMQRASession) { ActiveMQRASession h = (ActiveMQRASession) obj; h.setManagedConnection(this); handles.add(h); } else { throw new IllegalStateException("ManagedConnection in an illegal state"); } }
/** * Move a handler from one mc to this one. * * @param obj An object of type ActiveMQSession. * @throws ResourceException Failed to associate connection. * @throws IllegalStateException ManagedConnection in an illegal state. */ @Override public void associateConnection(final Object obj) throws ResourceException { if (logger.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("associateConnection(" + obj + ")"); } if (!isDestroyed.get() && obj instanceof ActiveMQRASession) { ActiveMQRASession h = (ActiveMQRASession) obj; h.setManagedConnection(this); handles.add(h); } else { throw new IllegalStateException("ManagedConnection in an illegal state"); } }