geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <>
Subject Re: XMLBeans, a quick comment
Date Sat, 16 Aug 2003 08:48:35 GMT
Yes this is what I meant.


On Saturday, August 16, 2003, at 04:09  PM, Aaron Mulder wrote:

> 	I think what he means is that Castor, as configured, generates
> more or less POJOs -- if you look at the * classes in
> org.apache.geronimo.twiddle.config, there's nothing Castor or XML 
> specific
> at all.  I take advantage of this too in the JSR-88 code I'm about to 
> send
> out.  One of the advantages here is for JSR-88, you can populate a set 
> of
> deployment information JavaBeans either from the JSR-88 DConfigBeans, 
> or
> from an XML DD.  It's a one-liner to load or store an XML file, but the
> actual objects have no particular XML code in them.  (Granted, the
> separate set of XXXDescriptor objects *do* have the XML stuff.)
> 	That said, I haven't seen what XMLBeans generates, so I don't know
> how it compares.
> Aaron
> On Sat, 16 Aug 2003, James Strachan wrote:
>> On Friday, August 15, 2003, at 07:49  pm, Jason Dillon wrote:
>>> Just looked at the generated sources and it does not appear that
>>> XMLBeans generated bits are intended to function in a non-XML
>>> environment.
>> What do you mean? That the generated beans depend on XMLBeans? Thats
>> true of Castor generated beans too isn't it?
>>> For example, if someone wanted to construct a bean just using APIs it
>>> looks like they may have to put in some dummy XML fluff, which is
>>> sorta silly IMO.  But I have not really played with it that much, so
>>> this could just be an assumption.
>> I don't follow.
>>> I would like to see that we eventually use a common tool for xml
>>> binding, but I want to make sure that such a tool will generate
>>> sources which can be easily used when XML is not there at all (like
>>> how Castor generates sources).
>> I still don't fully understand what you mean by 'XML not there'. The
>> generated beans from XMLBeans can be used as beans - though there is 
>> an
>> interface / impl separation - I'd be OK with just generating beans
>> rather than an interface + impl but I guess it gives some flexibility.
>> One unique feature of XMLBeans is that its not lossless. So if you
>> parse some XML you can tinker with the beans & write out the XML again
>> preserving any comments and so forth. This could be useful to allow
>> customisation of XML config files (say, via JMX) & then write them 
>> back
>> to disk.
>> James
>> -------

View raw message