8.8.3 Configure the WebSphere cell

 

+

Search Tips   |   Advanced Search

 

In order to prepare your J2EE environment to run Trade 6, you have to create several resources (like JDBC and JMS resources). For example, on each appserver node there must exist a JDBC data source that points to the database tradedb you just created.

The configuration steps can be performed using the WAS console, but they would take a lot of time. Fortunately, however, Trade 6 comes with a .jacl script that can be used to configure and install Trade 6 in a clustered environment.

To run...

  1. Log on to the Deployment Manager machine

  2. Go to the Trade 6 code directory.

  3. Execute...

    <WAS_HOME>\wsadmin -f trade.jacl configure

On AIX...

  1. Log on as root user

  2. Execute...

    <WAS_HOME>/wsadmin.sh -f trade.jacl configure

 

Installation walkthrough for the Windows environment using the configure option

Due to the design of the Trade application, it is important to configure the resources on the EJBcluster and not on the WEBcluster. This is important because the messaging resources, such as the messaging engines, MDBs, and JMS queues and topics, are predominantly accessed from the EJB container. The Web components can be mapped to the WEBcluster and the Web servers later during application installation, so this is not an issue.

------------------------------------------------
 Trade Install/Configuration Script

Operation:  configure
 Silent:     false
------------------------------------------------

Global security is (or will be) enabled (true|false) [false]:

Is this a cluster installation (yes|no) [no]:
yes


-------------------------------------------------
 Collecting Cluster and Cluster Member Info

  Before proceeding, all nodes intended for
  use in this cluster must be federated with the
  deployment manager using the addNode command!
  To ensure that this process goes smoothly, it
  is also important to verify that each node can
  ping the other cluster nodes based on the host
  names configured within the WebSphere profile
  creation tool.
-------------------------------------------------

Have all nodes been federated and network connectivity
verified? (yes|no) [yes]:


Enter the cluster name [TradeCluster]:
EJBcluster


Available Nodes:
   app1Node
   app2Node
   dmNode
  http1Node
  http2Node


Select the desired node [app1Node]:

Enter the cluster member name [TradeServer1]:
Ejb1

Current Cluster Nodes and Members:
  app1Node - Ejb1

Add more cluster members (yes|no) [yes]:

Available Nodes:
   app1Node
   app2Node
   dmNode
  http1Node
  http2Node

Select the desired node [app1Node]:
app2Node

Enter the cluster member name [TradeServer2]:
Ejb2a

Current Cluster Nodes and Members:
  app1Node - Ejb1
  app2Node - Ejb2a

Add more cluster members (yes|no) [yes]:

Available Nodes:
   app1Node
   app2Node
   dmNode
  http1Node
  http2Node

Select the desired node [app1Node]:
app2Node

Enter the cluster member name [TradeServer3]:
Ejb2b

Current Cluster Nodes and Members:
  app1Node - Ejb1
  app2Node - Ejb2a
  app2Node - Ejb2b

Add more cluster members (yes|no) [yes]:
no

Cluster information obtained...
------------------------------------------------
 Collecting Database/Datasource Information
------------------------------------------------

Select the backend database type (db2|oracle) [db2]:

NOTE: wsadmin requires ";" for delimiting the database
driver path regardless of platform!

