If you chose to manually configure WebSphere® Application
Server Network Deployment,
you must create a data source in order to store JMS messages in a DB2® database.
About this task
You have the option of having
WebSphere Application
Server Network Deployment use
a
DB2 database
to store JMS messages. For more information about
WebSphere Application
Server Network Deployment message
storage, including the usage of products other than
DB2,
see
http://www-01.ibm.com/support/knowledgecenter/SSLKT6/sslkt6_welcome.html.
To create a data source for the persistent
store, complete the following steps:
Procedure
- Create a system user and password on the server hosting
the database server. For example, a user named mxsibusr with
a password of mxsibusr.
- Create and configure the database.
- Open DB2 Control
Center.
- Browse to the Databases folder listed under your system.
- Right-click the Databases folder and select .
- Create a database named maxsibdb using
default settings.
- After the database has been created, expand the maxsibdb
database and select User and Group objects.
- Right-click DB Users and select Add.
- Select mxsibusr from the User
menu.
- Grant all authorities to the mxsibusr except Security
administrator authority.
- Click Apply.
- Verify that you can connect to the database using the
mxsibusr user by right-clicking maxsibdb and
selecting Connect.
- Configure J2C authentication data and JDBC provider in WebSphere Application
Server Network Deployment.
- Open and login to the WebSphere Application
Server Network Deployment administrative
console.
- Browse to .
- Under the Authentication header, click .
- Click New.
- Complete the following fields in the User identity form.
- Alias
- maxJaasAlias
- User ID
- mxsibusr
- Password
- Password you created for mxsibusr.
- Description
- SIB database user alias.
- Click Apply, and then click Save.
- From the WebSphere Application
Server administrative console, browse to .
- Under Scope, click Show
scope selection drop-down list with the all scopes option,
select Cell=ctgCell01, and then, under Preferences,
click Apply.
- Click New.
- Specify the following values, and then
click Apply:
- Database type
- DB2
- Provider type
- DB2 Universal JDBC Driver Provider
- Implementation type
- XA data source
- Name
- maxJdbcProvider
- Click Next.
- Complete the WebSphere Application
Server variable ${DB2UNIVERSAL_JDBC_DRIVER_PATH} field with a value
of <WAS_HOME>ctgMX\lib. For example, C:\Program Files\IBM\WebSphere\AppServer\ctgMX\lib.
- Click Next.
- Click Finish.
- Click Save.
- Open a command prompt and copy <DB2_HOME>/java/db2jcc.jar and <DB2_HOME>/java/db2jcc_license_cu.jar to
the <WAS_HOME>\ctgMX\lib directory. Go back to , and correct
the class path if required for both db2jcc.jar and db2jcc_license_cu.jar.
Ensure that each jar file has the full path from ${DB2UNIVERSAL_JDBC_DRIVER_PATH}
- Configure WebSphere Application
Server:
- From the WebSphere Application
Server Network Deployment administrative
console, browse to .
- Under Scope, click Show
scope selection drop-down list with the all scopes option,
select Cell=ctgCell01, and then, under Preferences,
click Apply.
- Click New.
- Specify the following values:
- Data source name
- intjmsds
- JNDI name
- jdbc/intjmsds
- From the Component-managed authentication alias and
XA recovery authentication alias menu, select maxJaasAlias
- Click Next.
- Choose Select an existing JDBC provider,
and then select maxJdbcProvider from the menu.
- Click Next.
- Specify the following values:
- Database name
- maxsibdb
- Driver type
- 4
- Server name
- Specify the DB2 server
host name.
- Port number
- Specify the DB2 port
number. For example, 50005.
- Ensure the Use this data source in container
managed persistence (CMP) option is selected, and then
click Next.
- Click Finish.
- Click Save.
- Verify the data source by selecting intjmsds,
and then clicking Test Connection.