geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/enterprise/deploy/server/j2ee ClassSpace.java
Date Mon, 17 Nov 2003 20:28:11 GMT
ammulder    2003/11/17 12:28:11

  Modified:    modules/core/src/java/org/apache/geronimo/enterprise/deploy/server/ejb
                        EjbConverter.java EjbJarBean.java
  Added:       modules/core/src/java/org/apache/geronimo/enterprise/deploy/server/j2ee
                        ClassSpace.java
  Log:
  Add DConfigBean elements for the new ClassSpace DD element
  
  Revision  Changes    Path
  1.3       +11 -1     incubator-geronimo/modules/core/src/java/org/apache/geronimo/enterprise/deploy/server/ejb/EjbConverter.java
  
  Index: EjbConverter.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/enterprise/deploy/server/ejb/EjbConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EjbConverter.java	7 Oct 2003 17:16:36 -0000	1.2
  +++ EjbConverter.java	17 Nov 2003 20:28:10 -0000	1.3
  @@ -83,6 +83,7 @@
   import org.apache.geronimo.deployment.model.j2ee.RunAs;
   import org.apache.geronimo.enterprise.deploy.server.j2ee.J2EEConverter;
   import org.apache.geronimo.enterprise.deploy.server.j2ee.SecurityRoleRefBean;
  +import org.apache.geronimo.enterprise.deploy.server.j2ee.ClassSpace;
   import org.apache.geronimo.enterprise.deploy.server.DConfigBeanLookup;
   
   /**
  @@ -105,10 +106,14 @@
       public static EjbJarRoot loadDConfigBeans(EjbJar custom, DDBeanRoot standard, DConfigBeanLookup
lookup) throws ConfigurationException {
           EjbJarRoot root = new EjbJarRoot(standard, lookup);
           EjbJarBean ejbJar = (EjbJarBean)root.getDConfigBean(standard.getChildBean(EjbJarRoot.EJB_JAR_XPATH)[0]);
  +        ejbJar.setClassSpace(new ClassSpace());
  +        ejbJar.getClassSpace().setName(custom.getClassSpace().getClassSpace());
  +        ejbJar.getClassSpace().setParent(custom.getClassSpace().getParentClassSpace());
           EnterpriseBeansBean beans = (EnterpriseBeansBean)ejbJar.getDConfigBean(ejbJar.getDDBean().getChildBean(EjbJarBean.ENTERPRISE_BEANS_XPATH)[0]);
           assignSession(beans, custom.getGeronimoEnterpriseBeans().getGeronimoSession(),
beans.getDDBean().getChildBean(EnterpriseBeansBean.SESSION_XPATH));
           assignEntity(beans, custom.getGeronimoEnterpriseBeans().getGeronimoEntity(), beans.getDDBean().getChildBean(EnterpriseBeansBean.ENTITY_XPATH));
           assignMessageDriven(beans, custom.getGeronimoEnterpriseBeans().getGeronimoMessageDriven(),
beans.getDDBean().getChildBean(EnterpriseBeansBean.MESSAGE_DRIVEN_XPATH));
  +        log.warn("EJB JAR "+ejbJar+" has ClassSpace "+ejbJar.getClassSpace());
           return root;
       }
   
  @@ -116,7 +121,12 @@
           if(root == null || root.getEjbJar() == null) {
               throw new ConfigurationException("Insufficient configuration information to
save.");
           }
  +        log.warn("EJB JAR "+root.getEjbJar()+" has ClassSpace "+root.getEjbJar().getClassSpace());
           EjbJar jar = new EjbJar();
  +        org.apache.geronimo.deployment.model.geronimo.j2ee.ClassSpace space = new org.apache.geronimo.deployment.model.geronimo.j2ee.ClassSpace();
  +        space.setClassSpace(root.getEjbJar().getClassSpace().getName());
  +        space.setParentClassSpace(root.getEjbJar().getClassSpace().getParent());
  +        jar.setClassSpace(space);
           jar.setVersion(root.getEjbJar().getDDBean().getAttributeValue("version"));
           loadDescribable(root.getEjbJar().getDDBean(), jar);
           jar.setEnterpriseBeans(new EnterpriseBeans());
  
  
  
  1.2       +11 -1     incubator-geronimo/modules/core/src/java/org/apache/geronimo/enterprise/deploy/server/ejb/EjbJarBean.java
  
  Index: EjbJarBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/enterprise/deploy/server/ejb/EjbJarBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EjbJarBean.java	6 Oct 2003 14:35:34 -0000	1.1
  +++ EjbJarBean.java	17 Nov 2003 20:28:11 -0000	1.2
  @@ -62,6 +62,7 @@
   import javax.enterprise.deploy.model.XpathEvent;
   import org.apache.geronimo.enterprise.deploy.server.BaseDConfigBean;
   import org.apache.geronimo.enterprise.deploy.server.DConfigBeanLookup;
  +import org.apache.geronimo.enterprise.deploy.server.j2ee.ClassSpace;
   
   /**
    * The DConfigBean representing /ejb-jar
  @@ -71,6 +72,7 @@
   public class EjbJarBean extends BaseDConfigBean {
       final static String ENTERPRISE_BEANS_XPATH = "enterprise-beans";
       private EnterpriseBeansBean enterpriseBeans;
  +    private ClassSpace classSpace;
   
       /**
        * This is present for JavaBeans compliance, but if it is used, the
  @@ -83,6 +85,14 @@
   
       public EjbJarBean(DDBean ddBean, DConfigBeanLookup lookup) {
           super(ddBean, lookup);
  +    }
  +
  +    public ClassSpace getClassSpace() {
  +        return classSpace;
  +    }
  +
  +    public void setClassSpace(ClassSpace classSpace) {
  +        this.classSpace = classSpace;
       }
   
       public String[] getXpaths() {
  
  
  
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/enterprise/deploy/server/j2ee/ClassSpace.java
  
  Index: ClassSpace.java
  ===================================================================
  package org.apache.geronimo.enterprise.deploy.server.j2ee;
  
  /**
   * 
   *
   * @version $Revision: 1.1 $
   */
  public class ClassSpace {
      private String name;
      private String parent;
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getParent() {
          return parent;
      }
  
      public void setParent(String parent) {
          this.parent = parent;
      }
  
      public boolean equals(Object o) {
          if(this == o) return true;
          if(!(o instanceof ClassSpace)) return false;
  
          final ClassSpace classSpace = (ClassSpace)o;
  
          if(!name.equals(classSpace.name)) return false;
          if(!parent.equals(classSpace.parent)) return false;
  
          return true;
      }
  
      public int hashCode() {
          int result;
          result = name.hashCode();
          result = 29 * result + parent.hashCode();
          return result;
      }
  
      public String toString() {
          return "ClassSpace";
      }
  }
  
  
  

Mime
View raw message