Package javax.jms

Examples of javax.jms.QueueSession.createObjectMessage()


    QueueConnection connection;
    try {
      connection = processor.getJMSConnection();
      //TODO make transacted parameterized
      session = connection.createQueueSession( false, QueueSession.AUTO_ACKNOWLEDGE );
      ObjectMessage message = session.createObjectMessage();
      message.setObject( data );
      message.setStringProperty( INDEX_NAME_JMS_PROPERTY, indexName );

      sender = session.createSender( processor.getJmsQueue() );
      sender.send( message );
View Full Code Here


      QueueConnection qc=((QueueConnectionFactory)initialContext.lookup(CONNECTION_FACTORY_JNDI_NAME)).createQueueConnection();
      Queue q=(Queue)initialContext.lookup(DESTINATION_JNDI_NAME);
      mdb_session = qc.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
      QueueSender sender = mdb_session.createSender(q);
     
      ObjectMessage om=mdb_session.createObjectMessage();
      om.setObject(sms);
      sender.send(om);
               
      mdb_session.close();
    } catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.