There has been lively discussion on this topic in the ejb-interest
mailing list.  You can search the archives for inheritance here...

  http://archives.java.sun.com/archives/ejb-interest.html

EJB inheritance has some general restrictions, though I don't think
you'll find Orion to be the culprit.

In summary, here are the restrictions as imposed by the EJB spec:

  - Bean-managed EJBs must return a primary key for an ejbCreate()
method. Any class that inherits from the bean-managed EJB class cannot
have an ejbCreate() method that returns a different primary key class.
The restriction also applies to the bean-managed EJB's ejbFind()
method.  

  - Since EJB Home methods return a distinct remote interface, you
cannot have a Home interface inherit from another Home interface that
returns a different remote interface.  In other words, BankAcountHome
cannot extend AccountHome and attempt to return a BankAccount remote
interface for a finder method whereas the AccountHome will return an
Account remote interface.

You can, however, use inheritance in EJB beans to refactor common
business methods into a common superclass, and/or override base class
behavior. 

Mike

 
--- Kurt Hoyt <[EMAIL PROTECTED]> wrote:
> I know the EJB 1.1 and 2.0 specs avoid (finesse?) the issue of bean
> inheritance, but has anyone tried doing anything that mimics
> inheritance
> using Orion? If so, can you share how you accomplished it?
> 
> I have an object model that uses inheritance. I started with a trial
> version
> of PowerTier from Persistence, which does support inheritance, but
> also
> costs two arms and a leg just for developer licenses, not to mention
> the
> wheelbarrows of cash needed to deploy it.
> 
> Orion has cleared all but two hurdles for us in our evaluation:
> servlets (I
> haven't tried one yet, but JSPs work, so I'm pretty sure we're OK
> there) and
> "inheritance".
> 
> Thanks.
> 
> Kurt in Atlanta
> 
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Reply via email to