2.15 Setting up JMS in WebSphere and WebLogic

The User Application relies on a Java Message Service (JMS) persistent store to persist e-mail messages. If JMS is not properly configured, any e-mail messages in the memory queue will be lost if the Application Server is shut down. As a convenience, JMS is configured for JBoss automatically. For WebSphere and WebLogic, you need to perform setup steps to configure JMS manually.

This section includes the following topics:

2.15.1 Setting up JMS on WebSphere 6.1

To configure JMS on WebSphere 6.1:

  1. Login to the WebSphere Console as the Administrative User:

    http://server:port/ibm/console
    
  2. Go to Service integration->Buses:

    1. Press the New button.

    2. Create a new bus.

      1. Provide a name for the bus.

        For example: IDMProvBus

      2. Uncheck the check box for Bus Security.

      3. Press the Next button.

    3. Confirm the creation of the new bus.

      Press the Finish button.

  3. Go to Service integration->Buses:

    1. Select the bus that was created above.

      For example: IDMProvBus

    2. On the Configuration Tab -> General Properties area, perform these steps:

      1. Provide a Description.

        For example: Bus to be used with the IDM User Application

      2. Press the Apply button.

      3. Press Save.

  4. Go to Service integration -> Buses.

    1. Select the bus that was created above.

      For example: IDMProvBus

    2. On the Configuration Tab -> Topology -> Bus Members.

      Press the Add button and perform these steps:

      1. Select server, cluster, or WebSphere MQ server.

        Select the correct Server that the User Application WAR is deployed on and press the Next button.

      2. Select the type of message store.

        Select the radio button next to File Store and press the Next button.

      3. Provide the message store properties.

        Leave all of the default values on this page and press the Next button.

      4. Confirm the addition of a new bus member.

        Press the Finish button

    3. Press the Save link.

  5. Go to Resources -> JMS -> Topic connection factories.

    1. In the scopes drop down, select the correct scope.

      For example: Node=MyNode01, Server=server1

    2. Press the New button.

      1. Select the radio button next to Default messaging provider.

      2. Press the OK button.

    3. On the Configuration tab.

      1. Provide a name.

        For example: ConnectionFactory

      2. Provide the following as the JNDI name.

        ConnectionFactory
        
      3. Provide a Description.

        For Example: Topic Connection Factory to be used with the IDM User Application

      4. In the Bus Name drop down box, select the Bus that was created above.

        For Example: IDMProvBus

      5. Provide the following in the Client identifier field under the Durable Subscription area:

        IDMNotificationDurableTopic
        
      6. In the Persistent message reliability drop down box under Quality of Service, select the following:

        Reliability persistent
        
      7. In the Share durable subscriptions drop down box under Advanced Messaging, select the following:

        Never shares
        
    4. Press the Apply button.

    5. Press the Save link.

  6. Go to Resources -> JMS -> Topics.

    1. In the scopes drop down, select the correct scope.

      For example: Node=MyNode01, Server=server1

    2. Press the New button.

      1. Select the radio button next to Default messaging provider.

      2. Press the OK button.

    3. On the Configuration tab, perform these steps:

      1. Provide a Name.

        For Example: IDMNotificationDurableTopic

      2. Provide the following as the JNDI name.

        topic/IDMNotificationDurableTopic
        
      3. Provide a Description.

        For Example: Topic to be used with the IDM User Application

      4. In the Bus Name drop down box, select the Bus that was created above.

        For Example: IDMProvBus

      5. In the Topic space drop down box, select the following:

        Default.Topic.Space
        
      6. In the JMS delivery mode drop down box, select the following:

        Persistent
        
    4. Press the Apply button.

    5. Press the Save link.

    6. Logout of the WebSphere console.

  7. Restart the WebSphere Application Server with the User Application WAR deployed:

    1. In the SystemOut.log, the following three lines will appear in sequence if the JMS server is not set up correctly:

      INFO  [JMSConnectionMediator] Starting JMS notification system
      WARN  [NotificationEngine] Could not properly initialize JMS persistence for the notification system. Will revert back to non-persistent asynchronous notification system. 
      INFO  [NotificationThread] Starting asynchronous notification system 
      
    2. In the server log, the following two lines will appear with some information about the connection if the JMS Server is set up correctly:

      INFO  [JMSConnectionMediator] Starting JMS notification system
      %connection information%
      INFO  [NotificationThread] Starting asynchronous notification system
      
      
      ========
      
      [8/8/09 16:14:28:978 EDT] 0000000a SibMessage    I   [:] CWSID0021I: Configuration reload is enabled for bus IDMProvBus. 
      [8/8/09 16:14:29:118 EDT] 0000000a SibMessage    I   [:] CWSIS1569I: Messaging engine
      N35020Node01.server1-IDMProvBus is using a file store. 
      
      ========
      
      [8/8/09 16:16:13:285 EDT] 00000017 SystemOut     O 16:16:13,255 INFO  [JMSConnectionMediator] Starting JMS notification system 
      
      [8/8/09 16:16:13:502 EDT] 00000017 SharedPool    I   J2CA0086W: Shareable connection MCWrapper id 32e432e4  Managed connection [com.ibm.ws.sib.api.jmsra.impl.JmsJcaManagedConnection@847917706 <managedConnectionFactory=[com.ibm.ws.sib.api.jmsra.impl.JmsJcaManagedTopicConnectionFactoryImpl@1943565272 <logWriter=null> <busName=IDMProvBus> <clientID=IDMNotificationDurableTopic> <userName=null> <password=null> <xaRecoveryAlias=> <nonPersistentMapping=ExpressNonPersistent> <persistentMapping=ReliablePersistent> <durableSubscriptionHome=N35020Node01.server1-IDMProvBus> <readAhead=Default> <temporaryQueueNamePrefix=null> <temporaryTopicNamePrefix=> <target=> <targetSignificance=Preferred> <targetTransportChain=> <targetType=BusMember> <providerEndpoints=> <connectionProximity=Bus> <shareDataSourceWithCMP=false> <shareDurableSubscriptions=NeverShared> <cachedFactory=com.ibm.ws.sib.api.jms.impl.JmsFactoryFactoryImpl@2f8a2f8a>]> <coreConnection=com.ibm.ws.sib.processor.impl.ConnectionImpl@3ac03ac> <localTransaction=[com.ibm.ws.sib.api.jmsra.impl.JmsJcaManagedConnection$JmsJcaLocalTransaction@887895276 <localSITransaction=null>]> <xaResource=null> <metaData=null> <userDetails=[com.ibm.ws.sib.api.jmsra.impl.JmsJcaUserDetails@1130382176 <userName=null> <password=null>]> <subject=null> <logWriter=null> <sessions=[[com.ibm.ws.sib.api.jmsra.impl.JmsJcaSessionImpl@1608933350 <managedConnection=847917706> <connection=2119728728> <transacted=false> <applicationLocalTransaction=null> <reqInfo=[com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionRequestInfo@871511026> <userDetails=null> <coreConnection=com.ibm.ws.sib.processor.impl.ConnectionImpl@72bc72bc> <request counter=0>]> <sessionClosed=false> <sessionInvalidated=false>]]> <connectionListeners=[com.ibm.ejs.j2c.ConnectionEventListener@33703370]>]  State:STATE_TRAN_WRAPPER_INUSE 
       from resource ConnectionFactory was used within a local transaction containment boundary. 
      
      [8/8/09 16:16:13:527 EDT] 0000001e SystemOut     O 16:16:13,526 INFO  [NotificationThread] Starting asynchronous notification system 
      

