I just checked in the working converter for CMP beans. There is a fairly extensive test suite that converts the OpenEJB2 itests, daytrader and the OpenEJB2 CMR mappings tests. For example, here are the mappings for daytrader

ejb-jar.xml
-----------
https://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/ container/openejb-core/src/test/resources/convert/oej2/cmp/daytrader/ daytrader-ejb-jar.xml

openejb-jar.xml
---------------
https://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/ container/openejb-core/src/test/resources/convert/oej2/cmp/daytrader/ daytrader-openejb-jar.xml


And the final JPA mappings
--------------------------
https://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/ container/openejb-core/src/test/resources/convert/oej2/cmp/daytrader/ daytrader-orm.xml



I hope to have the converter fully integrated into Geronimo in by the end of the week.

-dain

On Jan 21, 2007, at 11:01 PM, David Blevins wrote:

On Jan 19, 2007, at 5:07 PM, David Blevins wrote:

Keep your ejb related plan files intact or a copy of them at least. I'm going to try and write a conversion tool that will at least handle trivial apps. A non-trivial app would be one with CMPs. The new mapping.xml format for cmps is the jpa mapping.xml and converting that will be a little more work.

Nothing done yet, just announcing intentions.

Ok, have a little progress on this.  So far I am able to convert:

 - <environment> and children
 - <security> and children
 - <gbean> and children
 - <message-destination> and children
 - <persistence-context-ref> and children

To see same converted document, look here:

source: http://svn.apache.org/repos/asf/incubator/openejb/trunk/ openejb3/container/openejb-jee/src/test/resources/openejb-jar-2- full.xml result: http://svn.apache.org/repos/asf/incubator/openejb/trunk/ openejb3/container/openejb-jee/src/test/resources/geronimo-openejb- converted.xml

It was a bit of work getting JAXB2 to work with our schemas because of duplicated elements combined with the fact that we allow invalid xml (i.e. no namespace at all). So I actually had to write a invalid 2 valid xml converter before I could get started on the openejb-jar.xml to geronimo-openejb.xml converter.

Things should go faster from here.  Will hack more in the morning.

Not sure what the effort is going to be to convert the cmp information as that is a openejb-jar.xml 2 jpa mapping.xml conversion. Hoping Dain might have some input on that.


-David


Reply via email to