EJB JNDI Bindings - EJB(Enterprise JavaBeans)

What is EJB JNDI Bindings?

JNDI stand for Java Naming and Directory Interface. It is a set of API and service interface. Java based applications use JNDI for naming and directory services. In framework of EJB, there are two terms.

  • Binding − this refers to assigning a name to an EJB object, which can be used later.
  • Lookup − this refers to looking up and getting an entity of EJB.

In Jobs, session beans are bound in JNDI in the following design by default.

  • local − EJB-name/local
  • remote − EJB-name/remote

In container, EJB are bundled with <application-name>.ear file, then default format is as following −

  • local − application-name/ebb-name/local
  • remote − application-name/ebb-name/remote

Example of Default Binding

Refer to EJB - form Application chapter's Jobs relieve output.

Jobs Application Server Log Output

Customized Binding

Following explanation can be used to customize the defaulting JNDI bindings −

  • local − org.jboss.ejb3.LocalBinding
  • remote − org.jboss.ejb3.RemoteBindings

Update LibrarySessionBean.java. consign to EJB - Create Application section.



Assemble the development, deploy the application on Jobs, and prove the following output in Jobs console –

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

EJB(Enterprise JavaBeans) Topics