Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 4512 invoked from network); 4 Mar 2008 08:41:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 08:41:50 -0000 Received: (qmail 72956 invoked by uid 500); 4 Mar 2008 08:41:45 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 72905 invoked by uid 500); 4 Mar 2008 08:41:45 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 72894 invoked by uid 99); 4 Mar 2008 08:41:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 00:41:44 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shivahr@gmail.com designates 72.14.204.226 as permitted sender) Received: from [72.14.204.226] (HELO qb-out-0506.google.com) (72.14.204.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 08:41:06 +0000 Received: by qb-out-0506.google.com with SMTP id o24so3101755qba.1 for ; Tue, 04 Mar 2008 00:41:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=9GqhhK9TkG1OAHpwEPs4Pu4/XC0fRfcY6v6OTB1rA0U=; b=N2pwqCaFxFXviDEmX1V4V/Bnmks4cj0ok4IKO526RZqNz8JFpYxwVHPLd6nHyM+EUDq2UjJkQbtrJylQCW0I2U2XENkTW2oN4B9K2xdY0kddpm41RhEZbz34W0srHNqNJEAytChmcgi5qOuAcmmBv1BVP1I+g58j9YJ2EhNY8F8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=F5p1sBZgtVlw2q6GJuc4em8pDO9AoLc6FZ+jr8ovpxuq2ykHfqq8YGZOD7ccsj3eTu63hibflbYLm15xTjsiQvD1uKWjC9xJtyZ6Ca5Vp561gu6nwk55EC7kGW2bfHX43Ezc8iDT5ynu2NEIgoOewud3OqK7HOf8o/+y3XKf8so= Received: by 10.64.243.10 with SMTP id q10mr1743531qbh.25.1204620075584; Tue, 04 Mar 2008 00:41:15 -0800 (PST) Received: by 10.65.233.14 with HTTP; Tue, 4 Mar 2008 00:41:15 -0800 (PST) Message-ID: <5da94e5a0803040041w2c13c961kdeb2a7f3b304f350@mail.gmail.com> Date: Tue, 4 Mar 2008 14:11:15 +0530 From: "Shiva Kumar H R" To: dev@geronimo.apache.org Subject: Re: [Discuss] Model for deployment plans in GEP - Move from EMF to XMLBeans or JAXB? In-Reply-To: <5da94e5a0802120046w20c0c974u8ed6e0875c32573b@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9799_4989119.1204620075578" References: <5da94e5a0802110716g2302872cx45fd57c6fc1a4342@mail.gmail.com> <5da94e5a0802120046w20c0c974u8ed6e0875c32573b@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9799_4989119.1204620075578 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline There have been further discussions on this in IRC and in JIRA. As recommended in http://mail-archives.apache.org/mod_mbox/geronimo-dev/200802.mbox/%3c5da94e5a0802212321m4b282128q89add861e150c64f@mail.gmail.com%3e I am summarizing those discussions below: (Tim, DJencks, DBlevins & Yun Feng - Please correct if am wrong) 1) JAXB/XMLBeans/DConfigBeans: a) On a further discussion about XMLBeans and JAXB, we saw that writing deployment code might turn out be much easier by using JAXB rather than XMLBeans. b) On a discussion about whether GEP should ideally be using JSR-88 DConfigBeans, we wondered if JSR-88 DConfigBeans are a dead idea & should be left alone, because No One other than Geronimo even thinks about trying to implement them. So we concluded that it is worth experimenting with JAXB. 2) Hints from OpenEJB about using JAXB: a) On a discussion about how OpenEJB uses JAXB, it seems schemas are compiled only once (instead of compiling during every build as is currently done both in Geronimo and GEP) and checked in to the source stream. I too don't see any point in compiling G schemas during every build of GEP, and the one time compilation & check in approach of OpenEJB looks ideal to me for GEP also. This would lead to significant savings in build time. Please point out if I am missing something. b) It seems that the real beauty (& ease of use) of JAXB comes from the ability to customize JAXB generated classes (like (i) adding interfaces, (ii) removing all their wrappers for simple types like string, int, boolean etc, (iii) using Maps instead of Lists for auto indexing things that can be keyed, etc). OpenEJB uses those customizations. To keep the Customized JAXB classes and Schema in sync, OpenEJB has unit tests that read in xml documents, write them out again, then compare the results. A similar approach could be used in GEP also. 3) Handling multiple schema versions I guess JAXB could help us better with multiple version of schemas. (I mean a single set of JAXB classes being able to read/write say geronimo-web.xmlin v1.1, v2.0, v2.0.1 etc). We need to explore this more. Tim, Yun Feng and myself are looking at completing this refactoring at the earliest so that we could then focus on other JIRAs/features & release GEP 2.1. Yun Feng already has a patch that has ported good amount of GEP onto JAXB and I am looking at committing it tomorrow. If you forsee any concerns with the approaches above, kindly reply. -- Thanks, Shiva On Tue, Feb 12, 2008 at 2:16 PM, Shiva Kumar H R wrote: > Please see 11-Feb IRC chat btw djencks, shivahr & mcconne > http://servlet.uwyn.com/drone/log/bevinbot/geronimo/20080211 for further > discussions on this. > > As recommended by DJencks we will experiment using JAXB in GEP 2.1. > > -- > Thanks, > Shiva > > > On Feb 11, 2008 9:22 PM, David Jencks wrote: > > > > > On Feb 11, 2008, at 7:16 AM, Shiva Kumar H R wrote: > > > > I went through following tutorials of JAXB & XMLBeans: > > a) Java Architecture for XML Binding (JAXB) > > http://java.sun.com/developer/technicalArticles/WebServices/jaxb/ > > b) Tutorial: First Steps with XMLBeans > > http://xmlbeans.apache.org/documentation/tutorial_getstarted.html > > > > Also searched for comparisons btw them. Latest one I could find is the > > following blog from Jan'2005: http://technology.amis.nl/blog/?p=321 > > > > I am yet to see the value add JAXB brings over XMLBeans. Am I missing > > something? > > > > > > My $0.02: > > > > xmlbeans is a complete and accurate representation of the xml infoset. > > As a result, you can easily manipulate the xml, but you get a slightly > > peculiar java object model that exactly represents the schema and cannot be > > modified. > > > > jaxb is focussed on the java pojos and lets you modify the pojos > > considerably from the xml while still providing accurate mapping. This can > > be much more convenient for directly constructing a pojo tree from xml > > suitable for configuring server components. It provides fewer validity > > checks than xmlbeans. > > > > Openejb is using jaxb and I think their deployment code is pretty simple > > for the complexity they have to deal with. > > > > thanks > > david jencks > > > > > > > > > > On Feb 11, 2008 4:44 PM, Shiva Kumar H R wrote: > > > > > > > > > > > > Despite my liking for xmlbeans and its unique strengths I think a > > > > very strong argument can be made for moving the deployer code to jaxb. > > > > > > > Interesting!! Let me do some quick learning of jaxb and start a > > > separate thread on this. > > > > > > > > > > > > > > thanks > > > > david jencks > > > > > > > > On Feb 8, 2008, at 12:30 AM, Shiva Kumar H R wrote: > > > > > > > > 2) Geronimo Eclipse Plug-in (GEP): > > > > a) Model framework for Geronimo deployment plans: > > > > Currently it is EMF (Eclipse Modeling Framework). With every update > > > > to Geronimo deployment schema, it's a major pain to generate new EMF > > > > classes. If however, GEP uses the same model framework as that of Geronimo > > > > server (XMLBeans), then at least this problem would be solved. IIUC JSR-88 > > > > DConfigBeans would be the ideal model framework for GEP - in that case even > > > > if the model framework of server changes in future, GEP would be unaffected. > > > > > > > > -- > > > > Thanks, > > > > Shiva > > > > > > > > > > > > > > > > > > > > > -- > > > Thanks, > > > Shiva > > > > > > > > > > -- > > Thanks, > > Shiva > > > > > > > ------=_Part_9799_4989119.1204620075578 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline There have been further discussions on this in IRC and in JIRA. As recommended in http://mail-archives.apache.org/mod_mbox/geronimo-dev/200802.mbox/%3c5da94e5a0802212321m4b282128q89add861e150c64f@mail.gmail.com%3e
I am summarizing those discussions below:
(Tim, DJencks, DBlevins & Yun Feng - Please correct if am wrong)

1) JAXB/XMLBeans/DConfigBeans:
a) On a further discussion about XMLBeans and JAXB, we saw that writing deployment code might turn out be much easier by using JAXB rather than XMLBeans.

