djencks     2004/09/28 03:09:39

  Modified:    modules/core/src/java/org/openejb/deployment
                        OpenEJBModuleBuilder.java
  Log:

  don't make duplicate xmlbeans-generated classes.  Work around problem with xmlbeans 
imported group refs
  
  Revision  Changes    Path
  1.32      +36 -31    
openejb/modules/core/src/java/org/openejb/deployment/OpenEJBModuleBuilder.java
  
  Index: OpenEJBModuleBuilder.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/deployment/OpenEJBModuleBuilder.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- OpenEJBModuleBuilder.java 26 Sep 2004 10:09:56 -0000      1.31
  +++ OpenEJBModuleBuilder.java 28 Sep 2004 07:09:39 -0000      1.32
  @@ -140,6 +140,40 @@
               return null;
           }
   
  +        OpenejbOpenejbJarType openejbJar = getOpenejbJar(plan, moduleFile, name, 
ejbJar);
  +
  +        // get the ids from either the application plan or for a stand alone module 
from the specific deployer
  +        URI configId = null;
  +        try {
  +            configId = new URI(openejbJar.getConfigId());
  +        } catch (URISyntaxException e) {
  +            throw new DeploymentException("Invalid configId " + 
openejbJar.getConfigId(), e);
  +        }
  +
  +        URI parentId = null;
  +        if (openejbJar.isSetParentId()) {
  +            try {
  +                parentId = new URI(openejbJar.getParentId());
  +            } catch (URISyntaxException e) {
  +                throw new DeploymentException("Invalid parentId " + 
openejbJar.getParentId(), e);
  +            }
  +        }
  +
  +        URI moduleURI;
  +        if (targetPath != null) {
  +            moduleURI = URI.create(targetPath);
  +            if (targetPath.endsWith("/")) {
  +                throw new DeploymentException("targetPath must not end with a '/'");
  +            }
  +        } else {
  +            targetPath = "ejb.jar";
  +            moduleURI = URI.create("");
  +        }
  +
  +        return new EJBModule(name, configId, parentId, moduleURI, moduleFile, 
targetPath, ejbJar, openejbJar, specDD);
  +    }
  +
  +    OpenejbOpenejbJarType getOpenejbJar(Object plan, JarFile moduleFile, String 
name, EjbJarType ejbJar) throws DeploymentException {
           OpenejbOpenejbJarType openejbJar = null;
           try {
               // load the openejb-jar.xml from either the supplied plan or from the 
earFile
  @@ -174,36 +208,7 @@
           } catch (XmlException e) {
               throw new DeploymentException(e);
           }
  -
  -        // get the ids from either the application plan or for a stand alone module 
from the specific deployer
  -        URI configId = null;
  -        try {
  -            configId = new URI(openejbJar.getConfigId());
  -        } catch (URISyntaxException e) {
  -            throw new DeploymentException("Invalid configId " + 
openejbJar.getConfigId(), e);
  -        }
  -
  -        URI parentId = null;
  -        if (openejbJar.isSetParentId()) {
  -            try {
  -                parentId = new URI(openejbJar.getParentId());
  -            } catch (URISyntaxException e) {
  -                throw new DeploymentException("Invalid parentId " + 
openejbJar.getParentId(), e);
  -            }
  -        }
  -
  -        URI moduleURI;
  -        if (targetPath != null) {
  -            moduleURI = URI.create(targetPath);
  -            if (targetPath.endsWith("/")) {
  -                throw new DeploymentException("targetPath must not end with a '/'");
  -            }
  -        } else {
  -            targetPath = "ejb.jar";
  -            moduleURI = URI.create("");
  -        }
  -
  -        return new EJBModule(name, configId, parentId, moduleURI, moduleFile, 
targetPath, ejbJar, openejbJar, specDD);
  +        return openejbJar;
       }
   
       private OpenejbOpenejbJarType createDefaultPlan(String name, EjbJarType ejbJar) 
{
  
  
  

Reply via email to