users@ejb-spec.java.net

[ejb-spec users] [jsr345-experts] Additional JNDI bindings via _at_EJB

From: Carlo de Wolf <cdewolf_at_redhat.com>
Date: Fri, 17 Feb 2012 19:17:37 +0100

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