Is it acceptable to create entity beans which subclass other (non-ejb)
classes?

So, for example, we would have

public class Person {
  public Person(String name)
  {
  ...
  }
  public String getName(){
   return name;
  }

  public void setName(String name) {
   this.name = name;
  }
}


public class ContactBean extends Person implements EntityBean {
  public ContactKey ejbCreate(String name, int age, String phonenumber)
  {
  ...
  }
}


public class EmployeeBean extends Person implements EntityBean {
  public EmployeeKey ejbCreate(String name, String position)
  {
  ...
  }
}

That way we wouldn't have to rewrite the person methods in both the employee
and the contact classes
Or would it be better to make Person a bean, and make it a property of both
the contact and employee classes?
Or woudl it be better to just make person an interface and implement it in
both the contact and employee classes?

===========================================================================
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