You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Blevins <da...@gmail.com> on 2011/05/03 01:55:52 UTC

Re: openejb-jar-2.2.xsd out-of-date?

On Apr 14, 2011, at 1:25 AM, han hongfang wrote:

> Hi devs,
> 
> I got following errors when I tried to generate the jaxbmodel class for openejb-jar-2.2.xsd using maven-jaxb-plugin:1.1.1. Taking entity-manager-factory-ref for instance, it can not be found in geronimo-naming-1.2.xsd. 

This old email has some related info:

  http://markmail.org/message/w76ndrfv27v53mbk

There already are JAXB objects for old/new descriptors and as a result the schema is rarely updated.  I think for a while we didn't even have one.

There's a bit of legacy here in the for a short bit (Geronimo 1.0/OpenEJB 2.0) OpenEJB was not really a separate project in any technical sense.  The OpenEJB 3.x codebase returned to being more standalone.  The reason to keep the v2 openejb-jar.xml format was it was made 100% for Geronimo -- it has all the Geronimo dependency and config stuff in it amongst other things.

Anyway, here are the root JAXB objects for the related trees:

openejb-jar v2:  http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/OpenejbJarType.java
geronimo-ejb:
http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/GeronimoEjbJarType.java

Here's the newer non-geronimo-specific openejb tree:
http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/

In terms of what we should do now with a new major Geronimo version, I suspect it will largely depend on David J's work.  Seems like there'll be a very big and very not backwards-compatible change with regards to parents/childern and dependency information.  Not sure what our plans are with regards to backwards compatibility of existing descriptors.


-David


Geronimo 3.0 and descriptors (was: Re: openejb-jar-2.2.xsd out-of-date?)

Posted by David Blevins <da...@gmail.com>.
Soo....  The discussion on the openejb-jar.xml confusion has brought up some relevant topics (see the previous email for backstory).  Such as we probably need to decide what we might want to do with our descriptors going forward.

At least in terms of David Jencks' branch changes, gbeans and are dead and there's no more dependency information in the descriptors anymore.  David can probably fill in some details as well as maybe comment on the likely hood of us releasing a 3.0 final with that code, but...

Certainly in terms of the EJB related descriptors we already have a ton of legacy and it looks like we're getting more.  Specifically:

  1. osgi/gbean changes (the branch changes). No more dependency information.  Not sure the impact on naming and gbean specific queries.

  2. "clustering" elements.  No one to my knowledge has ever used or even tried to use the WADI clustering stuff.  Do we want to keep carrying it forward?

  3.  CMP data.  CMP is dead and we could probably get along fine just making the 1, 2 or 0 users out there use the jpa mapping file directly.

  4.  The 'openejb-jar' element of the new geronimo-openejb.xml file.  From a Geronimo perspective, the only thing useful in it that is not already in the geronimo-openejb.xml jar file is the ability to specify which container you want your bean deployed in -- assuming you don't want the default.  That's a rare case, but certainly would be easy to add to the geronimo-openejb.xml file.

If we're going to change all the geronimo descriptors incompatibly, then maybe we want to kill the openejb-jar.xml file in the process, switch everyone over to a new-new geronimo-openejb-3.0.xsd (not yet written) and make the related JAXB in Geronimo land.

If we aren't changing things incompatibly, then maybe we just leave things alone and try to make tiny changes where needed.


Any thoughts?


-David


Re: openejb-jar-2.2.xsd out-of-date?

Posted by han hongfang <ha...@gmail.com>.
Thank you David Blevins.

Geronimo devtool will use the updated xsd file for jaxb model generation,
I'm now more confident with your comment from the openejb expert point of
view. Just wanted to avoid the extra effort to generate the jaxb model again
in case of any further change.

Comitted to trunk.

On Fri, Jul 8, 2011 at 12:54 PM, David Blevins <da...@gmail.com>wrote:

> Looks like a pretty small change.  If it is more accurate than what is
> there now, I don't see a reason not to commit it.
>
> I'm not sure what help you need, but if there is something, definitely let
> me know.  Not sure I have time to do any development in the area, but can do
> my best to get any info you might need.
>
>
> -David
>
> On Jul 7, 2011, at 6:36 PM, han hongfang wrote:
>
> > Oops~ incorrect version was attached. I have updated it with the diff
> version in JIRA system.
> >
> > On Fri, Jul 8, 2011 at 6:53 AM, David Blevins <da...@gmail.com>
> wrote:
> >
> > On Jul 7, 2011, at 1:18 AM, han hongfang wrote:
> >
> > > I Created a JIRA in Geronimo and attached the patch:
> https://issues.apache.org/jira/browse/GERONIMO-6050
> > >
> > > To David Blevins,
> > >
> > > Could you kindly help to review the patch and update accordingly in
> openejb side if necessary?
> >
> > A diff would be easier to review, but it probably isn't necessary -- if
> something isn't right we can continue to fix it.  No trouble.
> >
> > If it is more accurate than what is there now, I don't see a reason not
> to commit it.
> >
> >
> > -David
> >
> >
> >
> >
> > --
> > Best regards,
> >
> > Han Hong Fang (Janet)
> > hanhongfang AT apache.org
> >
> >
>
>


