Use a JNDI lookup to retrieve event factories, which use JNDI for event sources.
import javax.naming.* import org.eclipse.hyades.logging.events.cbe.* Context context = new InitialContext(); EventFactory eventFactory = (EventFactory) context.lookup("com/ibm/events/EventFactory");
The returned object is the provided event factory; if the event factory is configured with a content handler, an instance of the content handler is also created locally. For more information about content handlers and JNDI, see Completing event content automatically.