Hi Sahoo,
The reason is it's a tradeoff between uniqueness and ease-of-use. One of the qualities of this
default that is extremely useful is for it to be capable of being derived based only on the
interface. That allows the *client-side* mapping of an EJB dependency to be completely automatic as well
, so that in the 90% case the developer doesn't have to specify any additional information.
If the generated global JNDI name includes an application name, it means that any Remote EJB
client outside of the application must always explicitly set the mapped name of the @EJB or ejb-ref, since it can't be derived from only the Remote business interface, which is the only piece of information guaranteed to be available.
The idea is for the default to cover the simple most common case. It's a fair tradeoff for the
more advanced and less common case of multiple EJBs exposing the same Remote business
interface to require some additional configuration.
--ken
[Message sent by forum member 'ksak' (ksak)]
http://forums.java.net/jive/thread.jspa?messageID=227136