check(mi, dest, CheckType.WRITE, sess.getConnectionEndpoint());
check(dest, CheckType.WRITE, sess.getConnectionEndpoint());
   public Object handleCreateProducerDelegate(Invocation invocation) throws Throwable   {      //write permission required on the destination            //Null represents an anonymous producer - the destination      //for this is specified at send time            MethodInvocation mi = (MethodInvocation)invocation;            Destination dest = (Destination)mi.getArguments()[0];            if (dest != null)      {                        SessionAdvised del = (SessionAdvised)invocation.getTargetObject();         ServerSessionEndpoint sess = (ServerSessionEndpoint)del.getEndpoint();                                 check(mi, dest, CheckType.WRITE, sess.getConnectionEndpoint());      }            return invocation.invokeNext();   }