JBoss.org Community Documentation Emitting notifications

JBossWS-Eventing registeres a event dispatcher within local JNDI tree that can be used to emit notifications from applications.


The event dispatcher interface:

public interface EventDispatcher
void dispatch(URI eventSourceNS, Element payload);

Example notification

(1)   URI eventSourceURI = new URI("http://http://www.jboss.org/sysmon/SystemInfo");
(2)   Element payload = DOMUtils.parse("SOME XML STRING");
InitialContext iniCtx = getInitialContext();
(3)      EventDispatcher delegate = (EventDispatcher)
(4)      delegate.dispatch(eventSourceURI, payload);
catch (Exception e)
  1. Address your event source correctly (TargetNamespace+PortTypeName)

  2. Create your payload

  3. Lookup dispatcher from JNDI

  4. Dispatch notification.

The SubscriptionManager MBean is the actual core component that drives the JBossWS-Eventing implementation. It can be accessed through the jmx-console.


Management operations exist to monitor and maintain active subscritions and deployed event sources. The current implementation is backed by a ThreadPoolExecutor, that asynchronously delivers messages to event sink endpoints. It can be configured through the following attributes:

  • corePoolSize - average number of idle threads

  • maximumPoolSize - maximum number of threads

  • eventKeepAlive - keep alive before an undelivered event message is discarded.