/** * Lock * * @throws JMSException Thrown if an error occurs * @throws IllegalStateException The session is closed */ protected void lock() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("lock()"); } final ActiveMQRAManagedConnection mcLocal = this.mc; if (mcLocal != null) { mcLocal.tryLock(); } else { throw new IllegalStateException("Connection is not associated with a managed connection. " + this); } }
/** * Lock * * @throws JMSException Thrown if an error occurs * @throws IllegalStateException The session is closed */ protected void lock() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("lock()"); } final ActiveMQRAManagedConnection mcLocal = this.mc; if (mcLocal != null) { mcLocal.tryLock(); } else { throw new IllegalStateException("Connection is not associated with a managed connection. " + this); } }