I don't know your code, but it looks like you forgot to handle the RemoteException at 
line 294 in Apple_ORSet295.java.

Anyway, why use a compound key? IMHO generating a technical key has a lot of 
advantages and the downside that
you need to handle the uniquesness of the candidate key is not that much of a problem. 
You can handle that in your
EJBs.

The upside is: 1) more flexibility for future extensions of your code, 2) you can 
change fields of a candidate key, which is costly
for a primary key, 3) you can choose a key your DBA likes.
The downside is: 1) a bit of extra code, 2) an extra index on your database, 3) a 
small performance penality on inserts (most often you
can forget that).

Good luck
FE

On Tuesday, March 13, 2001 10:39 PM, Christian Billen [SMTP:[EMAIL PROTECTED]] wrote:
> Hi everyone,
> 
> Can one specify another EJB Entity object as part of the primary key for one
> ejb?
> 
> Here is a imaginary example:
> 
> TreeEJB has a one to many relationship to AppleEJB
> 
> And I have a primary key for AppleEJB which contains TreeEJB and a AppleID
> 
> In my application when I tried to do something similar to the figurative
> example above I got:
> Apple_ORSet295.java:294: Exception java.rmi.RemoteException must be caught,
> or it must be declared in the throws clause of this method.
> 
> I can't quite model this as a dependent relationship because I might be
> refering this AppleEJB from other EJB.
> 
> Now my question: is this a bug or is it something I should not be doing? how
> else could I model that an apple must be unique within its tree?
> suggestions?
> 
> Thanks,
> 
> Christian
> 
> 

Reply via email to