b) On a discussion about whether GEP should ideally be using JSR-88 DConfigBeans, we wondered if JSR-88 DConfigBeans are a dead idea & should be left alone, because No One other than Geronimo even thinks about trying to implement them.

So we concluded that it is worth experimenting with JAXB.

2) Hints from OpenEJB about using JAXB:
a) On a discussion about how OpenEJB uses JAXB, it seems schemas are compiled only once (instead of compiling during every build as is currently done both in Geronimo and GEP) and checked in to the source stream.
I too don't see any point in compiling G schemas during every build of GEP, and the one time compilation & check in approach of OpenEJB looks ideal to me for GEP also. This would lead to significant savings in build time. Please point out if I am missing something.

b) It seems that the real beauty (& ease of use) of JAXB comes from the ability to customize JAXB generated classes (like (i) adding interfaces, (ii) removing all their wrappers for simple types like string, int, boolean etc, (iii) using Maps instead of Lists for auto indexing things that can be keyed, etc). OpenEJB uses those customizations. To keep the Customized JAXB classes and Schema in sync, OpenEJB has unit tests that read in xml documents, write them out again, then compare the results. A similar approach could be used in GEP also.

3) Handling multiple schema versions
I guess JAXB could help us better with multiple version of schemas. (I mean a single set of JAXB classes being able to read/write say geronimo-web.xml in v1.1, v2.0, v2.0.1 etc). We need to explore this more.

