Updating the WebSphere Application Server environment configuration

Use the WebSphere Application Server wsadmin tool to update the WebSphere Application Server (WAS) environment configuration.

If you are not doing this task on the NexJ Studio host machine, you need to ensure that the init.jacl file has been copied from the NEXJ_PLUGIN\enterprise\etc\config\websphere\ directory to a directory on the WAS host machine.

Before you begin updating the environment configuration do one of the following:
  • For a clustered configuration, start the deployment manager.
  • For a stand-alone configuration, start WAS.

Review the init.jacl file to understand the different commands and options.

The following instructions refer to two variables:

target
Use {node server} for single-server deployment and {cluster} for clustered deployment.
target-mq
Use {node server} for single-server deployment and {cluster-mq} for clustered deployment.
Note: In a clustered deployment, the name of the dedicated MQ server cluster must be the application cluster name followed by -mq.

To update WAS environment configuration:

  1. On the WAS host machine or the NexJ Studio host machine, start the wsadmin tool.
    Issue the following command:
    WAS_ROOT\bin\wsadmin -host adminHost -port adminPort
     -username adminUser -password adminPassword
  2. Source the Jacl script.
    Issue the following command:
    source path\init.jacl
    where path is the absolute path to the init.jacl file.
    Tip: Every time you start the wsadmin tool, you must issue the following command:
    source path\init.jacl
  3. Set up the service integration bus (SIBus) needed for JMS message queueing.

    Choose whether you want to have file store or database store as the message engine's store type.

    • To set up a file-based SIBus, issue the following command:
      createFileBus nexj {dataDir} {target-mq}
      For example:
      createFileBus nexj {C:\IBM\WebSphere\AppServer\nexj} {nexj-mq}
    • To set up a database-based SIBus, issue the following command:
      createSQLBus nexj dbtype dbclasspath dbhost dbname dbauthalias dbuser 
       dbpassword dbowner location [jndiname] [{customProperties}] [createTables]
      For example:
      createSQLBus nexj mssql "" localhost crm nexj "" "" "" {nexj-mq}
  4. Optional: Set up the default relational database as the user registry.
    Issue the following command:
    setupSQLUserRegistry adminUser serverProcessUser serverProcessPassword 
     dbtype dbhost:dbport dbname dbuser dbpassword

    In this command, the possible dbtype values are mssql, oracle, or db2 and the serverProcessUser is the WAS administrative user that was created during installation.

    Warning: If any of the default relational database information, such as its location or login details, change, you will need to re-run this command to ensure that the user registry and the default relational database details remain synchronized.
  5. If the WAS administrator account does not match the one created when installing WAS, issue the following command:
    setupAdmin adminUser all
  6. Specify the web server information.
    • If your WebSphere environment includes a web server or multiple web servers, issue the following command:
      setupWeb {{node1 webserver1} ... {nodeN webserverN}} cookieName {target}
    • If no web servers are configured and the default cookie name is used, issue the following command:
      setupWeb {} "" {target}
  7. Specify the JVM heap size for the servers and server clusters.
    • If your WebSphere environment consists of a standalone server, then issue the following command:
      setupJVM heapMB {target}
    • Otherwise, issue the following command:
      setupJVM heapMB {target}
      setupJVM heapMB {target-mq}
    Tip:

    Specify a heap size which is big enough to provide sufficient memory to the application, but small enough to prevent process page swapping by the operating system.

    Some suggested values for a single, non-standalone node with 4 GB RAM are:
    • Application JVM: 2048 MB
    • MQ JVM: 256 MB
    • Node agent: 256 MB
    • Deployment manager: 256 MB

    For a standalone node, set the application JVM to no more than 3072 MB for a 4 GB RAM.

  8. Perform a one-time configuration of the PKI infrastructure for SSL.
    Issue the following command:
    setupPKI {target}
  9. Optional: If you did not enable password encryption, enable password decryption instead.
    Enabling password decryption allows WAS to recognize passwords specified in environment and server files, when the passwords are specified using the text:, base64:, or master: prefixes. Issue the following command:
    enableEncryption false

    If you set up password encryption by following the instructions in Setting up password encryption on WebSphere Application Server, then WAS will encrypt passwords using NexJ's Master Password Encryption scheme, in addition to recognizing encrypted passwords.

  10. Enable WebSphere Application Server security.
    Issue the following command:
    enableSecurity true
  11. Save the changes to the initialization script and exit the wsadmin tool.
    Issue the following commands:
    saveConfig
    exit
After these steps have been completed, the WAS environment has been configured.

Restart WAS for the changes to take effect.