Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
{scrollbar}

To configure JMS, the JMS Resources portlet is available on the Geronimo Administration Console. From this portlet you can not only list available resources but also create new ones for ActiveMQ already available in Geronimo or for another JMS provider.

Creating a JMS Resource Group for ActiveMQ

When geronimo is started a default ActiveMQ Resource Adapter (RA) is available in the server as shown in the above figure. The portlet lists Connection Factory and Destination details for the Active MQ RA
(geronimo/activemq/1.1/car). This configuration contains a Connection Factory and two Queue's

  • DefaultActiveMQConnectionFactory
  • MDBTransferBeanOutQueue
  • SendReceiveQueue

This RA is deployed with server scope and hence visible for applications in the server.

A new JMS Resource Group can be created by clicking the link For ActiveMQ.

Now enter the details to create a new RA. We will create a new RA called TestJActiveMQRA.

Resource Group Name - TestActiveMQRA
ServerUrl - tcp://localhost:61616 [ Port on which Active MQ is available ]
UserName - defaultUser
Password - defaultPassword

Once you enter the basic configuration details for RA and click Next the wizard moves to the next screen. You can now add Connection Factory and Destination to RA.

Click on Add Connection Factory to add Connection Factory types supported by the RA. The default ActiveMQ RA supports three ConnectionFactory types that are listed in the drop down box. Select the ConnectionFactory type you want to create. For e.g) QueueConnectionFactory and click Next

In this screen you will enter details to configure the Connection Factory.

Select QueueConnectionFactory from the drop down list and enter details to create a new Queue Connection Factory.

Connection Factory Name - TestActiveMQQCF
Transaction Support - XA

Click Next and the wizard moves ot next screen where you can add other details to complete the RA. The portlet lists TestActiveMQQCF that we created in the previous step.

Click on Add Destination to add a Queue or Topic to the RA.

Select Queue from the drop down list and add details to add a Queue to RA.

Message Destination Name - TestQ
Physical Name - TestQ

Click Next and you can see the Portlet lists TestActiveMQQCF and TestQ. You can continue adding to the RA or deploy the RA. The portlet also shows a button to view the plan.

Once you click Deploy the plan is deployed to geronimo. The portlet now lists a new configuration that is deployed and running on the server. ( TestActiveMQRA (console.jms/TestActiveMQRA/1.0/rar) ) . This configuration contains the Queue Connection Factory and Queue we created.

Creating a JMS Resource Group for Another JMS Provider

In the previous section we created a JMS Resource Group for ActiveMQ. We can also deploy other JMS Resource Adapters using the portlet and clicking on link For another JMS provider.

For the RA to appear here it should be installed in geronimo repository. You can use the link Services Common Libs that appears in left pane of console to copy the RAR into the repository.

Select the RAR file to be copied to repository and enter details Group,Artifact,Version,Type. Now when u click on link For another JMS provider you will see the RA you copied to repository in the drop down list. Select this RA and enter the following details

  • Basic Configuration Information
  • Connection Factory Information
  • Destination Information

These details depend on the RA and based on the deployment descriptor for RA the required details will appear as text boxes in the portlet. Once u enter all the details the RA can be deployed to the server.

In the above sections we saw how to create a RA for ActiveMQ and also for other JMS Providers using the portlet wizard. The wizard helps in creating the plan and provides a console interface to enter details for the geronimo deployment plan and deploying the plan to server.