Skip Navigation Links | |
Exit Print View | |
Oracle Java CAPS JMS JCA Wizard User's Guide Java CAPS Documentation |
To Create an Admin Object Resource
To Create the EJB Module Project
To Create the JCA Message-Driven Bean
To Create an Admin Object Resource
To Define a JMS Session Instance
JMS messaging solutions need to satisfy the requirements of operating on a fire-and-forget or a store-and-forward basis. This messaging infrastructure is used to deliver each message to the intended recipient whether that recipient is active at the time of send or not. In a request-reply pattern, messages are delivered to the messaging system, which immediately acknowledges that it has taken the responsibility for delivery to the ultimate recipient. That delivery might take some time if the recipient is not active for a period or might not take place at all if the recipient never appears.
Perform the following steps to initiate a request-reply transaction:
The New Project dialog box appears.
The Name and Location window appears.
The Server and Settings window appears.
The new project is created.
The New File Wizard appears.
Figure 16 New JCA Message-Driven Bean
The Name and Location window appears.
Figure 17 Configuring the Message-Driven Bean
The Choose Inbound JCA window appears.
The Edit Activation Configuration window appears.
Figure 18 Edit Activation Configuration
A new Message-Driven Bean is created.
The Create JMS Destination dialog box appears.
Figure 19 JMS Destination
The Java code for the Queue instance is populated into the Java Editor. Repeat the above steps for as many Queues that are needed.
The JMS Adapter Declaration dialog box appears.
Figure 20 JMS Adapter Declaration
The Java code for the JMS Session is populated into the Java Editor.
The Create JMS Request-Reply dialog box appears.
Figure 21 JMS Request-Reply
Select Method – Select the method you specified earlier on the JMS Adapter Declaration dialog box.
Request Message – Select message.
Request Destination – Select the JMS queue or topic you created for the adapter.
Non-transactional Connection Factory – Select a connection factory that contains “notx” in the name.
jmsSession.createProducer(queue2).send(replyMessage);
Figure 22 Request-Reply Method
The JMS Adapter Declaration dialog box appears.
Figure 23 Reply Method
The Java code for the JMS Session is populated into the Java Editor.
jmsSession.createProducer(message.getJMSReplyTo()).send(message);
Figure 24 Reply Method in the Java Editor
This code sends the incoming message to the reply destination.