Default java:* lookup namespaces not always working
According to Jira issue #728 (closed) (https://jira.ow2.org/browse/#728) all new EJB-3.1 namespace prefixes (java:app, java:global and java:module) should be working since release 5.3.0 M6.
At least the Web container still has an issue.
Example: I have a spartan webmailer app which consists of a web module and a EJB ("WebmailEJB") packaged within a EAR file ("WebmailEAR"). The EJB contains no deployment descriptor but the EAR does, where all modules are specified accordingly. When trying to connect to the EJB using the new standardized namespaces only the "java:global" syntax appears to work. But the "java:app" syntax fails, contrary to the JavaEE-6 specification.
<%
InitialContext ctx = new InitialContext(); // works ctx.lookup("java:global/WebmailEAR/WebmailEJB/EmailConnectionBean"); // fails ctx.lookup("java:app/WebmailEJB/EmailConnectionBean");
%>
Stacktrace:
Stacktrace:] with root cause javax.naming.NameNotFoundException: WebmailEJB at org.ow2.jonas.lib.naming.ComponentContext.lookupCtx(ComponentContext.java:835) at org.ow2.jonas.lib.naming.ComponentContext.lookup(ComponentContext.java:228) at org.ow2.jonas.lib.naming.ComponentContext.lookup(ComponentContext.java:229) at org.ow2.jonas.lib.naming.java.javaURLContext.lookup(javaURLContext.java:175) at javax.naming.InitialContext.lookup(InitialContext.java:409) at org.apache.jsp.index_jsp._jspService(index_jsp.java:76) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.ow2.jonas.web.tomcat7.CheckOpenResourcesValve.invoke(CheckOpenResourcesValve.java:69) at org.ow2.jonas.web.tomcat7.tx.TransactionValve.invoke(TransactionValve.java:89) at org.ow2.jonas.web.tomcat7.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:95) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.ow2.jonas.web.tomcat7.versioning.VersioningValve.invoke(VersioningValve.java:105) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav ...