Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The application development will take you through the following

Table of Contents

Creating a Dynamic Web Project

  1. Launch Eclipse. Select File->New->Project.


    Image Added


  2. Select Web->Dynamic Web Project. Select Next.


    Image Added


  3. Name the project as WebMDB. Select Next.


    Image Added


  4. Next window displays the various project facets. Keep the default values and select Next.


    Image Added


  5. Keep the default values for the next window. Select Next->Finish.


    Image Added


    Image Added


Creating Connection Factory and Destination

In simple terms a Connection Factory is an object which is used by a client to connect to the Service provider. In our case we will be using Active MQ as the provider.
Destination is an object which is used by client to provide the target to messages produced and source of the messages to be consumed. In our case the target is going to be a queue.

Let us see how we can use the administrative console to create a Connection Factory and Message Destination.

  1. Start the server and Launch the administrative console.
  2. Under Services. Select JMS Resources.


    Image Added


  3. Under Create a new JMS Resource Group:. Select For ActiveMQ.


    Image Added


  4. On the next screen suggest a Resource Group Name. In our case we are using WebJMS. All other values can be taken as default.


    Image Added


  5. Select Next once done.


    Image Added


  6. Select Add Connection Factory on the next page.


    Image Added


  7. In the drop down box select javax.jms.QueueConnectionFactory. Select Next.


    Image Added


  8. Next give the Connection Factory Name as jms/TestConnectionFactory. Keep default for all other fields. Select Next.


    Image Added


  9. Select Add Destination on the next screen.


    Image Added


  10. Select JMS Destination Type as javax.jms.Queue. Select Next.


    Image Added


  11. Name the Message Destination Name as jms/TestQueue. Select Next.


    Image Added


  12. On the next screen Select Deploy Now. This will deploy the created Plan.


    Image Added


  13. Under JMS resources you can see the newly created connection factory and queue.


    Image Added