(This is not dependent on the previous JSR-88 patches)
Here's a patch (and I use the term liberally) with a start of an
implementation of the server provider DConfigBeans for Geronimo. It's not
much -- covering the following EJB DD tags:
ejb-jar
ejb-jar/enterprise-beans
ejb-jar/enterprise-beans/session
ejb-jar/enterprise-beans/entity
ejb-jar/enterprise-beans/message-driven
ejb-jar/enterprise-beans/*/ejb-ref (partially)
It also includes a minimal start on a Geronimo-specific DD.
There's an update to the core module build script to generate Castor
objects for the DD, and an update to the DeploymentManager to return the
new DConfigBeans. There's a very minimal test case; it can't go much
further without some DDBeans to work with.
So again, not a complete implementation, but I want to make sure
the DConfigBeans and DDBeans end up working well together, and I'm sure
the DDBeans will need some DConfigBeans to test with.
Aaron
Index: modules/core/maven.xml
===================================================================
RCS file: /home/cvspublic/incubator-geronimo/modules/core/maven.xml,v
retrieving revision 1.5
diff -c -r1.5 maven.xml
*** modules/core/maven.xml 14 Aug 2003 17:23:38 -0000 1.5
--- modules/core/maven.xml 16 Aug 2003 07:13:14 -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.5
diff -c -r1.5 project.xml
*** modules/core/project.xml 14 Aug 2003 17:08:00 -0000 1.5
--- modules/core/project.xml 16 Aug 2003 07:13:27 -0000
***************
*** 96,101 ****
--- 96,107 ----
<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 07:14:41 -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>>
