public void send(Destination _destination,Message _message,int _deliveryMode,int _priority,long _timeToLive) throws JMSException {
  if (_destination == null || !(_destination instanceof Queue || _destination instanceof Topic)) {
    throw new InvalidDestinationException("Can't send message to" + " an unidentified destination: " + _destination);
  }
  if (_deliveryMode != DeliveryMode.NON_PERSISTENT && _deliveryMode != DeliveryMode.PERSISTENT)   throw new JMSException("Delivery Mode of " + _deliveryMode + " is not valid"+ " (should be "+ DeliveryMode.NON_PERSISTENT+ " integer for a Non-Persistent delivery, or "+ DeliveryMode.PERSISTENT+ " integer for a Persistent delivery).");
  if (0 > _priority || _priority > 9) {
    throw new JMSException("Message Priority of " + _priority + " is not valid"+ " (should be an integer between 0 and 9).");
  }
  GSMessageImpl message=(GSMessageImpl)_message;
  try {
    prepareMessageToSend(message,_deliveryMode,_priority,_timeToLive,_destination);
    m_session.handleSendMessage(message);
  }
 catch (  RemoteException re) {
    if (_logger.isLoggable(Level.SEVERE)) {
      _logger.log(Level.SEVERE,"Exception inside GSMessageProducerImpl.send(: " + re.toString(),re);
    }
    JMSException e=new JMSException("RemoteException : " + re.toString());
    e.setLinkedException(re);
    throw e;
  }
catch (  TransactionException te) {
    if (_logger.isLoggable(Level.SEVERE)) {
      _logger.log(Level.SEVERE,"Exception inside GSMessageProducerImpl.send(: " + te.toString(),te);
    }
    JMSException e=new JMSException("TransactionException : " + te.toString());
    e.setLinkedException(te);
    throw e;
  }
catch (  EntryAlreadyInSpaceException eaine) {
    if (_logger.isLoggable(Level.SEVERE)) {
      _logger.severe("GSMessageProducerImpl.send() EntryAlreadyInSpaceException: " + message.DestinationName + "  |  destination:  "+ _destination+ "  |  uid:  "+ message.__getEntryInfo().m_UID);
    }
    JMSException e=new JMSException("EntryAlreadyInSpaceException : " + eaine.toString());
    e.setLinkedException(eaine);
    throw e;
  }
catch (  Exception e) {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"Exception inside GSMessageProducerImpl.send(): ",e);
    }
    if (!(e instanceof InterruptedException)) {
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,e.toString(),e);
      }
      JMSException jmse=new JMSException("Exception: " + e.toString());
      jmse.setLinkedException(e);
      throw jmse;
    }
  }
}

public void send ( Destination _destination , Message _message , int _deliveryMode , int _priority , long _timeToLive ) throws JMSException { if ( _destination == null || ! ( _destination instanceof Queue || _destination instanceof Topic ) ) { throw new InvalidDestinationException ( "Can't send message to" + " an unidentified destination: " + _destination ) ; } if ( _deliveryMode != DeliveryMode . NON_PERSISTENT && _deliveryMode != DeliveryMode . PERSISTENT ) throw new JMSException ( "Delivery Mode of " + _deliveryMode + " is not valid" + " (should be " + DeliveryMode . NON_PERSISTENT + " integer for a Non-Persistent delivery, or " + DeliveryMode . PERSISTENT + " integer for a Persistent delivery)." ) ; if ( 0 > _priority || _priority > 9 ) { throw new JMSException ( "Message Priority of " + _priority + " is not valid" + " (should be an integer between 0 and 9)." ) ; } GSMessageImpl message = ( GSMessageImpl ) _message ; try { prepareMessageToSend ( message , _deliveryMode , _priority , _timeToLive , _destination ) ; m_session . handleSendMessage ( message ) ; } catch ( RemoteException re ) { if ( _logger . isLoggable ( Level . SEVERE ) ) { _logger . log ( Level . SEVERE , "Exception inside GSMessageProducerImpl.send(: " + re . toString ( ) , re ) ; } JMSException e = new JMSException ( "RemoteException : " + re . toString ( ) ) ; e . setLinkedException ( re ) ; throw e ; } catch ( TransactionException te ) { if ( _logger . isLoggable ( Level . SEVERE ) ) { _logger . log ( Level . SEVERE , "Exception inside GSMessageProducerImpl.send(: " + te . toString ( ) , te ) ; } JMSException e = new JMSException ( "TransactionException : " + te . toString ( ) ) ; e . setLinkedException ( te ) ; throw e ; } catch ( EntryAlreadyInSpaceException eaine ) { if ( _logger . isLoggable ( Level . SEVERE ) ) { _logger . severe ( "GSMessageProducerImpl.send() EntryAlreadyInSpaceException: " + message . DestinationName + "  |  destination:  " + _destination + "  |  uid:  " + message . __getEntryInfo ( ) . m_UID ) ; } JMSException e = new JMSException ( "EntryAlreadyInSpaceException : " + eaine . toString ( ) ) ; e . setLinkedException ( eaine ) ; throw e ; } catch ( Exception e ) { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , "Exception inside GSMessageProducerImpl.send(): " , e ) ; } if ( ! ( e instanceof InterruptedException ) ) { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , e . toString ( ) , e ) ; } JMSException jmse = new JMSException ( "Exception: " + e . toString ( ) ) ; jmse . setLinkedException ( e ) ; throw jmse ; } } }
sends a message with given delivery parameters for an unidentified message producer .
