Scott Stark wrote: > > 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. > > > > > I would say the opposite behavior should be the default since if > there is an > ejb-link > 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. >
I disagee with the last bit here. If ejb-link is specified and the target EJB does not exist in the current deployment, then it should definitely be a deployment error as the standard descriptor was mis-assembled. Any flag should be to turn this behaviour off and allow a mis-configured deployment to drop through to the [local-]jndi-name; this should apply to the EJB deployer as well for consistency. If no ejb-link is specified, then a [local-]jndi-name must be specified. If it is not, then it's a deployment error (as it is now for EJBs and should be for WARs) as there is no sensible default (well, maybe the ejb-ref-name less any "ejb/"). > >> > >> 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. > There is, because ejb-link is optional: <!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type, local-home, local, ejb-link?)> ^ ------------------------------| and if it's not there you need to be able to specify the target's local-jndi-name. Jeremy /************************* * Jeremy Boynes * Partner * Core Developers Network *************************/ ------------------------------------------------------- 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