return invocation.invokeNext();
return null;
   public Object handleSend(Invocation invocation) throws Throwable   {       MethodInvocation mi = (MethodInvocation)invocation;            Object[] args = mi.getArguments();            Destination destination = (Destination)args[0];      Message m = (Message)args[1];      int deliveryMode = ((Integer)args[2]).intValue();      int priority = ((Integer)args[3]).intValue();      long timeToLive = ((Long)args[4]).longValue();      // configure the message for sending, using attributes stored as metadata      String messageID = generateMessageID();      m.setJMSMessageID(messageID);            ProducerState theState = getState(mi);      if (deliveryMode == -1)      {         //Use the delivery mode of the producer         deliveryMode = theState.getDeliveryMode();         if (log.isTraceEnabled()) { log.trace("Using producer's default delivery mode: " + deliveryMode); }      }      m.setJMSDeliveryMode(deliveryMode);      if (priority == -1)      {         //Use the priority of the producer         priority = theState.getPriority();         if (log.isTraceEnabled()) { log.trace("Using producer's default priority: " + priority); }      }      m.setJMSPriority(priority);      if (theState.isDisableMessageTimestamp())      {         m.setJMSTimestamp(0l);      }      else      {         m.setJMSTimestamp(System.currentTimeMillis());      }      if (timeToLive == Long.MIN_VALUE)      {         //Use time to live value from producer         timeToLive = theState.getTimeToLive();         if (log.isTraceEnabled()) { log.trace("Using producer's default timeToLive: " + timeToLive); }      }      if (timeToLive == 0)      {         //Zero implies never expires         m.setJMSExpiration(0);      }      else      {         m.setJMSExpiration(System.currentTimeMillis() + timeToLive);      }      if (destination == null)      {         //Use destination from producer         destination = theState.getDestination();                  if (destination == null)         {            throw new UnsupportedOperationException("Destination not specified");         }         if (log.isTraceEnabled()) { log.trace("Using producer's default destination: " + destination); }      }      else      {         //If a default destination was already specified then this must be same destination as that         //specified in the arguments         //Destination defaultDestination = state.destination;                  if (theState.getDestination() != null && !theState.getDestination().equals(destination))         {            throw new UnsupportedOperationException("Where a default destination is specified for the sender " +                                                    "and a destination is specified in the arguments to the " +                                                    "send, these destinations must be equal");                        }      }      m.setJMSDestination(destination);            JBossMessage toSend = null;      if (!(m instanceof MessageDelegate))      {         //It's a foreign message                  // JMS 1.1 Sect. 3.11.4: A provider must be prepared to accept, from a client,         // a message whose implementation is not one of its own.                  toSend = new JBossMessage(m);      }      else      {         //Get the actual message         MessageDelegate del = (MessageDelegate)m;         toSend = del.getMessage();         toSend.doAfterSend();         del.setSent();      }                    // send the copy down the stack      args[1] = toSend;            return invocation.invokeNext();   }