|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
MessagePort | This class is used to wrap JMS destinations that are configured for an event group. |
NotificationHelper | The notification helper maps concepts related to the Common Event Infrastructure to concepts related to messaging. |
NotificationHelperFactory | This factory is used to get access to an instance of an object that implements
the NotificationHelper interface. |
Exception Summary | |
InvalidNotificationTypeException | This exception is thrown when a JMS message does not contain a valid notification type. |
This package enables event consumers to obtain JMS parameters to subscribe for event notifications.
The notification helper enables event consumers to interact with the messaging infrastructure by using the JMS programming model.
// Lookup the notification helper factory InitialContext context = new InitialContext(); Object notifHelperFxObj = context.lookup("com/ibm/events/NotificationHelperFactory"); NotificationHelperFactory notifHelperFx = (NotificationHelperFactory) PortableRemoteObject.narrow(notifHelperFxObj, NotificationHelperFactory.class); // Create the notification helper NotificationHelper notifHelper = notifHelperFx.getNotificationHelper(); notifHelper.setEventSelector("CommonBaseEvent[@globalInstanceId]"); // Get JNDI names for the JMS objects MessagePort msgPort = notifHelper.getJmsTopic("critical events"); // event group String topicConnFxJndiName = msgPort.getConnectionFactoryJndiName(); String destinationJndiName = msgPort.getDestinationJndiName(); // Lookup the JMS objects Object tcfObj = context.lookup(topicConnFxJndiName); Object tObj = context.lookup(destinationJndiName); TopicConnectionFactory tcf = (TopicConnectionFactory) PortableRemoteObject.narrow(tcfObj, TopicConnectionFactory.class); Topic t = (Topic) PortableRemoteObject.narrow(tObj, Topic.class); // Next use the JMS objects in subscription ...
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |