April 2003
Intermediate to advanced
750 pages
16h 53m
English
This section describes more of the client view for the Customer EJB that extends the basic client view in “EJB client view” on page 56. The examples are based on local home and component interfaces.
Figure 3-22 shows the finding of a home interface. Because we use a local interface, we are not required to do a PortableRemoteObject.narrow on the object that is returned from the lookup method. Remember, the JNDI name is specified at deployment time, but not in the deployment descriptor.
InitialContext ctx = new InitialContext(); Object objHome = ctx.lookup("java:comp/env/ejb/CustomerLocalHome"); CustomerLocalHome home = (CustomerLocalHome) ... |
Read now
Unlock full access