To configure the JMS Server, select JMS Server on the Console Navigation menu on the left hand side. You will get a list of JMS brokers available in the server and their status in the JMS Server Manager portlet. You will be also presented with the JMS Network Listeners portlet that displays all JMS network connectors.

The following figures illustrate these two portlets and options.

Adding a new JMS broker

To add a new JMS broker, click on the link Add JMS Broker. In the resulting page, you will be provided with a template for the ActiveMQ broker. The following figure illustrates the template:

It contains some customized configurations by Geronimo. It is strongly recommended that you add your own configurations based on the template file, instead of copying it from elsewhere.

  1. Enter the name of your new broker, in this example, testborker.
  2. By default, keep the placeholders in the configuration file as they are. Geronimo will replace them with real values in the runtime. Here is an example: ${activemq.brokerName}
  3. In most cases, you only have to add a new connector for the new borker. Uncomment the element for the connector. and replace the * with an available port number in your machine. Be sure to keep the placeholder style; otherwise, some advanced features such as the cluster might not work due to port conflict. xml <!-- The transport connectors expose ActiveMQ over a given protocol to clients and other brokers. For more information, see: http://activemq.apache.org/configuring-transports.html --> <transportConnectors> <!-- <transportConnector name="openwire" uri="tcp://localhost:${* + ${PortOffset}}" /> <transportConnector name="openwire2" uri="tcp://localhost:${* + ${PortOffset}}" discoveryUri="multicast://default"/> <transportConnector name="ssl" uri="ssl://localhost:${* + ${PortOffset}}"/> <transportConnector name="stomp" uri="stomp://localhost:${* + ${PortOffset}}"/> --> </transportConnectors> After you add the connector, the section should be something like: xml <transportConnector name="openwire" uri="tcp://localhost:${60000 + ${PortOffset}}"/>
  4. Click Save, and you will return to the JMS Server Manager porlet. If no errors occurred, you will be prompted that a new broker is created successfully. The JMS Network Listeners portlet will show the connectors in the new JMS broker.

Some files and folders are created after the creation of a new broker:

  • The folder var/activemq/data/brokerName will be created to hold the data for the broker.
  • A file named brokerName.xml will be created in the folder var/activemq/conf to hold your broker configuration file.

where brokerName is the name you specified for the new broker.

Add a SSL transport connector for the broker

Openwire is the default transport for ActiveMQ. In Geronimo, you can also use SSL transport to clients to connect to the broker using SSL. Follow the steps below to enable a SSL transport.

  1. Enable SSL connector section in the broker's deployment plan xml <transportConnector name="ssl" uri="ssl://localhost:${* + ${PortOffset}}"/>
  2. Copy the keystore file, such as test.ks which you intend to use for ssl verification, into <geronimo-home>/var/activemq/data/$brokerName/ directory
  3. Update sslContext in the plan xml <sslContext> <sslContext keyStore="file:${activemq.data}/test.ks" keyStorePassword="secret" trustStore="file:${activemq.data}/test.ks" trustStorePassword="secret"/> </sslContext>

Details on how to configure connection factories, queues, topics and destinations are covered in the section Configuring JMS resources.

  • No labels