About all I was able to figure out regarding this tonight was how to use Tranql to generate Derby Database DDL and so I guess I'll use that and tie my demo app into the SystemDatabase. Here's a section I added to my Maven build script:

   <goal name="exportDDL">
<ant:taskdef name="ddlExporter" classname="org.openejb.deployment.ant.DDLExporterTask">
           <classpath>
<pathelement location="${maven.repo.local}/openejb/jars/openejb-builder-${openejb_version}.jar"/> <pathelement location="${maven.repo.local}/tranql/jars/tranql-${tranql_version}.jar"/> <pathelement location="${maven.repo.local}/geronimo/jars/geronimo-kernel-${geronimo_version}.jar"/> <pathelement location="${maven.repo.local}/geronimo/jars/geronimo-deployment-${geronimo_version}.jar"/> <pathelement location="${maven.repo.local}/geronimo/jars/geronimo-common-${geronimo_version}.jar"/> <pathelement location="${maven.repo.local}/geronimo/jars/geronimo-j2ee-schema-${geronimo_version}.jar"/> <pathelement location="${maven.repo.local}/xmlbeans/jars/xbean-${xmlbeans_version}.jar"/> <pathelement location="${maven.repo.local}/stax/jars/stax-api-${stax_api_version}.jar"/> <pathelement location="${maven.repo.local}/geronimo-spec/jars/geronimo-spec-ejb-${geronimo_spec_ejb_version}.jar"/>
           </classpath>
       </ant:taskdef>
<ddlExporter
           ejbJar="jar:${basedir}/target/${pom.artifactId}-ejb.jar"
           openejbJar="jar:${basedir}/target/${pom.artifactId}-ejb.jar"
           output="${basedir}/target/${pom.artifactId}-ejb.sql"
           ddlCommandBuilder="org.tranql.ddl.DerbyDDLCommandBuilder"
           type="drop-create-constraint">
           <classpath>
               <pathelement location="target/${pom.artifactId}-ejb.jar"/>
           </classpath>
       </ddlExporter>
   </goal>

This was found in an itest module that is part of the openejb part of the geronimo sourcetree. This will generate the SQL, but there is a manual step to run the SQL on the Derby database using the features found in the geronimo console. But that works alright for what I need right now.

Cheers.

-Neal

Neal Sanche wrote:

Hi Guys,

I've followed through the mentions of CMP beans and saw a bunch of JIRA entries about work related to automatic DDL generation upon deployment of CMP beans. How's the work coming along on this? Is there anything in the current SVN releases that would allow me to try this functionality out?

Thanks for any info.

Cheers.

-Neal


Reply via email to