I don't see how using a GUID can solve the finder problem. Won't you get
object slicing (an A entity bean instantiated around a B bean's data) if you
use an A home finder method that happens to match a B bean? How does a GUID
resolve this?
And regarding needing to fix the finder methods as you add new subclasses...
Either:
a) you get the slicing problem that I listed above, in which case my
solution eliminates the slicing problem, and there is no way to get the
correct results (including subclasses) from a finder method without writing
custom code
or
b) there is some other problem with finder methods and extending entity
beans that I don't understand.
If I were going to write custom code for it, I would put in a static block
in each bean class that registers its finder with its parent class, and thus
dynamically (but at class load time) builds a tree of finders that will
resolve the problem. I would not need to change the parent class when I add
a child class, the only thing that I need to do is be sure that all bean
classes are loaded before I use any finder that matches on that bean class.
I can elaborate on that solution if you like. I'm certain that it would
work, but it would involve moving your 'real' finder methods from the home
class to a session bean (since the home class is generated).
Bobby Martin
Cosm development team
----Original Message Follows----
From: "Sacha Labourey" <[EMAIL PROTECTED]>
Reply-To: "jBoss" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Subject: RE: [jBoss-User] EJB design/safety question
Date: Wed, 14 Feb 2001 08:58:50 +0100
Hello Bobby,
Your id development is interesting but I do not think it was Edward's point.
The id IS for sure an issue but it can also be solved by using a GUID
(Globally Unique ID). The "problem" is that for each new sub class you had
to your inheritance tree, you need to modify your parents home finders so
that they take in account your new inheriting classes. Consequenlty, it
becomes more a management problem of your code.
HTH. Cheers,
Sacha
> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Bobby Martin
> Envoy� : mardi, 13 f�vrier 2001 18:07
> � : [EMAIL PROTECTED]
> Objet : RE: [jBoss-User] EJB design/safety question
>
>
> I had thought about the issue, and saw that the finding issue
> would be one
> problem (with object slicing when you requested a B EJBObject
> through an A
> finder). I think that I see a fairly easy, if somewhat kludgy,
> solution to
...
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]