Last summer I redid the geronimo openejb jndi integration and removed a lot of unnecessary java: prefixes in openejb binding code (see https://issues.apache.org/jira/browse/OPENEJB-1014)
Geronimo has improved how it deals with the java: namespace (it's now more or less spec compliant, thanks to aries jndi) and now the java: prefixes on comp/ are causing problems. I'd like to remove them, see the patch OPENEJB-1014-6.diff attached to the jira issue. I won't do it right away since it might interfere with more substantial work on new features, but it you are working on a code that uses deploymentInfo.getJndiEnc() you might remove the java: prefix yourself. David Blevins and I have been trying to figure out if urls such as java:comp can be used with any Context or just InitialContexts and what they might mean if they work with non-initial contexts. I found this: http://java.sun.com/products/jndi/tutorial/beyond/url/initctx.html which appears to indicate that you can only look up relative names in a Context and URLs are only handled by InitialContexts. David tells me that the ee6 spec embedded API EjbContainer is supposed to supply a Context that will handle java:global urls. Poking around in the jndi tutorial on how to implement a service provider (http://java.sun.com/products/jndi/tutorial/provider/url/context.html), I think that this means this should be a URL context whereas all the stuff looked up from it would be a regular context that doesn't understand URLs. I think David and I agree that new InitialContext().lookup("java:comp/env").lookup("java:global"), if it succeeds, ought to return the same thing as new InitialContext().lookup("java:global") I don't think it should succeed, whereas IIUC David thinks maybe it should. Anyone know any more on this subject? thanks david jencks
