@Override
 public void stop() {
   try {
     messageConsumer.close();
   } catch (final JMSException ignored) {
   }
   jmsManager.release();
 }
 @Override
 public void start() {
   if (state.compareAndSet(State.INITIALIZED, State.STARTING)) {
     try {
       messageConsumer = jmsManager.createMessageConsumer();
       messageConsumer.setMessageListener(this);
     } catch (final JMSException e) {
       throw new LoggingException(e);
     }
   }
 }
 public JmsServer(
     final String connectionFactoryBindingName,
     final String destinationBindingName,
     final String username,
     final String password) {
   final String managerName = JmsServer.class.getName() + '@' + JmsServer.class.hashCode();
   final JndiManager jndiManager = JndiManager.getDefaultManager(managerName);
   jmsManager =
       JmsManager.getJmsManager(
           managerName,
           jndiManager,
           connectionFactoryBindingName,
           destinationBindingName,
           username,
           password);
 }