class JmsPoolJMSContext implements JMSContext, AutoCloseable {

    @Override
    public JMSProducer createProducer() {
        if (connectionRefCount.get() == 0) {
            throw new IllegalStateRuntimeException("The Connection is closed");
        }

        try {
            if (sharedProducer == null) {
                synchronized (this) {
                    if (sharedProducer == null) {
                        sharedProducer = (JmsPoolMessageProducer) getSession().createProducer(null);
                    }
                }
            }

            return new JmsPoolJMSProducer(getSession(), sharedProducer);
        } catch (JMSException jmse) {
            throw JMSExceptionSupport.createRuntimeException(jmse);
        }
    }

    public  JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode);
    private  JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode, AtomicLong connectionRefCount);

}