Steve Roth wrote:
>
> After reading the EJB spec and playing around with EJBs for a few months,
> I'm running into an issue and am wondering if anyone else has found a
> solution:
Oh, good, I'm not the only one. :-)
Let me see if I can regurgitate what I've been told.
This is apparently component inheritance (whatever that's supposed to
mean). Briefly put, it means that the specification as currently
written does not support this kind of inheritance. I and others regard
this as a serious flaw that must be fixed in the 2.0 specification.
In the meantime, you *can* sort of get around it. The majority opinion,
which I heartily do not subscribe to, involves ensuring somewhat
artificially that your entity beans, for example, map to leaf classes in
your domain model. You'll hear lots of talk about "helper" classes when
this workaround is espoused.
The second way around it is to implement your own home/finder interfaces
that understand the database structure and delegate their
implementations to the correct "real" EJBHome class' findByPrimaryKey()
method. There's a bit more to it than that, but that will get you
started.
This has been a thread that dates back to the germination of the EJB
specification; you might also dig through the archives
(http://archives.java.sun.com) and see if that helps you. The consensus
as I interpreted it is basically--unfortunately--avoid writing things
that take advantage of polymorphism of enterprise beans. Sorry the news
isn't better. :-(
Cheers,
Laird
===========================================================================
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".