-- 
Best regards,

Han Hong Fang (Janet)
hanhongfang AT apache.org

Re: openejb-jar-2.2.xsd out-of-date?

Posted by David Blevins <da...@gmail.com>.
Looks like a pretty small change.  If it is more accurate than what is there now, I don't see a reason not to commit it.

I'm not sure what help you need, but if there is something, definitely let me know.  Not sure I have time to do any development in the area, but can do my best to get any info you might need.


-David

On Jul 7, 2011, at 6:36 PM, han hongfang wrote:

> Oops~ incorrect version was attached. I have updated it with the diff version in JIRA system.
> 
> On Fri, Jul 8, 2011 at 6:53 AM, David Blevins <da...@gmail.com> wrote:
> 
> On Jul 7, 2011, at 1:18 AM, han hongfang wrote:
> 
> > I Created a JIRA in Geronimo and attached the patch: https://issues.apache.org/jira/browse/GERONIMO-6050
> >
> > To David Blevins,
> >
> > Could you kindly help to review the patch and update accordingly in openejb side if necessary?
> 
> A diff would be easier to review, but it probably isn't necessary -- if something isn't right we can continue to fix it.  No trouble.
> 
> If it is more accurate than what is there now, I don't see a reason not to commit it.
> 
> 
> -David
> 
> 
> 
> 
> -- 
> Best regards,
> 
> Han Hong Fang (Janet)
> hanhongfang AT apache.org
>  
> 


Re: openejb-jar-2.2.xsd out-of-date?

Posted by han hongfang <ha...@gmail.com>.
Oops~ incorrect version was attached. I have updated it with the diff
version in JIRA system.

On Fri, Jul 8, 2011 at 6:53 AM, David Blevins <da...@gmail.com>wrote:

>
> On Jul 7, 2011, at 1:18 AM, han hongfang wrote:
>
> > I Created a JIRA in Geronimo and attached the patch:
> https://issues.apache.org/jira/browse/GERONIMO-6050
> >
> > To David Blevins,
> >
> > Could you kindly help to review the patch and update accordingly in
> openejb side if necessary?
>
> A diff would be easier to review, but it probably isn't necessary -- if
> something isn't right we can continue to fix it.  No trouble.
>
> If it is more accurate than what is there now, I don't see a reason not to
> commit it.
>
>
> -David
>
>


-- 
Best regards,

Han Hong Fang (Janet)
hanhongfang AT apache.org

Re: openejb-jar-2.2.xsd out-of-date?

Posted by David Blevins <da...@gmail.com>.
On Jul 7, 2011, at 1:18 AM, han hongfang wrote:

> I Created a JIRA in Geronimo and attached the patch: https://issues.apache.org/jira/browse/GERONIMO-6050
> 
> To David Blevins, 
> 
> Could you kindly help to review the patch and update accordingly in openejb side if necessary?

A diff would be easier to review, but it probably isn't necessary -- if something isn't right we can continue to fix it.  No trouble.

If it is more accurate than what is there now, I don't see a reason not to commit it.


-David


Re: openejb-jar-2.2.xsd out-of-date?

Posted by han hongfang <ha...@gmail.com>.
I Created a JIRA in Geronimo and attached the patch:
https://issues.apache.org/jira/browse/GERONIMO-6050

To *David Blevins*,

Could you kindly help to review the patch and update accordingly in openejb
side if necessary?

-- 
Best regards,

Han Hong Fang (Janet)
hanhongfang AT apache.org

Re: openejb-jar-2.2.xsd out-of-date?

Posted by han hongfang <ha...@gmail.com>.
OK, I find it in geronimo svn repo:
https://svn.apache.org/repos/asf/geronimo/server/trunk/plugins/openejb/openejb/src/main/resources/schema/openejb-jar-2.2.xsd,
I tried to look for it in openejb source code repo but failed.

On Thu, Jul 7, 2011 at 4:02 PM, han hongfang <ha...@gmail.com> wrote:

