Hi all,

I've just been reading this thread. Paul, I agree that the business and
technical contract do some mixed up here but I think the answer you're
looking for is ... make the class you wrote abstract. That way, you don't
have to implement the EJB lifecycle methods; xdoclet will take care of them
for you in its subclass.

This may be a bit simplistic but in my eyes, xdoclet simply saves you a bit
of tedious coding by implementing the lifecylce methods for you in the
subclass that actually gets deployed. Note that if you do want to get
involved in the EJB lifecycle then simply implement the method(s) and
xdoclet's implementation of the same method(s) will call you.

Hope this helps.

Cheers, Matt

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Paul
> Cantrell
> Sent: 08 July 2002 17:20
> To: [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-user] Session bean subclasses?
>
>
> >>> It separates the business contract from the technical
> >>> contract, so you don't have ejbActivate, ejbPassivate etc.
> >>> cluttering up your code
> >>
> >> If I leave those methods out, it complains that my class isn't
> >> implementing the SessionBean interface.  If I don't implement
> >> that interface, ejbdoclet passes over my session bean entirely.
> >
> > So you give xdoclet an ordinary class and expect a session bean
> > subclass?
>
> No, no, I don't expect that.  I understand perfectly well why
> it's looking for the session bean interface.
>
> My question is (still): what good does the subclass do?  It does
> *not* separate the business methods from the "technical"
> methods -- if I implement the SessionBean interface, I need to
> have ejbActive and friends cluttering up my code, as you put it.
>
> How can I rephrase this question so it makes sense?  It is a Catch-22:
>
>    no "implements SessionBean" => xdoclet doesn't generate a subclass
>       "implements SessionBean" => subclass is useless
>
> Paul
>
> _____________________________________________________________________
>   "At the level of bits, censorship and digital-rights management are
>    technologically identical."    Hal R. Varian, _The New York Times_
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Oh, it's good to be a geek.
> http://thinkgeek.com/sf
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to