NotificationProducerClient producerClient = new NotificationProducerClient(producer);
producerClient.setTrace(true);
// Applying this filter will result in a subscription that wll be notified only when a "connection"
// object is created or removed
MessagePatternFilter filter= new MessagePatternFilter(
"/wsnt:NotificationMessage/wsnt:Message/qman:LifeCycleEvent/qman:Resource/qman:Name/text()='connection'", // expression (XPath)
XPathUtils.NAMESPACE_URI); // Dialect : the only supported dialect is XPath 1.0
producerClient.subscribe(
consumer, // Consumer Endpoint reference