> I have prepared a updated version for openejb-jar-2.2.xsd based the version
> shipped in geronimo server. But I can not find the file in svn, can somebody
> give me a hint about its location in svn, so I can provide it as a patch?
>
>
> On Thu, Jul 7, 2011 at 1:03 PM, han hongfang <ha...@gmail.com>wrote:
>
>> So far we don't get other feedback on this topic. I suggest that we move a
>> small step forward, just to update openejb-jar-2.2.xsd to make it
>> up-to-date with other schema changes, such as geronimo-naming-1.2.xsd (may
>> refer to the first posting in this thread for the schema problem details ).
>>
>> We need the up-to-date openejb-jar-2.2.xsd to solve some problems in
>> Geronimo devtool.
>>
>> --
>> Best regards,
>>
>> Han Hong Fang (Janet)
>> hanhongfang AT apache.org
>>
>>
>>
>
>
> --
> Best regards,
>
> Han Hong Fang (Janet)
> hanhongfang AT apache.org
>
>
>


-- 
Best regards,

Han Hong Fang (Janet)
hanhongfang AT apache.org

Re: openejb-jar-2.2.xsd out-of-date?

Posted by han hongfang <ha...@gmail.com>.
I have prepared a updated version for openejb-jar-2.2.xsd based the version
shipped in geronimo server. But I can not find the file in svn, can somebody
give me a hint about its location in svn, so I can provide it as a patch?

On Thu, Jul 7, 2011 at 1:03 PM, han hongfang <ha...@gmail.com> wrote:

> So far we don't get other feedback on this topic. I suggest that we move a
> small step forward, just to update openejb-jar-2.2.xsd to make it
> up-to-date with other schema changes, such as geronimo-naming-1.2.xsd (may
> refer to the first posting in this thread for the schema problem details ).
>
> We need the up-to-date openejb-jar-2.2.xsd to solve some problems in
> Geronimo devtool.
>
> --
> Best regards,
>
> Han Hong Fang (Janet)
> hanhongfang AT apache.org
>
>
>


-- 
Best regards,

Han Hong Fang (Janet)
hanhongfang AT apache.org

Re: openejb-jar-2.2.xsd out-of-date?

Posted by han hongfang <ha...@gmail.com>.
So far we don't get other feedback on this topic. I suggest that we move a
small step forward, just to update openejb-jar-2.2.xsd to make it up-to-date
with other schema changes, such as geronimo-naming-1.2.xsd (may refer to the
first posting in this thread for the schema problem details ).

We need the up-to-date openejb-jar-2.2.xsd to solve some problems in
Geronimo devtool.
-- 
Best regards,

Han Hong Fang (Janet)
hanhongfang AT apache.org

Re: openejb-jar-2.2.xsd out-of-date?

Posted by David Blevins <da...@gmail.com>.
On May 5, 2011, at 12:44 AM, han hongfang wrote:

> The openejb-jar-2.2.xsd comes from latest geronimo server v3.0-snapshot build under schema folder. To me, I think this xsd file is invalid since for example[...]

Right, as I mention the JAXB tree and schema are not well maintained.  Sometimes the JAXB tree is updated the schema is not or vice versa.

> Another question is, in geronimo v3.0-snapshot, which schema should the deployment plan openejb-jar.xml comply to? openejb-jar-{versionA}.xsd or geronimo-openejb-{versionB}.xsd, or even both are OK? and what the value of {versionA} and {versionB}?

The old Geronimo specific openejb-jar v2 is read in, if found, and split into the new geronimo-openejb.xml file (geronimo specific) and the new openejb-jar.xml file (not geronimo specific).  As noted the link it was done mostly for backwards compatibility.  The TCK and all our docs and examples still use the "old" openejb-jar.xml file and not the new geronimo-openejb.xml+openejb-jar.xml file.

And actually, some of the CMP parts of the old openejb-jar.xml are translated into JPA mapping files.  In Geronimo 1.0 we used TranQL and now we use JPA to deliver legacy CMP info.  So really that old openejb-jar.xml file gets split into potentially 3 files: geronimo-openejb.xml, openejb-jar.xml and jpa mapping.xml for for any CMP beans.

As for which "wins", we first try to read in the openejb-jar.xml as the new version.  If that fails we try again using the old version and then will do the conversion and OpenEJB, Geronimo and OpenJPA will each get their parts.

> I'm considering to reuse these JAXB objects in Geronimo server adapter v3.0. Can you point me to the exact xsd file for this JAXB objects? I did a quick check, and can not find some classes in openejb-jar-2.2.xsd and geronimo-openejb-2.0.xsd, which come from latest geronimo v3.0-snapshot build, e.g., AbstractClusteringType.

