dblevins    2005/06/21 17:16:59

  Modified:    modules/core/src/java/org/openejb/slsb CreateMethod.java
                        EJBCreateMethod.java HandlerChainInterceptor.java
  Log:

  Removing 47 references to the SimpleInvocationResult constructor and
  replacing with a factory method on EJBInvocatin interface.  The
  implementor of EJBInvocation should be able to decide the
  implementation of InvocationResult.
  
  Revision  Changes    Path
  1.3       +3 -3      
openejb/modules/core/src/java/org/openejb/slsb/CreateMethod.java
  
  Index: CreateMethod.java
  ===================================================================
  RCS file: 
/scm/openejb/openejb/modules/core/src/java/org/openejb/slsb/CreateMethod.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CreateMethod.java 21 Mar 2004 21:26:37 -0000      1.2
  +++ CreateMethod.java 21 Jun 2005 21:16:59 -0000      1.3
  @@ -62,9 +62,9 @@
       public InvocationResult execute(EJBInvocation invocation) throws 
Throwable {
           StatelessInstanceContext ctx = (StatelessInstanceContext) 
invocation.getEJBInstanceContext();
           if (invocation.getType().isLocal()) {
  -            return new SimpleInvocationResult(true, 
ctx.getProxyFactory().getEJBLocalObject(null));
  +            return 
invocation.createResult(ctx.getProxyFactory().getEJBLocalObject(null));
           } else {
  -            return new SimpleInvocationResult(true, 
ctx.getProxyFactory().getEJBObject(null));
  +            return 
invocation.createResult(ctx.getProxyFactory().getEJBObject(null));
           }
       }
   }
  
  
  
  1.3       +2 -2      
openejb/modules/core/src/java/org/openejb/slsb/EJBCreateMethod.java
  
  Index: EJBCreateMethod.java
  ===================================================================
  RCS file: 
/scm/openejb/openejb/modules/core/src/java/org/openejb/slsb/EJBCreateMethod.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EJBCreateMethod.java      1 Mar 2005 23:34:32 -0000       1.2
  +++ EJBCreateMethod.java      21 Jun 2005 21:16:59 -0000      1.3
  @@ -97,7 +97,7 @@
               Throwable t = ite.getTargetException();
               if (t instanceof Exception && t instanceof RuntimeException == 
false) {
                   // checked exception - which we simply include in the result
  -                return new SimpleInvocationResult(false, t);
  +                return invocation.createExceptionResult((Exception)t);
               } else {
                   // unchecked Exception - just throw it to indicate an 
abnormal completion
                   throw t;
  
  
  
  1.4       +4 -2      
openejb/modules/core/src/java/org/openejb/slsb/HandlerChainInterceptor.java
  
  Index: HandlerChainInterceptor.java
  ===================================================================
  RCS file: 
/scm/openejb/openejb/modules/core/src/java/org/openejb/slsb/HandlerChainInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HandlerChainInterceptor.java      18 Jun 2005 06:21:39 -0000      1.3
  +++ HandlerChainInterceptor.java      21 Jun 2005 21:16:59 -0000      1.4
  @@ -69,6 +69,7 @@
   import org.apache.geronimo.core.service.InvocationResult;
   import org.apache.geronimo.core.service.SimpleInvocationResult;
   import org.apache.geronimo.webservices.MessageContextInvocationKey;
  +import org.openejb.server.axis.EJBContainerProvider;
   
   /**
    * @version $Revision$ $Date$
  @@ -99,6 +100,7 @@
               try {
                   if (handlerChain.handleRequest(messageContext)) {
                       invocationResult = next.invoke(invocation);
  +
                   } else {
                       /* The Handler implementation class has the 
responsibility of setting
                        * the response SOAP message in the handleRequest method 
and perform
  
  
  

Reply via email to