2.15.2 Setting up JMS on WebSphere 7.0

To configure JMS on WebSphere 7.0:

  1. Login to the WebSphere Console as the Administrative User:

    http://server:port/ibm/console
    
  2. Go to Service integration->Buses:

    1. Press the New button.

    2. Create a new bus.

      1. Provide a name for the bus.

        For example: IDMProvBus

      2. Uncheck the check box for Bus Security.

      3. Press the Next button.

    3. Confirm the creation of the new bus.

      Press the Finish button. Then, press the Save link.

  3. Go to Service integration->Buses:

    1. Select the bus that was created above.

      For example: IDMProvBus

    2. On the Configuration Tab -> General Properties area, perform these steps:

      1. Provide a Description.

        For example: Bus to be used with the IDM User Application

      2. Press the Apply button.

      3. Press Save.

  4. Go to Service integration -> Buses.

    1. Select the bus that was created above.

      For example: IDMProvBus

    2. On the Configuration Tab -> Topology -> Bus Members.

      Press the Add button and perform these steps:

      1. Select server, cluster, or WebSphere MQ server.

        Select the correct Server that the User Application war is deployed on and press the Next button.

      2. Select the type of message store.

        Select the radio button next to File Store and press the Next button.

      3. Configure the file store.

        Leave all of the default values on this page and press the Next button.

      4. Tune the performance parameters, if necessary.

        Leave all of the default values, unless your situation requires them to be changed. Press the Next button.

      5. Press the Finish button.

    3. Press the Save link.

  5. Go to Resources -> JMS -> Topic connection factories.

    1. In the scopes drop down, select the correct scope.

      For example: Node=MyNode01, Server=server1

    2. Press the New button.

      1. Select the radio button next to Default messaging provider.

      2. Press the OK button.

    3. On the Configuration tab.

      1. Provide a name.

        For example: ConnectionFactory

      2. Provide the following as the JNDI name.

        ConnectionFactory
        
      3. Provide a Description.

        For Example: Topic Connection Factory to be used with the IDM User Application

      4. In the Bus Name drop down box, select the Bus that was created above.

        For Example: IDMProvBus

      5. Provide the following in the Client identifier field under the Durable Subscription area:

        IDMNotificationDurableTopic
        
      6. In the Persistent message reliability drop down box under Quality of Service, select the following:

        Reliability persistent
        
      7. In the Share durable subscriptions drop down box under Advanced Messaging, select the following:

        Never shares
        
    4. Press the Apply button.

    5. Press the Save link.

  6. Go to Resources -> JMS -> Topics.

    1. In the scopes drop down, select the correct scope.

      For example: Node=MyNode01, Server=server1

    2. Press the New button.

      1. Select the radio button next to Default messaging provider.

      2. Press the OK button.

    3. On the Configuration tab, perform these steps:

      1. Provide a Name.

        For Example: IDMNotificationDurableTopic

      2. Provide the following as the JNDI name.

        topic/IDMNotificationDurableTopic
        
      3. Provide a Description.

        For Example: Topic to be used with the IDM User Application

      4. In the Bus Name drop down box, select the Bus that was created above.

        For Example: IDMProvBus

      5. In the Topic space drop down box, select the following:

        Default.Topic.Space
        
      6. In the JMS delivery mode drop down box, select the following:

        Persistent
        
    4. Press the Apply button.

    5. Press the Save link.

    6. Logout of the WebSphere console.

  7. Restart the WebSphere Application Server with the User Application WAR deployed:

    1. In the SystemOut.log, the following three lines will appear in sequence if the JMS server is not set up correctly:

      INFO  [JMSConnectionMediator] Starting JMS notification system
      WARN  [NotificationEngine] Could not properly initialize JMS persistence for the notification system. Will revert back to non-persistent asynchronous notification system. 
      INFO  [NotificationThread] Starting asynchronous notification system 
      
    2. In the server log, the following two lines will appear with some information about the connection if the JMS Server is set up correctly:

      INFO  [JMSConnectionMediator] Starting JMS notification system
      %connection information%
      INFO  [NotificationThread] Starting asynchronous notification system
      
      
      ========
      
      [9/7/09 14:39:52:167 EDT] 00000000 SibMessage    I   [:] CWSID0021I: Configuration reload is enabled for bus IDMProvBus. 
      [9/7/09 14:39:52:372 EDT] 00000000 SibMessage    I   [:] CWSIS1569I: Messaging engine N35020Node02.server1-IDMProvBus is using a file store. 
      
      ========
      
      [9/7/09 14:41:32:613 EDT] 0000000c SystemOut     O 14:41:32,608 INFO  [JMSConnectionMediator] Starting JMS notification system 
      
      [9/7/09 14:41:32:841 EDT] 0000000c SharedPool    I   J2CA0086W: Shareable connection MCWrapper id 5c175c17  Managed connection [com.ibm.ws.sib.api.jmsra.impl.JmsJcaManagedConnection@490f490f <managedConnectionFactory=[com.ibm.ws.sib.api.jmsra.impl.JmsJcaManagedTopicConnectionFactoryImpl@1f9c1f9c <logWriter=null> <busName=IDMProvBus> <clientID=IDMNotificationDurableTopic> <userName=null> <password=null> <xaRecoveryAlias=> <nonPersistentMapping=ExpressNonPersistent> <persistentMapping=ReliablePersistent> <durableSubscriptionHome=N35020Node02.server1-IDMProvBus> <readAhead=Default> <temporaryQueueNamePrefix=null> <temporaryTopicNamePrefix=null> <target=null> <targetSignificance=Preferred> <targetTransportChain=null> <targetType=BusMember> <providerEndpoints=null> <connectionProximity=Bus> <shareDataSourceWithCMP=false> <shareDurableSubscriptions=NeverShared> <cachedFactory=com.ibm.ws.sib.api.jms.impl.JmsFactoryFactoryImpl@4fb24fb2> <producerDoesNotModifyPayloadAfterSet=false> <consumerDoesNotModifyPayloadAfterGet=false>]> <coreConnection=com.ibm.ws.sib.processor.impl.ConnectionImpl@b0b0b0b> <localTransaction=[com.ibm.ws.sib.api.jmsra.impl.JmsJcaManagedConnection$JmsJcaLocalTransaction@78ce78ce <localSITransaction=null>]> <xaResource=null> <metaData=null> <userDetails=[com.ibm.ws.sib.api.jmsra.impl.JmsJcaUserDetails@5b4d5b4d <userName=null> <password=null>]> <subject=null> <logWriter=null> <sessions=[[com.ibm.ws.sib.api.jmsra.impl.JmsJcaSessionImpl@21ff21ff <managedConnection=1225738511> <connection=828453217> <transacted=false> <applicationLocalTransaction=null> <reqInfo=[com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionRequestInfo@219a219a> <userDetails=null> <coreConnection=com.ibm.ws.sib.processor.impl.ConnectionImpl@b0b0b0b> <request counter=0>]> <sessionClosed=false> <sessionInvalidated=false>]]> <connectionListeners=[com.ibm.ejs.j2c.ConnectionEventListener@1572625852]>]  State:STATE_TRAN_WRAPPER_INUSE 
       from resource ConnectionFactory was used within a local transaction containment boundary. 
      
      [9/7/09 14:41:32:938 EDT] 0000001a SystemOut     O 14:41:32,938 INFO  [NotificationThread] Starting asynchronous notification system 
      