Tim, Yun Feng and myself are looking at completing this refactoring at the earliest so that we could then focus on other JIRAs/features & release GEP 2.1. Yun Feng already has a patch that has ported good amount of GEP onto JAXB and I am looking at committing it tomorrow.

If you forsee any concerns with the approaches above, kindly reply.

--
Thanks,
Shiva

On Tue, Feb 12, 2008 at 2:16 PM, Shiva Kumar H R <shivahr@gmail.com> wrote:
Please see 11-Feb IRC chat btw djencks, shivahr & mcconne http://servlet.uwyn.com/drone/log/bevinbot/geronimo/20080211 for further discussions on this.

As recommended by DJencks we will experiment using JAXB in GEP 2.1.

--
Thanks,
Shiva


On Feb 11, 2008 9:22 PM, David Jencks <david_jencks@yahoo.com> wrote:

On Feb 11, 2008, at 7:16 AM, Shiva Kumar H R wrote:

I went through following tutorials of JAXB & XMLBeans:
  a) Java Architecture for XML Binding (JAXB)
  http://java.sun.com/developer/technicalArticles/WebServices/jaxb/
  b) Tutorial: First Steps with XMLBeans
  http://xmlbeans.apache.org/documentation/tutorial_getstarted.html

Also searched for comparisons btw them. Latest one I could find is the following blog from Jan'2005: http://technology.amis.nl/blog/?p=321

I am yet to see the value add JAXB brings over XMLBeans. Am I missing something?

My $0.02:

xmlbeans is a complete and accurate representation of the xml infoset.  As a result, you can easily manipulate the xml, but you get a slightly peculiar java object model that exactly represents the schema and cannot be modified.

jaxb is focussed on the java pojos and lets you modify the pojos considerably from the xml while still providing accurate mapping.  This can be much more convenient for directly constructing a pojo tree from xml suitable for configuring server components.  It provides fewer validity checks than xmlbeans.

Openejb is using jaxb and I think their deployment code is pretty simple for the complexity they have to deal with.

thanks
david jencks




On Feb 11, 2008 4:44 PM, Shiva Kumar H R <shivahr@gmail.com> wrote:


Despite my liking for xmlbeans and its unique strengths I think a very strong argument can be made for moving the deployer code to jaxb.
Interesting!! Let me do some quick learning of jaxb and start a separate thread on this.
 

thanks
david jencks

On Feb 8, 2008, at 12:30 AM, Shiva Kumar H R wrote:

2) Geronimo Eclipse Plug-in (GEP):
    a) Model framework for Geronimo deployment plans:
Currently it is EMF (Eclipse Modeling Framework). With every update to Geronimo deployment schema, it's a major pain to generate new EMF classes. If however, GEP uses the same model framework as that of Geronimo server (XMLBeans), then at least this problem would be solved. IIUC JSR-88 DConfigBeans would be the ideal model framework for GEP - in that case even if the model framework of server changes in future, GEP would be unaffected.

--
Thanks,
Shiva




--
Thanks,
Shiva



--
Thanks,
Shiva



------=_Part_9799_4989119.1204620075578--