Two ways to get an enterprise bean's Instance:
Clients of an enterprise beans obtains a reference to an instance of an enterprise bean through
Clients of an enterprise beans obtains a reference to an instance of an enterprise bean through
- Dependency Injection
- JNDI lookup
Dependency Injection- Java Annotations
Supported for Clients running in a J2EE server managed environment, JavaServer faces web applications, JAX-RS web services,other enterprise beans or J2EE application clients.
Dependency injection using javax.ejb.EJB
JNDI- Java Naming and Directory Interface
Applications running out of J2EE server such as J2SE application can get an instance for the enterprise bean through a explicit JNDI lookup.
JNDI supports a global syntax for all J2EE Components to perform explicit lookup.
No comments:
Post a Comment