Installing the WebSphere MQ File Transfer Edition JEE database logger with WebSphere Application Server Community Edition
Follow these instructions to install and configure the JEE database logger with WebSphere® Application Server Community Edition.
Before you begin
About this task
Procedure
- Deploy the WebSphere Application Server resource
adapter, wmq.jmsra.rar. Note: If you have already deployed the WebSphere MQ File Transfer Edition Web Gateway in your WebSphere Application Server Community Edition environment, you already have a WebSphere MQ resource adapter. In this case you need to uninstall that instance of the resource adapter and redeploy using a plan file that contains the combined resources for both the Web Gateway and the JEE database logger.
- To deploy the WebSphere Application Server resource
adapter for a JEE database logger using a coordination queue manager
QM_JUPITER, perform the following steps. This example applies when
your WebSphere Application Server Community Edition
instance is running on the same system as the WebSphere Application Server queue manager that you want
to connect to.
- Create a plan file that defines a connection to the
WMQFTE coordination queue manager. The following example plan file
defines a connection to a queue manager called QM_JUPITER, and a reference
to a queue called SYSTEM.FTE.DATABASELOGGER.REJECT on that queue manager.
To use this plan file in your environment change QM_JUPITER to the name of your coordination queue manager.<?xml version="1.0" encoding="UTF-8"?> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"> <resourceadapter> <resourceadapter-instance> <resourceadapter-name>WMQ</resourceadapter-name> <workmanager> <gbean-link>DefaultWorkManager</gbean-link> </workmanager> </resourceadapter-instance> <outbound-resourceadapter> <connection-definition> <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface> <connectiondefinition-instance> <name>jms/WMQFTEJEEDBLoggerRejectQueueCF</name> <config-property-setting name="queueManager">QM_JUPITER</config-property-setting> <config-property-setting name="transportType">BINDINGS</config-property-setting> <connectionmanager> <xa-transaction> <transaction-caching/> </xa-transaction> <single-pool> <max-size>10</max-size> <min-size>1</min-size> <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds> <idle-timeout-minutes>2</idle-timeout-minutes> <match-all /> </single-pool> </connectionmanager> </connectiondefinition-instance> </connection-definition> </outbound-resourceadapter> </resourceadapter> <adminobject> <adminobject-interface>javax.jms.Queue</adminobject-interface> <adminobject-class>com.ibm.mq.connector.outbound.MQQueueProxy</adminobject-class> <adminobject-instance> <message-destination-name>jms/WMQFTEJEEDBLoggerRejectQueue</message-destination-name> <config-property-setting name="baseQueueManagerName">QM_JUPITER</config-property-setting> <config-property-setting name="baseQueueName">SYSTEM.FTE.DATABASELOGGER.REJECT</config-property-setting> </adminobject-instance> </adminobject> </connector>
- Open the WebSphere Application Server CE administration console.
- From the Common Console Actions list on the Welcome page, click Deploy New Applications > Deploy New.
- In the Archive field, enter mq_install_root/java/lib/jca/wmq.jmsra.rar
- In the Plan field, type the path to the plan file you created in Step 1a.
- Create a plan file that defines a connection to the
WMQFTE coordination queue manager. The following example plan file
defines a connection to a queue manager called QM_JUPITER, and a reference
to a queue called SYSTEM.FTE.DATABASELOGGER.REJECT on that queue manager.
- If your WebSphere Application Server Community
Edition instance is running on a different system to the WebSphere Application Server queue manager that you want
to connect to, perform the following steps to deploy the WebSphere MQ resource adapter.
Create a plan file that defines a connection to the WMQFTE coordination queue manager. The following example plan file defines a connection to a queue manager, QM_SATURN, that is located on a different system to your WebSphere Application Server Community Edition installation, and a reference to a queue called SYSTEM.FTE.DATABASELOGGER.REJECT on that queue manager. The host name of QM_SATURN is saturn.example.com. The port of QM_SATURN is 1415. The channel of QM_SATURN is SYSTEM.DEF.SVRCONN.
Because the application server and the queue manager are on different systems, you must use a client mode connection to the queue manager. The following plan file sets the value of the <config-property-setting> element that has the name transportType to CLIENT.
To use this plan file in your environment change QM_SATURN to the name of your coordination queue manager. Change the value of the host name, port and channel to the values for your coordination queue manager.<?xml version="1.0" encoding="UTF-8"?> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"> <resourceadapter> <resourceadapter-instance> <resourceadapter-name>WMQ</resourceadapter-name> <workmanager> <gbean-link>DefaultWorkManager</gbean-link> </workmanager> </resourceadapter-instance> <outbound-resourceadapter> <connection-definition> <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface> <connectiondefinition-instance> <name>jms/WMQFTEJEEDBLoggerRejectQueueCF</name> <config-property-setting name="queueManager">QM_SATURN</config-property-setting> <config-property-setting name="transportType">CLIENT</config-property-setting> <config-property-setting name="channel">SYSTEM.DEF.SVRCONN</config-property-setting> <config-property-setting name="hostName">saturn.example.com</config-property-setting> <config-property-setting name="port">1415</config-property-setting> <connectionmanager> <xa-transaction> <transaction-caching/> </xa-transaction> <single-pool> <max-size>10</max-size> <min-size>1</min-size> <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds> <idle-timeout-minutes>2</idle-timeout-minutes> <match-all /> </single-pool> </connectionmanager> </connectiondefinition-instance> </connection-definition> </outbound-resourceadapter> </resourceadapter> <adminobject> <adminobject-interface>javax.jms.Queue</adminobject-interface> <adminobject-class>com.ibm.mq.connector.outbound.MQQueueProxy</adminobject-class> <adminobject-instance> <message-destination-name>jms/WMQFTEJEEDBLoggerRejectQueue</message-destination-name> <config-property-setting name="baseQueueManagerName">QM_SATURN</config-property-setting> <config-property-setting name="baseQueueName">SYSTEM.FTE.DATABASELOGGER.REJECT</config-property-setting> </adminobject-instance> </adminobject> </connector>
- Copy the file mq_install_root/java/lib/jca/wmq.jmsra.rar from the system where WebSphere Application Server is installed to the system where WebSphere Application Server CE is installed.
- Open the WebSphere Application Server CE administration console.
- From the Common Console Actions list on the Welcome page, click Deploy New Applications > Deploy New.
- In the Archive field, type the path to the copy of the wmq.jmsra.rar file that you obtained.
- In the Plan field, type the path to the plan file you created.
- To deploy the WebSphere Application Server resource
adapter for a JEE database logger using a coordination queue manager
QM_JUPITER, perform the following steps. This example applies when
your WebSphere Application Server Community Edition
instance is running on the same system as the WebSphere Application Server queue manager that you want
to connect to.
- You must define a database connector so that the JEE database
logger application has access to the required database from within
the WebSphere Application Server Community Edition
environment. Note: If you have already deployed the WebSphere MQ File Transfer Edition Web Gateway in your WebSphere Application Server Community Edition environment, you already have a database connector defined. In this case you do not need to repeat these steps.Carry out the following steps from the WebSphere Application Server Community Edition administration console:
- Depending on the level of WebSphere Application Server Community Edition that you are using, from the Console Navigation either select Services > Database Pools, or select Resources > Datasources.
- Create a database pool using the Geronimo database pool wizard. In the Name of Database Pool field, type jdbc/wmqfte-database.
- For the Database Type select DB2 XA or Oracle Thin, as appropriate for your database.
- Click Next.
- In the Driver jar field, select the appropriate jar for your database.
- In the Database Name field, type the name of the database you are connecting to for transfer status information.
- In the User Name field, type the user name for connecting to and authenticating with your database.
- In the Password and Confirm Password fields, type the password for authenticating with your database.
- In the Port Number field, type the port number you are using if it is not the default port.
- Ensure that the value for Driver Type is 4.
- Select XA from the Transaction Type list.
- Click Deploy.
- Update the WebSphere MQ
File Transfer Edition JEE
database logger application openejb-jar.xml file
for your environment. Use a Java™ SDK
jar utility to complete the following steps:
- Extract the EJB jar file from the supplied EAR file
by running the following command:
where ear_file_name is com.ibm.wmqfte.databaselogger.jee.ear or com.ibm.wmqfte.databaselogger.jee.oracle.ear depending on whether you are using DB2® or Oracle. The EAR file is located in the install_directory/web directory of the WebSphere MQ File Transfer Edition Server installation.jar -xf ear_file_name com.ibm.wmqfte.databaselogger.jee.ejb.jar
- Extract the META-INF/openejb-jar.xml file
from the previously extracted EJB jar file, com.ibm.wmqfte.databaselogger.jee.ejb.jar,
by running the following command:
jar -xf com.ibm.wmqfte.databaselogger.jee.ejb.jar META-INF/openejb-jar.xml
- Use a text editor to edit the extracted META-INF/openejb-jar.xml file.
Change the following activation-config-property values
to match your environment:
- queueManager
- The name of the WebSphere Application Server queue manager that is used by the JEE database logger.
- hostName
- The host name to use to connect to the specified WebSphere Application Server queue manager. This value is not required if you are connecting to the queue manager in bindings mode.
- transportType
- Whether to connect to the specified WebSphere Application Server queue manager in client or bindings mode.
- port
- Not required if you specified a transportType of bindings. The port to use to connect to the specified WebSphere Application Server queue manager.
- channel
- Not required if you specified a transportType of bindings. The server channel to use to connect to the specified WebSphere Application Server queue manager.
- Update the EJB jar file with the modified META-INF/openejb-jar.xml file,
by running the following command:
jar -uf com.ibm.wmqfte.databaselogger.jee.ejb.jar META-INF/openejb-jar.xml
- Update the supplied ear file with the updated EJB jar
file, by running the following command:
where ear_file_name is com.ibm.wmqfte.databaselogger.jee.ear or com.ibm.wmqfte.databaselogger.jee.oracle.ear depending on your database.jar -uf ear_file_name com.ibm.wmqfte.databaselogger.jee.ejb.jar
- Extract the EJB jar file from the supplied EAR file
by running the following command:
- To deploy the EAR file to the application server, carry
out the following steps from the WebSphere Application Server Community
Edition administration console.
- Select: Applications > Deploy New from the Console Navigation menu.
- In the Archive field, specify the EAR file: com.ibm.wmqfte.databaselogger.jee.ear or com.ibm.wmqfte.databaselogger.jee.oracle.ear depending on your database.
- Leave the Plan field blank.
- Ensure the Start application after install box is selected.
- Click Install. The JEE database logger application is installed and started.

Feedback
