dain        2004/04/06 14:41:46

  Modified:    modules/core/src/java/org/openejb/entity/cmp
                        CMPContainerBuilder.java
  Log:

  Added an assembly module
  Fixed remaining not serializable bugs
  Added configuration files for itests to deploy into new assembly
  
  Revision  Changes    Path
  1.4       +6 -6      
openejb/modules/core/src/java/org/openejb/entity/cmp/CMPContainerBuilder.java
  
  Index: CMPContainerBuilder.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/entity/cmp/CMPContainerBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CMPContainerBuilder.java  4 Apr 2004 01:49:10 -0000       1.3
  +++ CMPContainerBuilder.java  6 Apr 2004 18:41:46 -0000       1.4
  @@ -51,8 +51,6 @@
   import java.util.HashMap;
   import java.util.LinkedHashMap;
   import java.util.Map;
  -import javax.ejb.EntityContext;
  -import javax.ejb.Handle;
   
   import org.openejb.AbstractContainerBuilder;
   import org.openejb.EJBComponentType;
  @@ -167,14 +165,15 @@
           }
       }
   
  -    protected LinkedHashMap buildVopMap(Class beanClass) {
  +    protected LinkedHashMap buildVopMap(Class beanClass) throws Exception {
           LinkedHashMap vopMap = new LinkedHashMap();
   
           // get the context set unset method objects
           Method setEntityContext;
           Method unsetEntityContext;
           try {
  -            setEntityContext = beanClass.getMethod("setEntityContext", new 
Class[]{EntityContext.class});
  +            Class entityContextClass = 
getClassLoader().loadClass("javax.ejb.EntityContext");
  +            setEntityContext = beanClass.getMethod("setEntityContext", new 
Class[]{entityContextClass});
               unsetEntityContext = beanClass.getMethod("unsetEntityContext", null);
           } catch (NoSuchMethodException e) {
               throw new IllegalArgumentException("Bean does not implement 
javax.ejb.EntityBean");
  @@ -232,8 +231,9 @@
                           new CMPRemoveMethod(beanClass, signature, 
primaryKeyTransform));
   
                   // ejbHome.remove(handle)
  +                Class handleClass = getClassLoader().loadClass("javax.ejb.Handle");
                   vopMap.put(
  -                        new InterfaceMethodSignature("ejbRemove", new 
Class[]{Handle.class}, true),
  +                        new InterfaceMethodSignature("ejbRemove", new 
Class[]{handleClass}, true),
                           new CMPRemoveMethod(beanClass, signature, 
primaryKeyTransform));
               } else if (name.startsWith("ejb")) {
                   continue;
  
  
  

Reply via email to