| This constructor take agruments to initialize JNDI names.
- prepend - The prepended part of JNDI name
- mapping - The key-value pairs for JNDI name and its corresponding variable name
The variable will be resolved in following priority
- java:comp/env
- java:comp
- java:
- The variable will be look up as a sessionBean with prepend.
- The key-value pairs which is defined by mapping
For example:
By default, session beans will bind to JNDI in the form ejbName/remote for remote interfaces and ejbName/local in the case of local interfaces. When the EJBs are deployed in an .ear file, the default jndi binding will be prepended by the name of the .ear file.
As a result, if the ear file name is foo.ear, prepend is: foo
If you define your own jdni binding, the string should be in key-value pairs format as
"a=custom/MySession,b=custom/MySession2,emf=java:/EntityManagerFactory"
Parameters: prepend - prepended part of JNDI name Parameters: mapping - key-value pairs for JNDI name and its corresponding variable name |