Skip Headers

Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g Release 3 (10.1.3) B14428-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Accessing an EJB 3.0 EJB

You can directly lookup a bean instance from JNDI (or use resource injection in an EJB 3.0 EJB client) and retrieve a bean instance without the home interface. If the `<home>` or `<local-home>` element is removed from an EJB reference, a bean instance is returned from JNDI instead of the home.

The bean instance is created by executing the no-argument create method on the home interface. Stateful session beans and entity beans can also use this shortcut, but they must have a no-argument create method or an exception will be thrown at lookup time.

In both cases, the syntax used in obtaining the reference to the EJB business interface is independent of whether the business interface is local or remote. In the case of remote access, the actual location of a referenced enterprise bean and EJB container are, in general, transparent to the client using the remote business interface of the bean.

For more information, see "Looking up an EJB 3.0 EJB".