Getting an event factory by JNDI lookup

Use a JNDI lookup to retrieve event factories, which use JNDI for event sources.

Why and when to perform this task

If an administrator has bound an existing event factory into JNDI for event sources to use, perform a standard JNDI lookup to retrieve the event factory:
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.


Terms of use |

Last updated: Tue Feb 21 17:36:50 2006

(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)