2.15.3 Setting up JMS on WebLogic 10.3

To configure JMS on WebLogic 10.3:

  1. Login to the WebLogic Console as the Administrative User:

    http://server:port/console
    
  2. Go to Domain Configuration->Services->Persistent Stores:

    1. Select New->Create File Store screen.

    2. On the Create a new File Store screen.

      1. Provide a Name.

        For example: FileStore-0

      2. Select the correct Target Server.

        This needs to be the same Target Server that the User Application WAR is deployed on. For Example: AdminServer

      3. Provide a Directory Location for where the JMS Server will be able to store. The location must already exist on the server. For example: /opt/bea/JMS

      4. Press the OK button.

  3. Go to Domain Configuration->Services->Messaging->JMS Servers:

    1. Select the New button.

    2. On the Create a New JMS Server screen #1, perform these steps:

      1. Provide a Name.

        For example: JMSServer-0

      2. In the Persistent Store dropdown, select the persistent store that was created above.

        For example: FileServer-0

      3. Press the Next button.

    3. On the Create a New JMS Server screen #2, perform these steps:

      1. In the Target dropdown, select the correct Target Server.

        This needs to be the same Target Server that the User Application WAR is deployed on. For example: AdminServer

      2. Press the Finish button.

  4. Go to Domain Configuration -> Services -> Messaging -> JMS Modules.

    1. Select the New button.

    2. Provide a Name.

      For example: SystemModule-0

    3. Press the Next button.

    4. On the Create JMS System Module screen #2:

      1. Select the checkbox next to the correct Target Server.

        This needs to be the same Target Server that the User Application WAR is deployed on. For example: AdminServer

      2. Press the Next button.

    5. On the Create JMS System Module screen #3:

      1. Select the checkbox next to Would you like to add resources to this JMS System Module.

      2. Press the Finish button.

    6. On the Settings for %name% (for example: SystemModule-0), select the Configuration tab.

      1. Under Summary of Resources area, press the New button.

        1. On the Create a New JMS System Module Resource screen #1, select the radio button next to Connection Factory, and press the Next button.

        2. On the Create a New JMS System Module Resource screen #2, follow these steps:

          1. Provide a Name. For example: ConnectionFactory-0

          2. Provide the following as the JNDI Name: ConnectionFactory

          3. Press the Next button.

        3. On the Create a New JMS Module Resource screen #3, perform these steps:

          1. Select the Target Server that the User Application WAR is deployed on. For example: AdminServer

          2. Press the Finish button.

      2. Under Summary of Resources area, press the New button.

        1. On the Create a New JMS System Module Resource screen #1, select the radio button next to Topic, and press the Next button.

        2. On the Create a New JMS System Module Resource screen #2, follow these steps:

          1. Provide a Name. For example: Topic-0

          2. Provide the following as the JNDI Name: topic/IDMNotificationDurableTopic

          3. Press the Next button.

        3. On the Create a New JMS Module Resource screen #3, perform these steps:

          1. Press the Create a New Subdeployment button. Provide a Subdeployment Name. The Subdeployment name needs to be the same as the Name provided for the Topic. For example: Topic-0.

          2. Press the OK button.

      3. Under Targets, select the correct JMS Server.

        This has to be the same JMS server that was defined above. For example: JMSServer-0

      4. Press the Finish button.

    7. Logout of the WebLogic console.

  5. Restart the WebLogic Server with the User Application WAR deployed:

    1. In the server log, the following three lines will appear in sequence if the JMS server is not set up correctly:

      INFO  [com.novell.soa.notification.impl.jms.JMSConnectionMediator] Starting JMS notification system
      WARN  [com.novell.soa.notification.impl.NotificationEngine] Could not properly initialize JMS persistence for the notification system. Will revert back to non-persistent asynchronous notification system. 
      INFO  [com.novell.soa.notification.impl.NotificationThread] Starting asynchronous notification system
      
    2. In the server log, the following two lines will appear in sequence if the JMS Server is set up correctly:

      INFO  [JMSConnectionMediator] Starting JMS notification system 
      INFO  [NotificationThread] Starting asynchronous notification system