...IMHO if the user specifies a jndi-name it should be used, it provides an exact binding. Unless the url#ejb-name format is used, ejb-link is not as deterministic.
OK, fine we could elect to always try the jboss specific mechanism of jndi-name first, and fallback to the ejb-link name. But, you do agree that this should be consistent between war and ejb, right?
I would say the opposite behavior should be the default since if there is an ejb-link
What about an approach whereby both war and ejb deployers always try the jndi-name first, and if there is none specificied, or if the jndi-name is not bound, or if the jndi-name is bound to the wrong home class, we fallback to the ejb-link name? That wouldn't require any extra config switches and would cover the situation where beans in existing deployments have specified both and the jndi-name is wrong.
it must be resolvable in the scope of the current deployment while a jndi-name
cannot in general be resolved since this can refer to an external server that need not even be available during deployment. Therefore, use the ejb-link first, and if none is specified, use the jndi-name. To maintain the current behavior add a flag to the war deployer which treats failures to resolve ejb-links as deployment errors. This would be false by default in which case a failure to resolve an ejb-link triggers fallback to the use of the jndi-name.
ejb-local-refs are only intended for ejbs in the same deployment so ejb-link should suffice, but the spec is not very explicit. The way jboss works, this won't be a problem. It should not break any existing deployments.
Sorry, but I'm not sure what you mean - do you mean that you are or aren't in favour of making the handling consistent, and therefore introducing the ejb-local-ref element?
There is no need for an ejb-local-ref in the JBoss specific descriptors as
the ejb-link element handles this in the standard descriptor. There is no reason why the metadata needs to be expanded to allow for specifying the local home jndi name.
-- xxxxxxxxxxxxxxxxxxxxxxxx Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development