users@glassfish.java.net

Local EJBs on global JNDI namespace

From: <glassfish_at_javadesktop.org>
Date: Wed, 23 May 2007 13:14:50 PDT

As the EJB FAQ says there is no way in Glassfish to bind a local EJB interface to a global JNDI name. I wonder why. I'm not sure the spec prohibits this, but I'm also not sure it allows.

As I was told the main (if not the only) reason is portability. I absolutely agree the portability is very important, but in practice people do not move from one appserver to another frequently, if ever. The general scenario is an appserver becomes chosen and an application is being developed for that particular appserver.

Moreover, there are a lot of a-single-product-for-a-certain-business teams throughout the globe: small teams developing one product for one certain business. They deploy that only product into the appserver. In the absolute majority of cases the chosen appserver runs the only application.

I believe it's very convenient to have local EJB interfaces bound to global JNDI names. Remember SericeLocator pattern. Yes, it was described as an application to stand-alone clients. But it's very convenient to exploit it in server-side components. Since it's a singleton, it doesn't make sense to lookup in java:comp/env context.

On the other hand I know that at least JBoss and Weglogic allow to bind local EJB interfaces to global JNDI names. I used to exploit this ability in my applications. Look what happens: In such a case I cannot port my application from JBoss and Weblogic to Glassfish, not mentioning other appservers (e.g. from IBM, Oracle, etc.)

Actually, my question is what is the reason Glassfish does not bind local EJB interfaces to global JNDI names?
[Message sent by forum member 'danissimo' (danissimo)]

http://forums.java.net/jive/thread.jspa?messageID=218585