hi!
Let me quote a former message form me *g* :

"
     For me the following worked:

     For the bean:
      A implements EntityBean
      B extends A

     For the home interface:
      A extends EJBHome
      B extends EJBHome
     each with its own create and find methods.

     For the remote interface:
      A extends EJBObject
      B extends A

     I am not sure whether I had to deploy A to get B deployed or not.

Be careful with the create methods. 
     1. Don't forget the appropriate postCreate methods.
     2. they don't behave the same way as constructors do. For a new
     B object the A constructor gets called before the B constructor.
The
     create methods are _not_ called in that schema. 
"

I now want to add:

BUT you can use these fancy this.super() calls in the create methods to
avoid duplicate code. Works pretty well.

Be carful with finders ! For a finder to work you need to know of which
final type your object will be. Lets say B and C extend A. You can't
just call a finder at A.findBySoemthing() and expect it to return an
object of type B or C. A.findBySomething() will look in the wrong table
! 

I haven't looked at EJB 2.0 yet. Is there something in it about
inheritance ?

Cheers,
Tobias




Shahar wrote:
> 
> [Hi again]
> off course, I also intend to extend the remote interface. Possible ?
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to