Versions Compared

Key

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

...

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





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





  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.





  5. Select Next once done.





  6. Select Add Connection Factory on the next page.





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





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





  9. Select Add Destination on the next screen.





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





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





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





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





Creating a EJB Project

  1. Right click under project explorer and Select New-> Project-> EJB Project.


    Image Added


  2. Name the project as MessageDrivenBean and Select Next.


    Image Added


  3. On the next screen keep defaults and select Next.


    Image Added


  4. On the next screen uncheck Generate Deployment Descriptor and select Next.


    Image Added


  5. Next screen suggests to configure Geronimo Deployment Plan. For current tutorial we are keeping the default values.


    Image Added


    This creates the skeleton of the EJB project. Next step is to add a pojo to our project and annotate it.
  6. Right click on EJB project and select New->class.


    Image Added


  7. Name the class as AdminMDB and package as mdb. Select Finish.


    Image Added