EJB 3.0 Session Bean Inheritence
Hi all,
Can one stateless session bean extend another? I get "no" for an answer during deployment of my EJB module. I'm using NetBeans 5.5 with Sun App Server 9.0.
For example:
@Stateless
MySessionBean1 implements ...some remote interface {
...
}
@Stateless
MySubBean extends MySessionBean1 implements some more interfaces {
...
}
[398 byte] By [
sagmana] at [2007-11-27 2:56:31]

# 1
There is no support for "component" inheritance in EJB. You are free to use implementation
inheritance to implement your bean class, but the fact that a super-class happens to be the
bean class of a different EJB has no bearing on the processing of the sub-class. So, for example,
the fact that MySessionBean1 has "some remote interface" will not automatically make
"some remote interface" one of MySubBean's remote interfaces.
--ken