Java EE 7 spec section 5.2.2
"For historical reasons, the java:comp namespace is shared by all components in a web module. To preserve compatibility, this specification doesn’t change that. In a web module, java:comp refers to the same namespace as java:module."
EJB 3.2 spec section 4.4.2.1
"If FooBean is packaged in a stand-alone fooweb.war file, without the use of any deployment
descriptors, the resulting global JNDI name entries are:
Java EE 7 spec section 5.2.2 also says following
"java:comp – Names in this namespace are per-component (for example, per enterprise bean). Except for components in a web module, each component gets its own java:comp namespace, not shared with any other component. Components in a web module do not have their own private component namespace. "
"It is recommended that resources in a web module that are intended to be shared by more than one component be declared in the java:module/env namespace."
A cross spec evaluation is necessary for potential clarifications -
to reduce the likelyhood of confusion and different interpretations of regarding java:comp name space when EJB in war
Java EE 7 spec section 5.2.2 paragraph "For historical reasons, the java:comp ..." - since it's for "historical reason" and for "preserve compatibility", for portability reason, would it be more appropriate to clarify that EJB in war is not required to be declared in java:comp so to be inline with EJB portable JNDI lookup requirement ?
Java EE 7 spec section 5.2.2 "For historical reasons, the java:comp namespace is shared by all components in a web module. To preserve compatibility, this specification doesn’t change that. In a web module, java:comp refers to the same namespace as java:module."
EJB 3.2 spec section 4.4.2.1 "If FooBean is packaged in a stand-alone fooweb.war file, without the use of any deployment descriptors, the resulting global JNDI name entries are:
"
Java EE 7 spec section 5.2.2 also says following "java:comp – Names in this namespace are per-component (for example, per enterprise bean). Except for components in a web module, each component gets its own java:comp namespace, not shared with any other component. Components in a web module do not have their own private component namespace. "
"It is recommended that resources in a web module that are intended to be shared by more than one component be declared in the java:module/env namespace."
A cross spec evaluation is necessary for potential clarifications -