Some of the parts of the related Geronimo schemas are not read into the tree as strong types.  Anything in the 'clustering', 'abstractNamingEntry', 'service' and 'security' elements are packed into generic JAXBElement types.  All this stuff was generated by the JAXB compiler which wasn't able to handle some of the more clever things David J. did with the Geronimo schemas.  The result was those abstract classes like AbstractClusteringType that have no concrete implementations.  It's technically accurate representation of the schema, but functionally useless.

All the generic information is lost at runtime so "JAXBElement<? extends AbstractClusteringType>" is really just "JAXBElement" and the AbstractClusteringType never factors in.  The entire JAXB tree (JAXBElement data and all) is/was ultimately handed over to XMLBeans which does/did the real work.  There wasn't any interest in using JAXB in Geronimo itself then so most of the real code was done by Geronimo with XMLBeans copies of the descriptor data.  So the JAXB tree only needed to be good enough to do the conversion and get the xml where it needed to go.

Worked well enough for 4-5 years, but now we have a new major version and we could chose to do things all differently if we want.

>  Meanwhile, I plan to put the JAXB objects of geronimo-openejb-{version}.xsd and openejb-jar-{version}.xsd into separate package. 

I suspect the goal is to write some tooling and in that front the current JAXB tree might not be what we want to be focusing on going forward.  Certainly, the fact that much of the tree is just loosely typed JAXBElement objects and not concrete classes, it won't really do the trick as-is now.

We'd have to invest time in fixing it up, at least a little.  I think we need to ask ourselves if this is really the setup we want going forward.  Was hoping to hear from David J at least.  Let me take another shot in a follow up email.

-David




Re: openejb-jar-2.2.xsd out-of-date?

Posted by han hongfang <ha...@gmail.com>.
Thanks very much David for the info on this topic.

Still have several questions.

On Tue, May 3, 2011 at 7:55 AM, David Blevins <da...@gmail.com>wrote:

>
> On Apr 14, 2011, at 1:25 AM, han hongfang wrote:
>
> > Hi devs,
> >
> > I got following errors when I tried to generate the jaxbmodel class for
> openejb-jar-2.2.xsd using maven-jaxb-plugin:1.1.1. Taking
> entity-manager-factory-ref for instance, it can not be found in
> geronimo-naming-1.2.xsd.
>
>
The openejb-jar-2.2.xsd comes from latest geronimo server v3.0-snapshot
build under schema folder. To me, I think this xsd file is invalid since for
example, <xs:element ref="naming:entity-manager-factory-ref"/>,
entity-manager-factory-ref can not be found under xmlns:naming="
http://geronimo.apache.org/xml/ns/naming-1.2". Is this OK?

Another question is, in geronimo v3.0-snapshot, which schema should the
deployment plan openejb-jar.xml comply to? openejb-jar-{versionA}.xsd or
geronimo-openejb-{versionB}.xsd, or even both are OK? and what the value of
{versionA} and {versionB}?


> This old email has some related info:
>
>  http://markmail.org/message/w76ndrfv27v53mbk
>
> There already are JAXB objects for old/new descriptors and as a result the
> schema is rarely updated.  I think for a while we didn't even have one.
>
> There's a bit of legacy here in the for a short bit (Geronimo 1.0/OpenEJB
> 2.0) OpenEJB was not really a separate project in any technical sense.  The
> OpenEJB 3.x codebase returned to being more standalone.  The reason to keep
> the v2 openejb-jar.xml format was it was made 100% for Geronimo -- it has
> all the Geronimo dependency and config stuff in it amongst other things.
>
> Anyway, here are the root JAXB objects for the related trees:
>
> openejb-jar v2:
> http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/OpenejbJarType.java
> geronimo-ejb:
>
> http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/GeronimoEjbJarType.java
>

I'm considering to reuse these JAXB objects in Geronimo server adapter v3.0.
Can you point me to the exact xsd file for this JAXB objects? I did a quick
check, and can not find some classes in openejb-jar-2.2.xsd and
geronimo-openejb-2.0.xsd, which come from latest geronimo v3.0-snapshot
build, e.g., AbstractClusteringType. Meanwhile, I plan to put the JAXB
objects of geronimo-openejb-{version}.xsd and openejb-jar-{version}.xsd into
separate package.

>
> Here's the newer non-geronimo-specific openejb tree:
>
> http://svn.apache.org/repos/asf/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/
>
> In terms of what we should do now with a new major Geronimo version, I
> suspect it will largely depend on David J's work.  Seems like there'll be a
> very big and very not backwards-compatible change with regards to
> parents/childern and dependency information.  Not sure what our plans are
> with regards to backwards compatibility of existing descriptors.
>
>
> -David
>
>


-- 
Best regards,

Han Hong Fang (Janet)
hanhongfang AT apache.org