Monday, February 8, 2010

Sending and Receiving Message Using Oracle AQ JMS

Environment:
Eclipse

aqapi.jar
javax.jms.jar
jta.jar
ojdbc14.jar

Project: OracleAQ_JMS2

I Sending Message
1. Get QueueConnectionFactory
- AQjmsFactory.getQueueConnectionFactory
2. Start QueueConnectionFactory
- qc.start();
3. Create QueurSession
- qc.createQueueSession
4. Get Destination Queue
- (AQjmsSession)m_queueSess).getQueue
5. Create Queue Sender
- m_queueSess.createSender
6. Construct Message
- m_queueSess.createTextMessage
7. Send Message
- m_sender.send
8. Queue Connection Stop and Close
-qc.stop();
-qc.close();

II Receiving Message
1. Get QueueConnectionFactory
- AQjmsFactory.getQueueConnectionFactory
2. Start QueueConnectionFactory
- qc.start();
3. Create QueurSession
- qc.createQueueSession
4. Get Source Queue
- (AQjmsSession)m_queueSess).getQueue
5. Create Queue Receiver
- m_queueSess.createReceiver
6. Receive Message
- m_receiver.receive
7. Queue Connection Stop and Close
-qc.stop(); -qc.close();

No comments:

Post a Comment