void fireEvent(BpelEvent event) { // Note that the eventListeners list is a copy-on-write array, so need // to mess with synchronization. for (org.apache.ode.bpel.iapi.BpelEventListener l : _contexts.eventListeners) { l.onEvent(event); } }
/** * Unregister a global listener from receive {@link BpelEvent}s from all processes. * * @param listener */ public void unregisterBpelEventListener(BpelEventListener listener) { // Do not synchronize, eventListeners is copy-on-write array. if (_contexts.eventListeners.remove(listener)) { try { listener.shutdown(); } catch (Exception e) { __log.warn( "Stopping BPEL event listener " + listener.getClass().getName() + " failed, nevertheless it has been unregistered.", e); } } }
/** * Register a global listener to receive {@link BpelEvent}s froom all processes. * * @param listener */ public void registerBpelEventListener(BpelEventListener listener) { listener.startup(_properties.getProperties()); // Do not synchronize, eventListeners is copy-on-write array. _contexts.eventListeners.add(listener); }
/** * Register a global listener to receive {@link BpelEvent}s froom all processes. * * @param listener */ public void registerBpelEventListener(BpelEventListener listener) { // Do not synchronize, eventListeners is copy-on-write array. listener.startup(_configProperties); _contexts.eventListeners.add(listener); }