-
1. Re: Should Bean classes be developed as 'abstract'
tthiele Nov 23, 2002 8:17 AM (in response to qmqasim)I don't know the actual issue of the Monson-Haefel book. AFAIK an EJB can't be abstract. Either you must derive your CabinBean class to a
non abstract class e.g. CabinCMP manually or let it to a tool like xdoclet. Please refer to the Getting Started Documentation for JBoss and the XDoclet (sourceforge) Documentation for this topic.
Regards
Tilo -
2. Re: Should Bean classes be developed as 'abstract'
andyjeff Nov 23, 2002 9:39 AM (in response to qmqasim)My understanding is that with EJB2.0 (JBoss 3.0) you have to declare classes as abstract, and declare the set/get methods as abstract. In EJB1.1 this was NOT the case. This was a change in the EJB2.0 introduction. The OReilly book (issue 3) refers (almost completely) to EJB2.0, hence what you have read. This applies to CMP entity beans anyway.
HTH -
3. Re: Should Bean classes be developed as 'abstract'
neitzel1 Nov 23, 2002 10:45 AM (in response to qmqasim)AN EJB cannot be abstract? I think, that this is wrong. When I look at my Beans I will always find:
public abstract class MyBean implements EntityBean {
...
public abstract MyType getMyField();
public abstract void setMyField(MyType value);
...
}
And I think that this is the normal way, to write a EB.
This is also described in the JBoss Workbook. Just have a look at http://www.oreilly.com/catalog/entjbeans3/workbooks/
Konrad