LSPS documentation logo
LSPS Documentation
IBM WebSphere

To set up LSPS on IBM WebSphere Application Server, do the following:

  1. Ensure JPA2 is supported on app server (Feature Pack for OSGi Applications and JPA 2.0 is installed).
  2. Install WebSphere.
  3. Create JDBC provider and JDBC XA data source with JNDI name jdbc/LSPS_DS and transaction isolation read-committed.

    Example configuration for a DB2 database installed on localhost

    1. Go to security/Global Security/Java Authentication and Authorization Service/J2C authentication data and create new entry:
      Alias: LSPS_DS_AUTH
      User ID: db2admin
      Password: db2admin
    2. Go to Resources/JDBC/JDBC providers and create JDBC provider:
      DatabaseType: DB2
      Provider type: DB2 Universal JDBC driver provider
      Implementation type: XA Datasource
      Name: DB2 Universal JDBC Driver Provider (XA) - default name
      Look at classpath:
      ${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc4.jar
      ${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
      ${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar
      Make sure the WAS variable DB2UNIVERSAL_JDBC_DRIVER_PATH is set correctly.
    3. Go to Resources/JDBC/Data sources:
      1. Create the JDBC data source:
        Data source name: LSPS_DS
        JNDI name: jdbc/LSPS_DS
        JDBC provider: DB2 Universal JDBC driver provider
        Driver type: 4
        Database name: LSPS
        Server name: localhost
        Port number: 50000
        Use this data source in container managed persistence (CMP): true
        Authentication alias for XA recovery: LSPS_DS_AUTH
        Component-managed authentication alias: LSPS_DS_AUTH
      2. Add custom properties:
      3. Test the connection.
  4. Create a JMS queue with the JNDI name jms/LSPS_QUEUE, JMS queue connection factory with the JNDI name jms/LSPS_CF, and the corresponding JMS activation specifications with the JNDI names jms/LSPS_AS and jms/LSPS_WS_AS.

    Example configuration using the default messaging provider and LSPS database to store messages

    1. Go to Service Integration/Buses:
      1. Create a new bus:
        Name: LSPS_BUS
        Security: NO
      2. In LSPS_BUS detail page, click Bus members link and create a bus member:
        Server: default value
        Message store: Data store
        Use existing data source
        Data source JNDI name: jdbc/LSPS_DS
        Schema name: empty
        Authentication alias: LSPS_DS_AUTH
      3. In LSPS_BUS detail page, click Destinations link and create the following destinations:
        • queue:
          Destination type: QUEUE
          Identifier: LSPS_DEST
          Bus member: Your local server node
        • topic:
          Destination type: TOPIC SPACE
          Identifier: LSPS_TOPIC
          Bus member: Your local server node
    2. Go to Resources/JMS/Connection Factories and create a connection factory:
      Provider: Default messaging provider
      Name: LSPS_CF
      JNDI Name: jms/LSPS_CF
      BUS Name: LSPS_BUS
    3. Go to Resources/JMS/Queues and create a queue:
      Name: LSPS_QUEUE
      JNDI Name: jms/LSPS_QUEUE
      Bus name: LSPS_BUS
      Queue name: LSPS_DEST
    4. Go to Resources/JMS/Topics and create a topic:
      Name: LSPS_TOPIC
      JNDI Name: jms/LSPS_TOPIC
      Bus name: LSPS_BUS
      Queue name: LSPS_TOPIC
    5. Go to Resources/JMS/Activation specifications and create activation specifications:
      Name: LSPS_AS
      JNDI Name: jms/LSPS_AS
      Destination type: Queue
      BUS_NAME: LSPS_BUS
      Destination JNDI name: jms/LSPS_QUEUE
      Name: LSPS_WS_AS
      JNDI Name: jms/LSPS_WS_AS
      Destination type: Topic
      BUS_NAME: LSPS_BUS
      Destination JNDI name: jms/LSPS_TOPIC
  5. Turn on and set up security. This step is required only if you want to use LSPS custom authentication. You can also use your own authentication, such as, LDAP.
    1. Copy lsps-security-websphere-$LSPS_VERSION.jar to $WAS_HOME/lib/ext and restart WebSphere.
    2. Go to Security/Global Security:
      1. Enable administrative security: true
      2. Enable application security: true
    3. Go to Security/Global Security and configure User account repository:
      1. Choose Standalone custom registry and click Set as current
      2. Click Configure:
        • Primary administrative user name: admin
        • Custom registry class name: com.whitestein.lsps.security.LSPSUserRegistry
  6. Create mail session with JNDI name mail/LSPS_MAIL
    1. Go to Resources/Mail/Mail Sessions and create mail session:
      Name: LSPS_MAIL
      JNDI Name: mail/LSPS_MAIL
      Outgoing Mail Properties/Server: <your mail server>
      Outgoing Mail Properties/Protocol: smtp/smtps
      Outgoing Mail Properties/User: <username>
      Outgoing Mail Properties/Password: <password>
      Outgoing Mail Properties/Verify Password: <password>
      Outgoing Mail Properties/Return e-mail address: <return e-mail address>
  7. Deploy JSF 2.0 and define it in shared libraries (although WAS 8.5 contains JSF 2.0 implementation - MyFaces - for the selenium tests to work correctly, Mojarra implementation is required).

    1. Go to Environment/Shared libraries and add a shared library for JSF 2.0 (API and implementation JARs are needed). Provide class path according to their location.
    2. Select the isolated class loader option.

    The LSPS application deployment then needs a shared library reference to JSF 2.0 shared library definition created above.

  8. Set org.apache.el.parser.COERCE_TO_ZERO property to false:
    1. Go to Servers/Server types/WebSphere application servers
    2. Select your server.
    3. Go to Java and Process Management/Process definition/Java Virtual Machine/Custom properties and define the property org.apache.el.parser.COERCE_TO_ZERO with the value false.
    4. Restart server.
  9. Deploy the application lsps-application-$LSPS_VERSION.ear to WebSphere.
  10. Open your browser and browse to url http://localhost:9081/lsps-application, user: admin, password: admin.

Memory Settings

  • Minimum: -Xmx512m -XX:PermSize=128m (Usually satisfied by default application server settings)
  • Optimum: -Xmx1024m -XX:PermSize=256m

The amount of memory required might increase depending on uploaded and used lsps modules.