{"action":"closed","issue":{"url":"https://api.github.com/repos/payara/Payara/issues/401","labels_url":"https://api.github.com/repos/payara/Payara/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/payara/Payara/issues/401/comments","events_url":"https://api.github.com/repos/payara/Payara/issues/401/events","html_url":"https://github.com/payara/Payara/issues/401","id":101287606,"number":401,"title":"JNDI incompletly populated for EJBs in WAR","user":{"login":"matthiasblaesing","id":2179736,"avatar_url":"https://avatars.githubusercontent.com/u/2179736?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiasblaesing","html_url":"https://github.com/matthiasblaesing","followers_url":"https://api.github.com/users/matthiasblaesing/followers","following_url":"https://api.github.com/users/matthiasblaesing/following{/other_user}","gists_url":"https://api.github.com/users/matthiasblaesing/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiasblaesing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiasblaesing/subscriptions","organizations_url":"https://api.github.com/users/matthiasblaesing/orgs","repos_url":"https://api.github.com/users/matthiasblaesing/repos","events_url":"https://api.github.com/users/matthiasblaesing/events{/privacy}","received_events_url":"https://api.github.com/users/matthiasblaesing/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/payara/Payara/labels/try%20to%20reproduce","name":"try to reproduce","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-16T18:42:20Z","updated_at":"2015-08-21T20:19:30Z","closed_at":"2015-08-21T20:19:30Z","body":"I was faced with this problem last week and had now some time to do some reading and experimenting.\r\n\r\nFor the following I reference the EJB 3.2 contract (from ejb-3_2-cor-fr-spec.pdf, JSR 345: Enterprise JavaBeans TM ,Version 3.2 EJB Core Contracts and Requirements).\r\n\r\nFor reference I pushed a sample application to:\r\n\r\nhttps://github.com/matthiasblaesing/PayaraWarJNDI\r\n\r\nA build results in a Servlet and an EJB (stateless session bean, eu.doppel_helix.test.jnditest.ejb.Sample). The EJB is meant as a sample of the problem. The servlet outputs the JNDI.\r\n\r\nFrom the chapter ```4.4 Access to the Global JNDI Namespace``` the above sample bean should register:\r\n\r\n* [4.4.1] java:global/jnditest-1.0-SNAPSHOT/Sample\r\n* [4.4.1] java:global/jnditest-1.0-SNAPSHOT/Sample!eu.doppel_helix.test.jnditest.ejb.Sample\r\n* [4.4.1.1] java:app/jnditest-1.0-SNAPSHOT/Sample\r\n* [4.4.1.1] java:app/jnditest-1.0-SNAPSHOT/Sample!eu.doppel_helix.test.jnditest.ejb.Sample\r\n* [4.4.1.2] java:module/Sample\r\n* [4.4.1.2] java:module/Sample!eu.doppel_helix.test.jnditest.ejb.Sample\r\n\r\nThe matching excample would be (4.4.2.1, page 79):\r\n\r\n```\r\npackage com.acme;\r\n@Stateless\r\npublic class FooBean implements Foo { ... }\r\n```\r\n\r\n[...]\r\n\r\n```\r\nIf FooBean is packaged in a stand-alone fooweb.war file, without the use of any deployment\r\ndescriptors, the resulting global JNDI name entries are:\r\njava:global/fooweb/FooBean\r\njava:global/fooweb/FooBean!com.acme.Foo\r\njava:app/fooweb/FooBean\r\njava:app/fooweb/FooBean!com.acme.Foo\r\njava:module/FooBean\r\njava:module/FooBean!com.acme.Foo\r\n```\r\n\r\nReplacing the placeholders:\r\n\r\n* fooweb => jnditest-1.0-SNAPSHOT\r\n* FooBean => Sample\r\n* com.acme.Foo => eu.doppel_helix.test.jnditest.ejb.Sample\r\n\r\ntransforms my expectation into the sample.\r\n\r\nThe sample programm outputs:\r\n\r\n```\r\nSample woks: Hallo Welt\r\n\r\n========= java:comp =========\r\nenv => com.sun.enterprise.naming.impl.JavaURLContext\r\n    eu.doppel_helix.test.jnditest.JNDILister => com.sun.enterprise.naming.impl.JavaURLContext\r\n        sample => eu.doppel_helix.test.jnditest.ejb.__EJB31_Generated__Sample__Intf____Bean__\r\n========= java:global =========\r\njnditest-1.0-SNAPSHOT => com.sun.enterprise.naming.impl.TransientContext\r\n    Sample => com.sun.ejb.containers.JavaGlobalJndiNamingObjectProxy\r\n    Sample!eu.doppel_helix.test.jnditest.ejb.Sample => com.sun.ejb.containers.JavaGlobalJndiNamingObjectProxy\r\nmejb => com.sun.enterprise.naming.impl.TransientContext\r\n    MEJBBean => org.glassfish.kernel.javaee.MEJBNamingObjectProxy\r\n    MEJBBean!org.glassfish.admin.mejb.MEJBHome => org.glassfish.kernel.javaee.MEJBNamingObjectProxy\r\n========= java:app =========\r\nenv => com.sun.enterprise.naming.impl.JavaURLContext\r\n========= java:module =========\r\nenv => com.sun.enterprise.naming.impl.JavaURLContext\r\n    eu.doppel_helix.test.jnditest.JNDILister => com.sun.enterprise.naming.impl.JavaURLContext\r\n        sample => eu.doppel_helix.test.jnditest.ejb.__EJB31_Generated__Sample__Intf____Bean__\r\n```\r\n\r\nThe app and module namespaces are enumerated, but are empty."}}