From the NetBeans Palette window, drag an instance of the JMS Session into the onMessage() method in the Java Editor.
The JMS Adapter Declaration dialog box appears.
Enter reply as the method name and click Finish.
The Java code for the JMS Session is populated into the Java Editor.
In the reply method enter the following code:
jmsSession.createProducer(message.getJMSReplyTo()).send(message);
This code sends the incoming message to the reply destination.
Save the file.
Build and deploy the project.