You can add a JMS control to any of the following:
To create a new JMS control and insert it into your source code in a single step:
Under New System Control, click on JMS Control and click OK.
Click on the name of the control and click OK.
Once you've set up the JMS control, you can add code to send and receive messages via JMS.
The properties of the JMS control can be set using the Properties view when the client .java file is open in the editor and the cursor is located in the JMS control name. You specify the messaging style (queue, topic or automatic) and provide the JNDI identification for the queue or topic. You also specify a connection factory for the control. For detailed information on the @JMSControl annotation and its attributes, see the JMS control documentation .
The JMS control has the following default methods:
getDestination() - returns the javax.jms.Destination
getSession() - gives you programmatic access to the JMS session.setHeaders(Map) - Sets multiple JMS headers to be assigned to the next JMS message sent.
setProperties(Map) - Sets JMS properties to be assigned to the next JMS message sent.
setProperty(String, Object) - Sets a JMS property to be assigned to the next JMS message sent.
All of the methods you define on the JMS control send or publish to the queue or topic named by the sendJndiName attribute of the @JMSControl annotation.
Consult the JMS control documentation for more information.