Disabling OpenMQ in Payara Server

Photo of Steve Millidge by Steve Millidge

openmq_resized.jpgMany of our customers often use a different JMS provider in their organisation than the embedded JMS broker shipped with Payara Server, for example IBM MQSeries or ActiveMQ. Doing this often caused problems for our customers because the unconfigured OpenMQ broker could cause start up problems or delays, as well as delays in XA recovery. From Payara Server 4.1.154 onwards we've added functionality to disable the embedded OpenMQ broker. In this blog we'll talk through how to disable OpenMQ across the whole domain.


JMS Broker to DISABLED

We've added a new Broker type of DISABLED to the administration. For each base configuration you use in your domain set the configuration type to DISABLED.

 

Payara Service - Java Message Service

 (click to enlarge)

 

In the image above we are setting the Broker to disabled for the Configuration server-config. You should do this for all of your server configurations.This can also be done using the command line by running;

 

asadmin set configs.config.server-config.jms-service.type=DISABLED
asadmin set configs.config.default-config.jms-service.type=DISABLED 


where the section in bold is the name of your configuration.

 

Delete the JMS Resources

Once you have set the embedded broker to disabled the various JMS resources can be deleted.

First delete the JMS Connection Factory

 

Payara Server - JMS Connection Factories

 

The OpenMQ broker also has a Resource Adapter (jmsra) deployed which is used to integrate MDBs into JavaEE applications. The resources associated with this resource adapter should also be removed. 

 

Payara Server - Connector Connection Pools

 

This can be done from the command line in one go by running:

delete-connector-connection-pool --cascade jms/__defaultConnectionFactory-Connection-Pool

Finally the JMS resource adapter can be deleted by deleting the directory

 rm -rf  <payara-install-dir>/glassfish/lib/install/applications/jmsra

where <payara-install-dir> is the root of your Payara installation.

 

Remove JMS from the console

After all the steps above the JMS broker is disabled in your configuration. If you wish to go further, it is possible to remove the OpenMQ specific JMS sections from the administration console. To do this delete the administration console jms plugin.

rm -rf <payara-install-dir>/glassfish/modules/console-jms-plugin.jar

 

Payara Console

 

As you can see from the screenshot above there is now no Java Message Service section in the console.

That's all there is to it! Now the OpenMQ Broker has been disabled within your Payara domain.

 

 

Related Posts

Comments