I'm back.  Sorry about that.  :-)

I had sent out an earlier message asking if the problem with EJB
inheritance was basically that if you inherit one bean from another, the
first's home interface finder methods cannot return instances of both
the first and the second classes.  There was a general nod of agreement
that that was it.  In short: finder methods won't work the way you want
them to.  This needs to be fixed in the 2.0 spec; I understand and
agree.

I just thought of another potential problem having to do with roles
(actually, come to think of it, this problem might manifest itself while
being spec 1.1 compliant!).  Hopefully someone can tell me if there's
something obviously wrong with the following scenario.

Suppose, legally (this isn't component inheritance, this is just basic
class inheritance, allowed by the 1.1 spec.), you have a bean class that
inherits from another bean class:

  public class GeorgeWBushBean extends PoliticianBean....

...and you have a method that the subclass implements by doing this:

  // override
  public String rant() {

    // capture generic rant, unless this call fails!
    StringBuffer rant =
      new StringBuffer(super.rant());

    // now add to it
    rant.append("And another thing: McCain ate paste as a child!");

    // give it back
    return rant.toString();

  }

Suppose that in the superclass'--PoliticianBean's--deployment
descriptor, only people playing the CivicMinded role may invoke the
rant() method.  Now suppose that in the
subclass'--GeorgeWBush's--deployment descriptor, only people playing the
RichElite role may invoke the rant() method.  Add the fact for this
discussion that it just so happens that no one in the RichElite role
will ever be in the CivicMinded role.  Will the super.rant() call
succeed if its caller is in the RichElite role but is NOT in the
CivicMinded role?

(I should try this out but (a) we don't have our appserver in house yet
and (b) I can't get the &$!? Sun deploytool to work.  Curious if this is
obviously permissible or obviously wrong.)

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".

Reply via email to