Here's an updated patch with the DConfigBeans for JSR-88. It now include DConfigBeans for most of the obvious EJB elements (EJB refs, resource refs, etc.). There's also a schema for a Geronimo EJB DD, patches to the build files to run Castor on the schema, and a patch to the DeploymentManager to actually return DConfigBeans. Finally, there's a very minimal test case; it can't go much further without some DDBeans to work with.
Aaron P.S. Note that the code won't compile unless you run the patched build first to generate the Castor obejcts.
Index: modules/core/maven.xml
===================================================================
RCS file: /home/cvspublic/incubator-geronimo/modules/core/maven.xml,v
retrieving revision 1.6
diff -c -r1.6 maven.xml
*** modules/core/maven.xml 16 Aug 2003 15:14:12 -0000 1.6
--- modules/core/maven.xml 16 Aug 2003 17:13:00 -0000
***************
*** 12,17 ****
--- 12,42 ----
</preGoal>
<preGoal name="java:compile">
+ <attainGoal name="castor:prepare-filesystem"/>
+
+ <j:set var="schema" value="${basedir}/src/xml/geronimo-ejb-jar.xsd"/>
+ <j:set var="gen"
value="${pom.getPluginContext('maven-castor-plugin').getVariable('maven.castor.dest')}"/>
+
+ <ant:java className="org.exolab.castor.builder.SourceGenerator"
+ failonerror="true">
+ <ant:arg value="-i"/>
+ <ant:arg value="${schema}"/>
+ <!--
+ <ant:arg value="-binding-file"/>
+ <ant:arg value="${basedir}/src/etc/twiddle-configuration-binding.xml"/>
+ -->
+ <ant:arg value="-package"/>
+ <ant:arg value="org.apache.geronimo.enterprise.deploy.common"/>
+ <ant:arg value="-types"/>
+ <ant:arg value="j2"/>
+ <ant:arg value="-nomarshall"/>
+ <ant:arg value="-f"/>
+ <ant:arg value="-dest"/>
+ <ant:arg value="${gen}"/>
+ </ant:java>
+ </preGoal>
+
+ <preGoal name="java:compile">
<!--
<j:set var="maven.javacc.compile.src" value="target/gen-src"/>
<ant:path id="maven.javacc.compile.src.set"
location="${maven.javacc.compile.src}"/>
Index: modules/core/project.xml
===================================================================
RCS file: /home/cvspublic/incubator-geronimo/modules/core/project.xml,v
retrieving revision 1.9
diff -c -r1.9 project.xml
*** modules/core/project.xml 16 Aug 2003 15:14:12 -0000 1.9
--- modules/core/project.xml 16 Aug 2003 17:13:11 -0000
***************
*** 102,107 ****
--- 102,113 ----
<version>SNAPSHOT</version>
</dependency>
+ <dependency>
+ <id>castor</id>
+ <version>0.9.5</version>
+ <url>http://castor.exolab.org</url>
+ </dependency>
+
</dependencies>
Index:
modules/core/src/java/org/apache/geronimo/enterprise/deploy/provider/GeronimoDeploymentManager.java
===================================================================
RCS file:
/home/cvspublic/incubator-geronimo/modules/core/src/java/org/apache/geronimo/enterprise/deploy/provider/GeronimoDeploymentManager.java,v
retrieving revision 1.1
diff -c -r1.1 GeronimoDeploymentManager.java
***
modules/core/src/java/org/apache/geronimo/enterprise/deploy/provider/GeronimoDeploymentManager.java
14 Aug 2003 09:37:23 -0000 1.1
---
modules/core/src/java/org/apache/geronimo/enterprise/deploy/provider/GeronimoDeploymentManager.java
16 Aug 2003 17:14:01 -0000
***************
*** 69,81 ****
import javax.enterprise.deploy.shared.ModuleType;
import javax.enterprise.deploy.shared.DConfigBeanVersionType;
import javax.enterprise.deploy.model.DeployableObject;
/**
* The Geronimo implementation of the JSR-88 DeploymentManager interface.
* This same class is used for both connected mode and disconnected mode.
* It uses a plugin to manage that. Currently only J2EE 1.4 is supported.
*
! * @version $Revision: 1.1 $
*/
public class GeronimoDeploymentManager implements DeploymentManager {
private ServerConnection server; // a connection to an application server
--- 69,82 ----
import javax.enterprise.deploy.shared.ModuleType;
import javax.enterprise.deploy.shared.DConfigBeanVersionType;
import javax.enterprise.deploy.model.DeployableObject;
+ import org.apache.geronimo.enterprise.deploy.provider.jar.EjbJarRoot;
/**
* The Geronimo implementation of the JSR-88 DeploymentManager interface.
* This same class is used for both connected mode and disconnected mode.
* It uses a plugin to manage that. Currently only J2EE 1.4 is supported.
*
! * @version $Revision: 1.1 $ $Date: 2003/08/11 17:59:10 $
*/
public class GeronimoDeploymentManager implements DeploymentManager {
private ServerConnection server; // a connection to an application server
***************
*** 85,91 ****
}
public DeploymentConfiguration createConfiguration(DeployableObject dObj)
throws InvalidModuleException {
! return null; //todo
}
/**
--- 86,96 ----
}
public DeploymentConfiguration createConfiguration(DeployableObject dObj)
throws InvalidModuleException {
! if(dObj.getType().getValue() == ModuleType.EJB.getValue()) {
! return new EjbJarDeploymentConfiguration(dObj, new
EjbJarRoot(dObj.getDDBeanRoot()));
! } else {
! throw new InvalidModuleException("Can't handle modules of type
"+dObj.getType());
! }
}
/**
<<attachment: jsr88-dconfigbeans.zip>>
