This example is a simple MDB which receives text messages from queue "testqueue" and prints it to System.out. You will find the output in WebSphere's SystemOut.log.
After download, unzip it and go to the "simplemdb" directory where you will find the EAR archive.
If you want to change and rebuild the example, you need Apache ant on your machine. Switch to "simplemdb/build" and call:
ant -Dlib=<was-lib-dir>
where <was-lib-dir> must point to the "lib" directory (where the j2ee.jar is stored) of WebSphere.
Connect with the administration console and log in. On the left side expand the node "Applications" and click on "Install New Application":
In the panel on the right side choose "Local file system" and use the "Browse" button to locate the "simplemdb.ear" file in the "simplemdb" directory of this example.
Choose "Next" until you are in "Step 3" of the configuration panel. On the right side choose "Activation Specification" and specify the JNDI name "swiftmqinbound1". This links this MDB to the message endpoint "swiftmqinbound1" which you've defined during the Resource Adapter configuration. The actual configuration of this Activation Specification will be done by the properties out of the ejb-jar.xml. You might take a look there (config/ejbjar/META-INF in the example zip).
Choose "Next" and then "Finish". The EAR will be deployed. Click on "Save to Master Configuration" and "Save".
The application is now deployed but not yet started. On the left side expand the node "Applications" and click on "Enterprise Applications":
On the right panel you will now see the list of installed applications:
Select "SimpleMessageApp" and click on "Start" which starts the application:
To test the example you need to send some text messages to queue "testqueue@router1". You can use the SwiftMQ example P2PSender to do that.
Switch to the router's distribution directory and there to "samples/router_network". From here run:
starter P2PSender smqp://localhost:4001 plainsocket@router1 testqueue@router1 100
It sends 100 messages to "testqueue@router1". Now have a look in WebSphere's SystemOut.log file. You should see the printouts of the MDB for each message. Note that the messages are not printed in order because the messages are processed asynchronously from up to 5 MDB instances.