コード例 #1
0
 @Override
 public Response processAddProducer(ProducerInfo info) throws Exception {
   Response resp = null;
   try {
     protocolManager.addProducer(this, info);
   } catch (Exception e) {
     if (e instanceof ActiveMQSecurityException) {
       resp = new ExceptionResponse(new JMSSecurityException(e.getMessage()));
     } else if (e instanceof ActiveMQNonExistentQueueException) {
       resp = new ExceptionResponse(new InvalidDestinationException(e.getMessage()));
     } else {
       resp = new ExceptionResponse(e);
     }
   }
   return resp;
 }