geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Bartel <>
Subject Re: Servlet Spec 2.5
Date Mon, 10 Apr 2006 08:19:49 GMT
Hi David,

Sorry, I must not have explained myself well enough. The problem is
in the generation of the xmlbeans:

<preGoal name="java:compile">

The first thing to note is that the namespace has changed in javaee5. It was:
but is now:

If you generate the beans from the xsds by simply specifying the 
existing relevant j2ee_1_4schemas along with the new schemas as above,
then you get two class instances generated for each element common to both
schemas: one instance from each of the root schemas (j2ee_1_4.xsd and javaee_5.xsd) 
eg: and The order of generation being
dependent I suppose on the order of specification in the "sourceschema" 

To avoid duplication, one solution would be to change the src/conf/xmlconfig.xml
file to ensure that the package names are different for each namespace:

    <xb:namespace uri="">


    <xb:namespace uri="">

This would of course entail import changes to all classes that depend on
any bean that is not part of the connector_1_5.xsd or j2ee_jaxrpc_mapping_1_1.xsd
(because their package won't change).



David Jencks wrote:
> I don't understand what you are trying to do wrt copying the existing 
> j2ee 1.4 schemas still used in jee 5.  If you intend the j2ee-schema 
> directory to be a replacement for the one in trunk, then keeping all the 
> schemas there is reasonable, and expecting class duplication between the 
> two nearly identical branches is to be expected.  If the new copy is 
> intended to be an addition to the existing one in trunk, then you can 
> re-use the already generated classes from j2ee-1.4 in your jee 5 work by 
> including the trunk schema module in your project.xml dependencies with 
> a <xmlbeans>true</xmlbeans> property.  This will put the dependency on 
> the xmlbeans compiler/code generator classpath and it won't regenerate 
> the classes.
> Have I missed the point?
> thanks
> david jencks
> */Jan Bartel <>/* wrote:
>     FYI for anyone who is interested:
>     I've made a branch in the sandbox for servlet 2.5 integration work.
>     The svn url is:
>     So far I have checked in the 2.5 servlet spec schema (and all of the
>     other JavaEE 5 schemas too) and upped the version of Jetty to 6 and
>     begun making changes in jetty & jetty-builder to support the new
>     Jetty API, and in a couple of other modules to support the changes
>     for the servlet 2.5 spec.
>     Caveat: It's early days yet so don't expect the branch to compile
>     just yet.
>     One issue that I've come across is that the javaee5 spec re-uses
>     the connector_1_5.xsd and j2ee_jaxrpc_mapping_1_1.xsd from j2ee 1.4.
>     As both of these xsds include j2ee_1_4.xsd, if all xmlbeans are
>     generated into the same package (ie org.apache.geronimo.xbeans.j2ee)
>     th en most of the beans are generated twice. One solution would
>     be to generate the javaee5 beans into a different package eg
>     org.apache.geronimo.xbeans.javaee. If anybody has any thoughts
>     on this, then I'm all ears.
>     cheers
>     Jan

View raw message