Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@www.apache.org Received: (qmail 23231 invoked from network); 9 Sep 2003 15:47:33 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Sep 2003 15:47:33 -0000 Received: (qmail 49410 invoked by uid 500); 9 Sep 2003 15:46:56 -0000 Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 49324 invoked by uid 500); 9 Sep 2003 15:46:55 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 49048 invoked from network); 9 Sep 2003 15:46:51 -0000 Received: from unknown (HELO www.princetongames.org) (66.250.40.202) by daedalus.apache.org with SMTP; 9 Sep 2003 15:46:51 -0000 Received: from localhost (ammulder@localhost) by www.princetongames.org (8.11.6/8.11.6) with ESMTP id h89CpIg02253 for ; Tue, 9 Sep 2003 08:51:18 -0400 X-Authentication-Warning: www.princetongames.org: ammulder owned process doing -bs Date: Tue, 9 Sep 2003 08:51:17 -0400 (EDT) From: Aaron Mulder X-X-Sender: ammulder@www.princetongames.org To: geronimo-dev@incubator.apache.org Subject: Re: [XML][Deployment]POJO design? In-Reply-To: <3F5D9460.7010805@mortbay.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Tue, 9 Sep 2003, Greg Wilkins wrote: > This is not just about code duplication - I was just responding to the > suggestion that my proposal is more complex or more code. The main issue > that I started talking about is that the type hierarchy is wrong. > > Eg. If we don't have a common geronimo.ejb.EJB class for Session, Entity > and Message, then we can't write any code that deals with these beans in > common - eg we are going to have to write the marshalling code 3 times, etc. etc. The only thing these classes have in common (currently) is the content in (j2ee.)ejb.EJB! And you can treat them in common in that way! Then when you go to write the children (refs and so on), you'll have to write a cast, but give me a break!!! public void marshallGeronimoEjb(j2ee.ejb.EJB foo) { marshallGeronimoEjbRef((GeronimoEJBRef[])foo.getEJBRef()); marshallGeronimoEnvEntry((GeronimoEnvEntry[])foo.getEnvEntry()); ... } public void marshallGeronimoEjbRef(GeronimoEjbRef[] foo) { ... } Apparently, you even proposed adding some getters to do the cast for you, so even that goes away. I really don't see what your issue is. Now it's possible that some new common properties will be added, but what can you think of that all EJBs have? Caching and pooling and clustering are probably all different across Sessions, Entities, and MDBs, only Entities have CMP and CMR, only MDBs have JMS, etc. Even MDBs don't have a JNDI name... > If the geronimo classes don't implement/extend the standard classes then > we can't pass them into any class that takes the standard classes. But they *will* extend the standard class! geronimo.ejb.Session->ejb.Session->ejb.RpcBean->ejb.EJB->j2ee.Displayable Anything that takes an ejb.Session is totally OK taking a geronimo.ejb.Session! > So I am not proposing change based on code volume - I'm proposing change > because the design is currently not correct. The code actually checked in at this moment is not correct, I agree, but that's not what I'm talking about. Perhaps it would help if I submit a patch, and you can look at what I'm actually suggesting. Aaron