Enter the database driver path [c:/sqllib/java/db2jcc.jar;c:/sqllib/java/
db2jcc_license_cu.jar;c:/sqllib/java/db2jcc_license_cisuz.jar]:
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar;${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar

Enter the database name [tradedb]:

Enter the DB2 database hostname [localhost]:
db

Enter the DB2 database port number [50000]:

Enter the database username [db2admin]:
db2admin

Enter the database password [password]:
********

 Configuring Cluster and Cluster Members
 Scope: dmCell(cells/dmCell|cell.xml#Cell_1)
------------------------------------------------

Creating Cluster EJBcluster...
EJBcluster already exists!

Creating Cluster Member Ejb1...
Ejb1 already exists!

Enabling SIB Service on Ejb1...
SIB Service enabled successfully!

Creating Cluster Member Ejb2a...
Ejb2a already exists!

Enabling SIB Service on Ejb2a...
SIB Service enabled successfully!

Creating Cluster Member Ejb2b...
Ejb2b already exists!

Enabling SIB Service on Ejb2b...
SIB Service enabled successfully!

 Cluster Configuration Completed!!!
------------------------------------------------

 Configuring JDBC/Datasource Resources
 Scope: dmCell(cells/dmCell|cell.xml#Cell_1)
------------------------------------------------

Creating JAAS AuthData TradeDataSourceAuthData...
  Alias Name: TradeDataSourceAuthData
  User:       db2admin
  Password:   ********
TradeDataSourceAuthData created successfully!

Creating JDBC Provider DB2 Universal JDBC Driver Provider (XA)...
  Provider Name:        DB2 Universal JDBC Driver Provider (XA)
  Implementation Class: com.ibm.db2.jcc.DB2XADataSource
  XA enabled:           true
DB2 Universal JDBC Driver Provider (XA) created successfully!

Creating DataSource TradeDataSource...
  Datasource Name:       TradeDataSource
  JNDI Name:             jdbc/TradeDataSource
  Statement Cache Size:  60
  Database Name:         tradedb
  JDBC Driver Type:      4
  Hostname:              db
  Port Number:           50000

Creating Datasource properties...
  Creating Connection Pool using defaults...
  Creating Connection Factory...
TradeDataSource created successfully!

Creating JDBC Provider DB2 Universal JDBC Driver Provider...
  Provider Name:        DB2 Universal JDBC Driver Provider
  Implementation Class: com.ibm.db2.jcc.DB2ConnectionPoolDataSource
  XA enabled:           false
DB2 Universal JDBC Driver Provider created successfully!

Creating DataSource MEDataSource...
  Datasource Name:       MEDataSource
  JNDI Name:             jdbc/MEDataSource
  Statement Cache Size:  60
  Database Name:         tradedb
  JDBC Driver Type:      4
  Hostname:              db
  Port Number:           50000

Creating Datasource properties...
  Creating Connection Pool using defaults...
  Creating Connection Factory...
MEDataSource created successfully!

 JDBC Resource Configuration Completed!!!
------------------------------------------------

 Configuring JMS Resources
 Scope: dmCell(cells/dmCell|cell.xml#Cell_1)
------------------------------------------------

Creating JAAS AuthData TradeOSUserIDAuthData...
  Alias Name: TradeOSUserIDAuthData
  User:       LocalOSUserID
  Password:   password
TradeOSUserIDAuthData created successfully!

Creating SIBus EJBcluster...
EJBcluster created successfully!

Adding SIBus member EJBcluster...
  Default DataSource:    false
  Datasource JNDI Name:  jdbc/MEDataSource
SIBus member added successfully!

Creating SIB Messaging Engine...
  Bus Name:            EJBcluster
  Default DataSource:  false
  Datasource JNDI Name:  jdbc/MEDataSource
  Cluster Name:        EJBcluster
 created successfully!

Creating SIB Messaging Engine...
  Bus Name:            EJBcluster
  Default DataSource:  false
  Datasource JNDI Name:  jdbc/MEDataSource
  Cluster Name:        EJBcluster
 created successfully!

Creating OneOfNPolicy Policy for ME0...
  Alive Period(s):  30
  Server Name:      Ejb1
  ME Name:          EJBcluster.000-EJBcluster
Policy for ME0 created successfully!

Modifying ME DataStore parameters...
  ME Name:          EJBcluster.000-EJBcluster
  AuthAlias:        TradeDataSourceAuthData
  Schema Name:      IBMME0
EJBcluster.000-EJBcluster data store modified successfully!

Creating OneOfNPolicy Policy for ME1...
  Alive Period(s):  30
  Server Name:      Ejb2a
  ME Name:          EJBcluster.001-EJBcluster
Policy for ME1 created successfully!

Modifying ME DataStore parameters...
  ME Name:          EJBcluster.001-EJBcluster
  AuthAlias:        TradeDataSourceAuthData
  Schema Name:      IBMME1
EJBcluster.001-EJBcluster data store modified successfully!

Creating OneOfNPolicy Policy for ME2...
  Alive Period(s):  30
  Server Name:      Ejb2b
  ME Name:          EJBcluster.002-EJBcluster
Policy for ME2 created successfully!

Modifying ME DataStore parameters...
  ME Name:          EJBcluster.002-EJBcluster
  AuthAlias:        TradeDataSourceAuthData
  Schema Name:      IBMME2
EJBcluster.002-EJBcluster data store modified successfully!

Creating SIB Destination TradeBrokerJSD...
  Destination Name:  TradeBrokerJSD
  Destination Type:  Queue
  Reliability:       EXPRESS_NONPERSISTENT
  Cluster Name:      EJBcluster
TradeBrokerJSD created successfully!

Creating SIB Destination Trade.Topic.Space...
  Destination Name:  Trade.Topic.Space
  Destination Type:  TopicSpace
  Reliability:       EXPRESS_NONPERSISTENT
Trade.Topic.Space created successfully!

Creating JMS Queue Connection Factory TradeBrokerQCF...
  Connection Factory Name:  TradeBrokerQCF
  Connection Factory Type:  Queue
  JNDI Name:                jms/TradeBrokerQCF
TradeBrokerQCF created successfully!

Creating JMS Topic Connection Factory TradeStreamerTCF...
  Connection Factory Name:  TradeStreamerTCF
  Connection Factory Type:  Topic
  JNDI Name:                jms/TradeStreamerTCF
TradeStreamerTCF created successfully!

Creating JMS Queue TradeBrokerQueue...
  Queue Name:       TradeBrokerQueue
  JNDI Name:        jms/TradeBrokerQueue
  SIB Destination:  TradeBrokerJSD
  Delivery Mode:    NonPersistent
TradeBrokerQueue created successfully!

Creating JMS Topic TradeStreamerTopic...
  Topic Name:     TradeStreamerTopic
  JNDI Name:      jms/TradeStreamerTopic
  Topic Space:    Trade.Topic.Space
  Delivery Mode:  NonPersistent
TradeStreamerTopic created successfully!

Creating MDB Activation Spec TradeBrokerMDB...
  MDB Activation Spec Name:   TradeBrokerMDB
  JNDI Name:                  eis/TradeBrokerMDB
  JMS Destination JNDI Name:  jms/TradeBrokerQueue
  Destination Type:           javax.jms.Queue
TradeBrokerMDB created successfully!

Creating MDB Activation Spec TradeStreamerMDB...
  MDB Activation Spec Name:   TradeStreamerMDB
  JNDI Name:                  eis/TradeStreamerMDB
  JMS Destination JNDI Name:  jms/TradeStreamerTopic
  Destination Type:           javax.jms.Topic
TradeStreamerMDB created successfully!

 JMS Resource Configuration Completed!!!
------------------------------------------------
Saving...
Saving config...


Set JDBC driver path. Go to...

Environment | WebSphere Variables | DB2UNIVERSAL_JDBC_DRIVER_PATH

...and enter the path to your SQLLIB/java directory, for example...

C:/IBM/SQLLIB/java

Set this value for each node individually or use a cell wide variable if the path is identical on all nodes.

To use a cell wide variable, delete any existing DB2UNIVERSAL_JDBC_DRIVER_PATH variable, which, by default, exists but contains no value, on the nodes. If the variable exists at the node level, the cell wide variable will not be used and you will not be able to connect to the database if there is no or a wrong value provided in the node level variable.

 

Individual steps taken by the script

  1. Collecting Cluster and cluster member Info

    The script collects all data regarding the desired topology (cluster, nodes and cluster members). We enter our sample topology configuration for the cluster EJBcluster.

  2. Collecting database/datasource Information

    The script now collects information regarding the database connection. You must supply the same data as when configuring (and testing) the DB2 client on each node. One thing that deserves special attention is the use of a WebSphere variable...

    DB2UNIVERSAL_JDBC_DRIVER_PATH

    ...on the path to DB2 java libraries (JARs).

    The script creates cell wide datasource definitions. That is why the use of WebSphere variables is the only way that cell-level JDBC data providers can work in a heterogeneous environment.

    You can define a default cell-level value for the variable used here, like...

    C:\SQLLIB\java

    ...and override it with a different value, like...

    /home/db2inst1/sqllib/java

    ...at node level when necessary.

  3. Configure the cluster and cluster members

    Here the script tries to create the cluster and its members (if they are not already created). The script also enables the Service Integration Bus service at server startup.

  4. Configure JDBC/datasource resources

    Now the script creates the J2C authentication entry (TradeDataSourceAuthData) which is needed when security is enabled, the JDBC providers and their data sources. There is one non-XA data source ("MEDataSource", to be used by the messaging engines) and one XA data source ("TradeDataSource", to be used by the application).

  5. Configure JMS resources

    Here the script creates the required J2C authentication entry (TradeOSUserIDAuthData), creates a bus (also named EJBcluster) and sets the EJBcluster cluster as its member.

    Then the script creates two additional messaging engines (one was created automatically). Each ME gets its own schema name (in other words, each ME will have its own set of tables in the database) and a policy that locks it in a single server.

    In WAS V6, a ME is an in-process service running within an Application Server. HAManager's default behavior makes every ME able to "float" between a list of servers (you can even state the preferred ones). So you could have a single ME that automatically starts up on a different cluster member whenever its hosting server is no longer available. The best performance, though, is obtained by having an ME in every server. The mentioned policies restrain the ME's ability to start up on another server.

    Finally the script creates several messaging-related resources, such as bus destinations, JMS queues/topics (and connection factories), and JMS activation specification for the MDBs (message-driven beans).

  6. Saving configuration

    The final step is that all changes are saved into the cell's master configuration.


Next