commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: [betwixt] Making deserialise work like serialise (long)
Date Sun, 24 Jul 2005 17:46:13 GMT
(back from apachecon now)

On Fri, 2005-07-15 at 12:26 +0100, Ricardo Gladwell wrote:
> robert burrell donkin wrote:
> > On Thu, 2005-07-14 at 17:46 +0100, Ricardo Gladwell wrote:
> > it's a bit complicated by the fact that it's a release candidate (not a
> > SNAPSHOT). release candidates should not be uploaded to ibiblio (or any
> > other mirror). but thank's for the warning: i will remember to try to
> > check that the maven repository is right when the full release is cut.
> Please do update it for the final release: so few project maintainers do 
> properly update the Maven repository and that extra work is really 
> appreciated by us downstream Maven users :) Shouldn't the Maven 
> repository have the latest CVS code in it's snapshot release, though?

AIUI the apache releases at the maven repository at ibiblio are sync'd
from the from the apache repository. apache only allows full official
releases to be served from that repository. snapshots are uploaded by
the maven team manually but are not official apache releases. it is
common for snapshots to be out of date.

> > FYI the release candidate is very close now to being accepted as betwixt
> > 0.7. it is strongly recommended that all users upgrade to this new
> > version.
> I'm confused by the above: some of the artefacts in the maven repository 
> are listed as 1.0-dev and -beta, yet 0.7 will be the next release version?

when betwixt was originally promoted from the sandbox, the number was
1.0 and the alpha was cut. the numbering system was then revised to
reflect more accurately the actual state of the betwixt (of release
quality but with an unstable interface and feature incomplete) starting
with 0.5 so that users requiring full, official releases could use


> >> In the end, I cheated and hard-coded XPath to read specific bank
> >> accounts using the BeanReader.registerBeanClass method:
> > 
> > it is possible to make betwixt work that way (you can integrate it with
> > digester rules) but it's pretty black belt...
> Not sure what else to do at this point (BTW, what does "black belt" 
> mean? I'm familiar but not sure). 

just a friendly way of saying expert user :)

> Even the above does not seem to be 
> working.

you'll find it tough because you need to use additional digester rules.
there are a lot of wrinkles and so i won't recommend that you go down
this path...

> >> Some sort of
> >> intelligent comparison between the betwixt file and the bean object
> >> model would be required to interpolate expected behaviour. Perhaps some
> >> sort of additional scripting would be required?
> > 
> > scripting sounds very interesting (hadn't really thought about it
> > before). betwixt is generally declarative but maven's mix of declarative
> > data and scripting works very well. how do you see this working?
> Actually, I was thinking an entirely different approach might be 
> required: instead of having a XML configuration file describing how to 
> convert a bean to XML (one way) it would be better to map individual 
> properties to XML constructs using xdoclet tags or annotation, as in 
> Hibernate. This ensures relationships are two way and more easily 
> reversible. For example:
> /**
>   * @betwixt.xml
>   *    path="bankAccount/bankAccount-AT"
>   */
> public class AustrianBankAccount {...}
> Would mean that an occurrences of AustrianBankAccount could be clearly 
> read and written as <bankAccount><bankAccount-AT>... for example without

> any confusion over how it should be interpreted.

it is possible that support for annotations may be added sometime (maybe
soonish) but betwixt still needs to know which classes you intend to

i now suspect that the problem is that polymorphic mappings are
supported fully only for collectives. (i added more information to the
20An%20Element%20To%20A%20Class%20Name which might help explain what i
mean). i'll try to find some time to add this feature this week (but i
can't promise when). if anyone wants to jump in and volunteer to code
this feature, it'd probably speed things up and i'd provide help.

- robert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message