Creating an event access bean

Getting event access starts with creating an instance of the event access bean.

Why and when to perform this task

The event access interface is implemented as a stateless session bean using the Enterprise JavaBeans architecture. To query the event server using the event access interface, an event source must first create an instance of the event access session bean. The event access bean can be either local or remote.

To create an instance of the event access session bean, use the appropriate home interface: com.ibm.events.access.EventAccessHome or com.ibm.events.access.EventAccessLocalHome.

// use home interface to create remote event access bean
InitialContext context = new InitialContext();
Object eventAccessHomeObj = context.lookup("ejb/com/ibm/events/access/EventAccess");
EventAccessHome eventAccessHome = (EventAccessHome)
  PortableRemoteObject.narrow(eventAccessHomeObj,
                              EventAccessHome.class);
eventAccess = (EventAccess) eventAccessHome.create();

Terms of use |

Last updated: Tue Feb 21 17:19:16 2006

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