I am deploying my MDBs (EJB3.1) on JBoss7.1.1 application server. When I use @Resource for Datasource injection, I use global JNDI reference name (ENC + local JNDI reference name) and it works just fine. But, from page 147 of this book I can see the below statement.
EJB 3 essentially assumes that all JNDI names used in code are local references and automatically prepends names with the java: comp/env/ prefix.
Does this actually say first it looks for global JNDI reference and if not found, then prepend ENC assuming it is a local JNDI reference? Or Is this completely application server implementation specific? Global JNDI name has to be specified with mappedName property of @Resource but it works with name!