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:
- Configure BTT event mechanism: To enable BTT event mechanism,
perform the following steps:
- 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
- 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>
- 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.
- 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:
- Set Queue Connection Factory:
- In the administrative console of WebSphere Application Server, click ,
and create a Bus, named MyBus.
- Click Next.
- Click Finish.
- In the Administrative console, click .
- Click New to add a new destination.
- Use the default selection Queue, and click Next.
- 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.
- Click Next.
- Use the default selection, and click Next.
- Click Finish.
- Create JMS queue connection factory:
- In the administrative console, click .
- 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.
- Set Queue Destinations:
- Select Server: server1, and click Apply to
create a JMS Queue.
- 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.
- Click OK.
- Configure WebSphere MQ JMS in WebSphere Application Server version
6:
- Set Queue Connection factory
- In the administrative console, click .
- Select Server: server1 and click Apply.
Select WebShpere Queue Connection Factories in the Additional
Properties tab.
- 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
- Click OK.
- Set the Queue Destinations:
- In the administrative console, select .
- Select Server: server1, and click Apply.
Select WebShpere Queue Connection Factories in the Additional
Properties tab.
- 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
- Click OK.