Search code examples
jakarta-eewebspherejndiwebsphere-7

What's the default JNDI name of an EJB in Websphere Application Server 7 (WAS)?


In the Administration COnsole of WAS 7, on the Applications > Application Types > WebSphere enterprise applications > application > EJB JNDI names section, I have a table with four columns :

  • EJB Module (e.g. ProjectEJB.jar)
  • EJB (e.g. BeanBO )
  • URI (e.g. ProjectEJB.jar, META-INF/ejb-jar.xml
  • Target resource JNDI Name (with empty fields)

Something like this :

enter image description here

What's the jndi name of my LogWriter bean ?


Solution

  • Below you have table with default names. Each bean gets short and long form. You can override default using ibm-ejb-jar-bnd.xml file or during installation via console. During module startup bindings will be visible in SysyemOut.log

    You can read about default bindings here: http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.express.iseries.doc/info/iseriesexp/ae/cejb_bindingsejbfp.html

    Description                              Binding pattern
    Short form local interfaces and homes    ejblocal:<package.qualified.interface>
    Short form remote interfaces and homes   <package.qualified.interface>
    Long form local interfaces and homes     ejblocal:<component-id>#<package.qualified.interface>
    Long form remote interfaces and homes    ejb/<component-id>#<package.qualified.interface>
    
    The component-id defaults to <application-name>/<module-jar-name>/<ejb-name>