users@glassfish.java.net

Re: Portable but custom global EJB names - are they really portable?

From: <glassfish_at_javadesktop.org>
Date: Mon, 12 Jul 2010 13:13:50 PDT

All attributes in @EJB are optional. In the simplest form, it can be

@EJB FooIF foo;

In case of field injection with @EJB, beanInterface defaults to the field type. If your field type is different than the intended beanInterface, then you'll need to specify beanInterface. For example,

@EJB(beanInterface=FooIF.class)
private Object foo;

To answer your first q, yes, it's specified in Java EE 6 spec, since it applies not only to EJB, but also to other components in Java EE 6.
[Message sent by forum member 'cf126330']

http://forums.java.net/jive/thread.jspa?messageID=477393