ActiveMQ Modularization
IBM® Sterling B2B Integrator uses ActiveMQ as part of its ASI (application server independent) deployment mode.
- ActiveMQ can be clustered when Sterling B2B Integrator is clustered.
- ActiveMQ runs in its own JVM with its own dynamic classpath which eliminates the dependencies that have made upgrades difficult in the past.
- Applications that require a JMS system can use the
modularized ActiveMQ. Important: You must not use the modularized ActiveMQ bundled in Sterling B2B Integrator as a JMS server for other JMS Clients and applications to connect and exchange data.
Installation and Configuration
No additional setup or configuration is necessary to use modularized ActiveMQ. The Sterling B2B Integrator installation process configures the system to use it out of the box for both cluster ActiveMQ and non-cluster ActiveMQ.
However, if you plan to use clustering, you may choose a different configuration by editing the activemqconfig.xml file. Before editing this file, read the readme_cluster.txt file. It contains information about how to use the options in the activemqconfig.xml file. Both files are located in the Sterling B2B Integrator install_dir/activemq/conf folder.
Standalone ActiveMQ Commands
- To start the standalone ActiveMQ server, first ensure the ActiveMQ dynamic configuration file (activemqconfig.xml.in) and ActiveMQ configuration XML file (activemqconfig.xml) are present in the <install_dir>/install/activemq/conf directory. Then, from the install_dir/bin, run:startActiveMQ.sh (startActiveMqWindowService.cmd)
- To stop the standalone ActiveMQ server, from the install_dir/bin, run:stopActiveMQ.sh (stopActiveMqWindowService.cmd)
Monitoring ActiveMQ Activity from jconsole
- Install the supported JDK on your computer. Refer to the system requirements for this information.
- Find the ACTIVEMQ_JMX_PORT in install_dir/properties/sandbox.cfg after the Sterling B2B Integrator environment comes up, and make a note of it. You will need this port number later in this procedure.
- In Windows, open a command prompt window (run cmd.exe from the Windows Start > Run option).
- Type the following command: cd <jdk_dir>\bin run jconsole (where <jdk_dir> is the name of the jdk home directory).
- In the jconsole, select the Advanced tab.
- Paste the following in the jmx field: service:jmx:rmi:///jndi/rmi://host:<ACTIVEMQ_JMX_PORT>/jmxrmi (where <ACTIVEMQ_JMX_PORT> is the port number you looked up in Step 2).
- Click Connect.
- Follow the directory to find ActiveMQ.
Mandatory Startup for ActiveMQ
The startActivemqMandatory parameter in the install_dir/properties/activeMQ.properties file controls whether the remaining processes are started if ActiveMQ fails to start. The default setting for this parameter is false. To change this, you can create an extension file for Sterling B2B Integrator (for example, activeMQ.properties_clumpName_ext.in) and specify the following entry:startActivemqMandatory=true|false
Where:
True = if activemq fails to start, the rest of processes will not be started.
False = if activemq fails to start, continue to start the rest of the processes.
- To start the standalone ActiveMQ server, first ensure the ActiveMQ dynamic configuration file (activemqconfig.xml.in) and ActiveMQ configuration XML file (activemqconfig.xml) are present in the install_dir/activemq/conf directory. Then, from the install_dir/bin, run:startActiveMQ.sh (startActiveMqWindowService.cmd)
- To stop the standalone ActiveMQ server, from the install_dir/bin, run:stopActiveMQ.sh (stopActiveMqWindowService.cmd)
Using an External ActiveMQ Environment
ActiveMQ is bundled in the install; however you can use a different ActiveMQ environment by modifying certain files. The bundled ActiveMQ is version 5.1.
- Shut down your environment.
- Change ACTIVEMQ_PORT in sandbox.cfg to point to your own ActiveMQ environment.
- Remove startActiveMQ.sh from install_dir/bin/run.sh.in.
- Remove stopActiveMQ.sh from install_dir/bin/hardstop.sh.in.
- In the install_dir/event.properties.in file, change remote.protocol_config=client connection to your ActiveMQ environment.
- Run install_dir/bin/setupfile.sh.
- Restart your environment.
Changing the Cluster Setting for Bundled ActiveMQ
The configuration file for the bundled ActiveMQ is install_dir/activemq/conf/activemqconfig.xml.
You can manually change the broker setting to fit your Sterling B2B Integrator needs. You can also extend this file with activemqconfig_clumpname_ext.xml to configure your own beans.
Enabling and Accessing the ActiveMQ Admin UI
- Go to <install dir>/activemq/conf/activemqconfig.xml.in
- Uncomment the following
section:
<!-- <jetty xmlns= "http://mortbay.com/schemas/jetty/1.0" SCIOverrideName="activemq-ui"> <connectors> <nioConnector port="&ACTIVEMQ_CONSOLE_UI_PORT;" /> </connectors> <userRealms> <jaasUserRealm name="adminRealm" loginModuleName="adminLoginModule" callbackHandlerClass="org.mortbay.jetty.plus.jaas.callback.DefaultCallbackHandler"> </jaasUserRealm> </userRealms> <handlers> <webAppContext contextPath="/admin" resourceBase="&INSTALL_DIR;/activemq/webapps/admin"logUrlOnStart="true" /> </handlers> </jetty> --> - Stop Sterling B2B Integrator.
- Run <install dir>/bin/setupfiles.sh.
- Start Sterling B2B Integrator.
- Use the following information for the URL:
Where server_name is the name of the Sterling B2B Integrator server, and port_number is the base port number of the Sterling B2B Integrator server plus 58.http://server_name:port_number/admin - Enter your user name and password for UI access authentication. There are two default users available. For information about the two default users, or about creating or deleting a user, see readme_admin_ui.txt in install_dir/activemq/conf.