Originally posted by Martijn Verburg:
Hmmm, interesting! Have you contacted Sun about this?
Actually, there is nothing to sneer at, Martijn.
Another "Easter egg":
[QUOTE 4.6.2 Session Bean Class]
The session bean class may have superclasses and/or superinterfaces. If the session bean has
superclasses, the business methods, lifecycle callback interceptor methods, the timeout callback
method, the methods of the optional SessionSynchronization interface, the
Init or ejbCreate<METHOD> methods, the Remove methods, and the methods of the
SessionBean interface, may be defined in the session bean class, or in any of its superclasses.
A session bean class must not have a superclass that is itself a session bean class. [QUOTE "EJB in Action" (Panda) - 5.2.2 The @Resource annotation in action - page 155]
@Resource and annotation inheritance In chapter 3, you learned that an EJB bean class may inherit from another EJB
class or a POJO. If the superclass defines any dependencies on resources using
the @Resource annotation, they are inherited by the subclass. For example, Bid-
ManagerBean extends another stateless EJB, PlaceBidBean, where PlaceBidBean
defines a resource, as in this example:
The environment entry defined in the PlaceBidBean will be inherited by the
BidManagerBean and dependency injection will occur when an instance of Bid-
ManagerBean is created.
As useful as DI is, it cannot solve every problem. There are some cases where
you must programmatically look up resources from a JNDI registry yourself. We�ll
talk about some of these cases next, as well as show you how to perform programmatic
lookups.
I tried...
SessionInterfaceBean described in my previous post... Application works!
But I am with the spec here: the Bean provider
should not extend another Session bean, even if the app works.