code: public final void checkPermission( Destination destination , String action ) throws JMSException
      {
      	if (securityContext == null)
              return; // Security is disabled
      	
      	DestinationRef destinationRef = DestinationTools.asRef(destination);
      	securityContext.checkPermission(destinationRef.getResourceName(), action);        
      }
docs: Check if the connection has the required credentials to use
  the given destination