gdamour     2005/01/30 05:59:10

  Modified:    modules/openejb-builder/src/java/org/openejb/deployment
                        BMPContainerBuilder.java
  Log:

  This piece of code should be outside the loop on the bean methods.
  
  Revision  Changes    Path
  1.2       +8 -7      
openejb/modules/openejb-builder/src/java/org/openejb/deployment/BMPContainerBuilder.java
  
  Index: BMPContainerBuilder.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/openejb-builder/src/java/org/openejb/deployment/BMPContainerBuilder.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BMPContainerBuilder.java  10 Nov 2004 01:35:08 -0000      1.1
  +++ BMPContainerBuilder.java  30 Jan 2005 10:59:10 -0000      1.2
  @@ -130,6 +130,13 @@
               throw new IllegalArgumentException("Bean does not implement 
javax.ejb.EntityBean");
           }
   
  +        if (TimedObject.class.isAssignableFrom(beanClass)) {
  +            MethodSignature signature = new MethodSignature("ejbTimeout", 
new Class[]{Timer.class});
  +            vopMap.put(
  +                    MethodHelper.translateToInterface(signature)
  +                    , EJBTimeoutOperation.INSTANCE);
  +        }
  +
           // Build the VirtualOperations for business methods defined by the 
EJB implementation
           Method[] beanMethods = beanClass.getMethods();
           for (int i = 0; i < beanMethods.length; i++) {
  @@ -142,12 +149,6 @@
   
               // create a VirtualOperation for the method (if the method is 
understood)
               String name = beanMethod.getName();
  -            if (TimedObject.class.isAssignableFrom(beanClass)) {
  -                MethodSignature signature = new 
MethodSignature("ejbTimeout", new Class[]{Timer.class});
  -                vopMap.put(
  -                        MethodHelper.translateToInterface(signature)
  -                        , EJBTimeoutOperation.INSTANCE);
  -            }
   
               MethodSignature signature = new MethodSignature(beanMethod);
               if (name.startsWith("ejbCreate")) {
  
  
  

Reply via email to