RE: Bi-directional relations (my kludge)
M-N relationships do work in Orion, although not bidirectionally. WebLogic has good support for most of the EJB2.0 spec, and there is a product that runs on top of JBoss that allows you to deploy EJB2.0 packages (it converts everything to the 1.1 format for JBoss to consume). I don't remember the name of it offhand, but I'm sure you'll find it if you look through the JBoss lists. Reid: I've got to agree with Hani; complaining with such bitterness about the incompleteness of Orion's EJB2.0 support is ludicrous, especially when you consider that Orion is one of ONLY TWO servers on the market to publicly offer *any* native EJB2.0 support. Incidentally, rather than putting that code of yours in a separate session bean, you can put it in the entities themselves, completely preserving the EJB2.0 relationship method illusion. Or better yet (I have found), you can simply hide a call to a finder within the getEntityCollection() business methods... this allows you to leave the relationship unidirectional in implementation. Jeff -Original Message- From: Ray Harrison Sent: Thu 4/5/2001 6:47 PM To: Orion-Interest Cc: Subject: Re: Bi-directional relations (my kludge) 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, > orderIdCHAR(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/ winmail.dat
Re: Bi-directional relations (my kludge)
Nice! Though Orion and Weblogic both support incomplete versions of 2.0 (and each different aspects at that) and all of that is subject to change, of course! I couldn't tell though if Weblogic supports m-n relationships in a solid manner. --- Reid Hartenbower <[EMAIL PROTECTED]> wrote: > Hi Ray. The only vendors I know of who have EJB 2 implementations are Orion > and WebLogic. > I definitely prefer Orion's development environment, but there is no > comparison in terms of support (and I mean free support; WebLogic staff > developers routinely answer newsgroup questions and once, in response to a > bug I submitted concerning compound primary keys, a WL developer not only > identified himself as the one working on the problem, but asked me if I > thought his proposed solution was acceptable. Wow.) > Reid > > - Original Message - > From: "Ray Harrison" <[EMAIL PROTECTED]> > To: "Orion-Interest" <[EMAIL PROTECTED]> > Sent: Thursday, April 05, 2001 6:47 PM > Subject: Re: Bi-directional relations (my kludge) > > > > 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, > > > orderIdCHAR(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/ > > > > > > > __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Bi-directional relations (my kludge)
Hi Ray. The only vendors I know of who have EJB 2 implementations are Orion and WebLogic. I definitely prefer Orion's development environment, but there is no comparison in terms of support (and I mean free support; WebLogic staff developers routinely answer newsgroup questions and once, in response to a bug I submitted concerning compound primary keys, a WL developer not only identified himself as the one working on the problem, but asked me if I thought his proposed solution was acceptable. Wow.) Reid - Original Message - From: "Ray Harrison" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, April 05, 2001 6:47 PM Subject: Re: Bi-directional relations (my kludge) > 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, > > orderIdCHAR(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/ > >
Re: Bi-directional relations (my kludge)
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, > > orderIdCHAR(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/ > >
Re: Bi-directional relations (my kludge)
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, > orderIdCHAR(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/
Re: Bi-directional relations (my kludge)
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, orderIdCHAR(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/ > >