How do I use JMS without an EJB tier?

How do I use JMS without an EJB tier?

I am new to JMS. How do I use JMS without an EJB tier? For example, I want to use J2ME + servlet+XML+Javabean+JMS in a mobile application project.

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to keep you informed on recent service-oriented architecture (SOA) and SOA-related topics such as integration, governance, Web services, Cloud and more.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSOA.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSOA.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Without an EJB tier, you would write stand-alone server applications that import the javax.jms package, and which use the JMS API for sending or receiving messages.

To link a J2ME application to a JMS backend, you have the following options:

- Write a Servlet which calls the JMS API. Let the J2ME client communicate with the Servlet over HTTP. Also, you will need a JMS server application which exchanges JMS messages with the Servlet. You can see the Servlet as a "JMS Proxy" performing JMS operations on behalf of the J2ME client.

- Use a Wireless JMS client library on the J2ME device. That leads to an elegant end-to-end JMS solution. No Servlets required!

This was first published in June 2002