users@ejb-spec.java.net

[ejb-spec users] [jsr345-experts] Re: Additional JNDI bindings via @EJB

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Wed, 14 Mar 2012 11:07:11 -0700

Experts,

I'd like to close on this item. If I don't get any supporting replies
soon, I would treat it as a no.

thanks,
-marina

Carlo de Wolf wrote:
> Right now it is possible to define additional JNDI bindings via @EJB
> on the bean class. The bean developer is required however to make the
> reference fully resolvable.
>
> @Stateless
> @Local (Echo.class)
> @EJB(name = "java:global/Additional", beanName = "SampleSLSB",
> beanInterface = Echo.class)
> public class SampleSLSB implements Echo {
> }
>
> It would be nice if the default bean referenced in a class level @EJB
> would be the current bean. Furthermore if only 1 bean interface is
> exposed, just reference that one.
>
> @Stateless
> @Local (Echo.class)
> @EJB(name = "java:global/Additional")
> public class SampleSLSB implements Echo {
> }
>
> What do you think?
>
> Carlo