Ignoring server limitations (which I know is often hard to do), from an
EJB1.1 spec point of view, I think polymorphism is better achieved by
getting away from use of primary keys as the attribute type for references
to other entities, and instead simply using the EJBObject reference as the
attribute type for a CMP field. Then the bean implementation does not need
to use findByPrimaryKey, so does not need to figure out which Home is the
right one to call findByPrimaryKey on. Obviously taking that approach
depends on having server support for persisting such references. I'm not
sure which servers provide such support today, but given that the EJB1.1
spec defines that ability any fully compliant EJB1.1 server must support
it.
Of course that alone doesn't solve all the problems related to inheritance
and polymorphism. For example, you likely also want other finders to be
able to return a collection whose elements can be instances not only of
that home but of homes for subclasses, and the spec does not address that
yet.
Erik Voldal
Email: [EMAIL PROTECTED]
Phone: 507-253-4788
===========================================================================
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".