Configuring BTT event mechanism

Before you begin
Event mechanism is major for Java™ Client application system to provide the event propagation between the client workstation and the application server, or among the application servers.
About this task
To enable the event mechanism, you need to do the following:
  1. Configure BTT event mechanism: To enable BTT event mechanism, perform the following steps:
    1. Define Event manager server invoker.
      EventMangerServerInvoker.properties is a pre-built BTT invoker. To enable BTT event mechanism between the client and server, you need to define this invoker in the BeanInvokerRegistryMapper.properties file (by default, it is already defined). EventMangerServerInvoker.properties must contain the following default settings:
      implClass=com.ibm.btt.event.EventManagerServerInvoker
      jndiName=
      factory=com.ibm.websphere.naming.WsnInitialContextFactory
      location=iiop://localhost:2809
      homeClassName=
      isLocal=false
      csReplyFormat=EventManagerCSFormat
      Note:  jndiName and homeClassName is not needed in event manager server invoker and leave it blank; change localhost to server's IP
    2. Configure the BTT definition file for both of the client format definition file and the server format definition file. The event manager uses the following definitions in the format definition files:
      <fmtDef id= "EventManagerCSFormat">
        <record>
          <fString dataName ="operationType" /><delim delimChar ="+" />
          <iColl dataName ="eventList" />
            <refFmt refId ="eventPair" />
          </iColl>
        </record>
      </fmtDef><fmtDef id="eventPair">
        <record dataName ="eventPair">
          <fString dataName ="eventName" /><delim delimchar ="+" />
          <fString dataName ="notifierName" /><delim delimchar ="+" />
        </record>
      </fmtDef> 
    3. Define the queue name for the send and the receive. bttevent.properties defines the necessary information that matches to JMS configuration. If you specify anything other than the default value, you will also need to modify the file tool.
  2. Configure JMS in WebSphere Application Server version 6. For server-to-server event propagation, BTT event mechanism uses JMS queue for the communication among servers. As a result, to enable server-to-server event propagation, the JMS configuration is necessary. To configure the JMS, perform the following steps:
    1. Set Queue Connection Factory:
      1. In the administrative console of WebSphere Application Server, click Service integration > Buses, and create a Bus, named MyBus.

        Screen capture showing the buses.

      2. Click Next.

        Screen capture showing "Add a new bus member".

      3. Click Finish.
      4. In the Administrative console, click Service integration > Buses > MyBus > Destinations.

      5. Click New to add a new destination.

      6. Use the default selection Queue, and click Next.

      7. In the identifier field, enter SendQ, and click Next.
        Note: SendQ is the default value specified by BTT event mechanism. You can specify other values if you modify the value in bttevent.properties file.

      8. Click Next.

      9. Use the default selection, and click Next.

      10. Click Finish.
    2. Create JMS queue connection factory:
      1. In the administrative console, click Resources > JMS Providers > Default messaging.

      2. Select Server: server1, and click Apply to create JMS queue connection factory. In the Configuration page, enter MyQueueConnectionFactory in the Name field; enter jms/MyQueueConnectionFactory in the JNDI Name field; and enter MyBus in the Bus Name field.

    3. Set Queue Destinations:

      1. Select Server: server1, and click Apply to create a JMS Queue.
      2. Enter SendQ in the Name field; enter jms/SendQ in the JNDI Name field; enter SendQ in the Queue Name; and enter MyBus in the Bus Name field.
      3. Click OK.
  3. Configure WebSphere MQ JMS in WebSphere Application Server version 6:
    1. Set Queue Connection factory
      1. In the administrative console, click Resources > JMS Providers > WebSphere MQ.

      2. Select Server: server1 and click Apply. Select WebShpere Queue Connection Factories in the Additional Properties tab.

      3. Click New to create a new MQ queue connection factory:
        • Name : MyQueueConnectionFactory
        • JNDI Name: jms/MyQueueConnectionFactory
        • Mapping-Configuration Alias: DefaultPrincipalMapping
        • Queue Manager: WBin
        • Host: 9.181.26.218
        • Port: 5111
        • Channel: SvrConnectChannel
        • Transport Type: CLIENT
        • Client ID: BTTEventClient
        • CCSID: 437
        • Message Retention: checked
        • XA Enabled: unchecked
      4. Click OK.
    2. Set the Queue Destinations:
      1. In the administrative console, select Resources > JMS Providers > WebSphere MQ.

      2. Select Server: server1, and click Apply. Select WebShpere Queue Connection Factories in the Additional Properties tab.

      3. Click New to create a new queue destination:
        • Name: SendQ
        • JNDI Name: jms/SendQ
        • Base Queue Name: SendQ
        • Base Queue Manager Name: WBin
        • CCSID: 437
        • Native Encoding: unchecked
        • Integer Encoding: Normal
        • Decimal Encoding: Normal
        • Floating Point Encoding: IEEENormal
        • Target Client: JMS
        • Queue Manager Host: 9.181.26.218
        • Queue Manager Port: 5111
        • Server Connect Channel Name: SvrConnectChannel
      4. Click OK.