This might come as a bit of a surprise...but bi-directional relationships
are a feature of EJB2.0, which is not final, and in fact if the rumours
are to be believed, will undergo major changes in the next draft. I find
it astounding that someone thinks that incomplete partial support for a
moving target of a spec is a 'bug'. Most app servers support NONE of EJB
2.0. And certainly, of those that do, not a single one has 'complete'
support for it. Even Sun's RI blows up in various ways when using EJB 2.0
beans. If you feel that adding bi-directional CMP in accordance with the
latest incarnation of the spec is easy, and keeping that in sync (in a
timely fashion) with the spec, then you should start your own
appserver. You'll have a huge following I'm sure, if you deliver.
Hani
On Thu, 5 Apr 2001, Ray Harrison wrote:
> Hi Reid -
> What App Servers currently offer m-n relationships - I'm interested in exploring how
>some of them
> operate.
>
> Cheers
> Ray
> --- Reid Hartenbower <[EMAIL PROTECTED]> wrote:
> > I have found the lack of bi-directional support very frustrating, and think
> > that it so impedes CMP functionality that it should be qualified as a bug,
> > and not a pending feature.
> >
> > I also don't see what the big technical challenge in implementing it would
> > be.
> > If Orion is going to be this sluggish with support and new features, I would
> > ask them to consider going open source. Let me fix it if you won't--do you
> > hear me Orion guys?
> >
> > My workaround is to manage the relations with a 'RelationManager' session
> > bean. For n-m relations, I create my join tables with composite primary
> > keys, as in (for hsql):
> >
> > CREATE TABLE User_Order (
> > userId CHAR(37) NOT NULL,
> > orderId CHAR(37) NOT NULL,
> > PRIMARY KEY (userId, orderId));
> >
> >
> > Then in the session bean, I explicitly create both sides of the relationship
> > (eg. user.addOrder(order) and order.addUser(user) ) and catch the duplicate
> > key exception, as in:
> >
> > user.addOrder(order);
> > if(NON_DIRECTIONAL_BUG) {
> > try {
> > order.addUser(user);
> > }
> > catch(EJBException e) {
> > // for Orion 1.4.7 bidirectional bug;
> > }
> > }
> >
> > When (if) Orion fixes this bug, the modifications to my code will be slight.
> >
> > ----- Original Message -----
> > From: "Ray Harrison" <[EMAIL PROTECTED]>
> > To: "Orion-Interest" <[EMAIL PROTECTED]>
> > Sent: Thursday, April 05, 2001 10:50 AM
> > Subject: Re: Bi-directional relations
> >
> >
> > > Nope.
> > > --- Patrik Andersson <[EMAIL PROTECTED]> wrote:
> > > > Does bi-directional relations work yet? I'm pretty sure it did not work
> > the
> > > > last time I tried, but that was a fix fix versions ago.
> > > >
> > > > Any news on this issue?
> > > >
> > > > regards,
> > > > Patrik Andersson
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get email at your own domain with Yahoo! Mail.
> > > http://personal.mail.yahoo.com/
> > >
> > >
> >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
>