Benjamin,
I don't think my last reply went through.

You can in effect have your beans be abstract.

Abstract base class bean :
--------------------------------------------------
package com.benjamin;

public class ABCBean implements EntityBean {

   // all your base behaviour methods

   // abstract method
   abstract public Collection getSpecificData();
}

Concrete subclasses :
--------------------------------------------------

package com.benjamin;

public class ConcreteLDAPBean extends ABCBean {
   public Collection getSpecificData() {
      // goes to LDAP for data
   }
}

package com.benjamin;

public class ConcreteRDBMSBean extends ABCBean {
   public Collection getSpecificData() {
      // goes to RDBMS for data
   }
}


Then in ejb-jar.xml specify the bean-class as the concrete subclass.

ejb-class>com.benjamin.ConcreteLDAPBean</ejb-class>

Chris

-----Original Message-----
From: Benjamin Broll [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 09, 2000 1:11 PM
To: [EMAIL PROTECTED]
Subject: AW: Cannot inherit methods ... ?


> Now since I don't want this bean to be created (because this would create
> invalid data in the database as well) I need a possibility to declare the
> bean abstract. Do you have this possibility with EJB?
>


Well, as a research showed you must not declare an Entity Bean abstract. But
how can I solve this issue if I cannot declare the class abstract? If I
defined it as an interface, I would have to duplicate the behaviour in every
bean implementing the interface ... suggestions?

.bbr

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to