Call it a personal weakness, but I tend to override all my JNDI
names with a "Home" on the end so the code looks like
FooHome home = (FooHome)ctx.lookup("FooHome");
Foo foo = home.create();
instead of
FooHome home = (FooHome)ctx.lookup("Foo");
Foo foo = home.create();
But I suppose the JNDI name overriding wouldn't be portable across
servers, so perhaps it's better in the long run if jBoss doesn't allow it.
Sigh.
Aaron
On Sat, 2 Sep 2000, Rickard �berg wrote:
> Depends on which version of J2EE you're using, and whether or not you're
> using a proprietary form of application client.
>
> Since:
> 1) Well-defined application clients can use java:. In the first version
> of J2EE only web-clients (servlets) could use java:. Now standalone
> applications are also defined as application clients.
> 2) If you're not using a well-defined application client (e.g. early
> version of J2EE + stand-alone application), then you would have to use a
> properietary naming scheme. The common solution is to use a global
> namingspace through JNDI however, which is what you'll see in all
> examples. The point is that the EJB spec does NOT define this. This *is*
> proprietary, only everyone tends to do it in the same way.
>
> So, my point is that we *should* comply with the latest version of J2EE
> and allow stand-alone application clients to use the java: namespace. In
> order to do that there should be some changes to how we do things
> though. For example, I would suggest that our use of the global naming
> JNDI namespace changes so that the deployer *cannot* choose arbitrary
> JNDI-names *per bean* but instead only chooses a JNDI-root to which all
> beans are bound. E.g. "myapp" so that the bean "MyBean" would end up in
> "myapp/MyBean" in global JNDI. This means that the java: implementation
> for stand-alone clients become VERY simple since all we have to do is
> bind the name "java:comp/env" to the LinkRef "myapp". If I then lookup
> "java:comp/env/MyBean" in the client this would automatically resolve to
> "myapp/MyBean". Tada. Done.
>
> If we keep the current way of doing things where each bean can be given
> a JNDI-name this becomes much more work for the deployer since he would
> have to resolve ALL bean references manually.
>
> Comments on this? Does everyone understand what I'm talking about?
>
> /Rickard
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]