dblevins    2005/06/21 17:16:59

  Modified:    modules/core/src/java/org/openejb/server/axis
                        EJBContainerProvider.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.6       +12 -2     
openejb/modules/core/src/java/org/openejb/server/axis/EJBContainerProvider.java
  
  Index: EJBContainerProvider.java
  ===================================================================
  RCS file: 
/scm/openejb/openejb/modules/core/src/java/org/openejb/server/axis/EJBContainerProvider.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EJBContainerProvider.java 17 Jun 2005 22:59:56 -0000      1.5
  +++ EJBContainerProvider.java 21 Jun 2005 21:16:59 -0000      1.6
  @@ -67,6 +67,7 @@
   import org.apache.axis.utils.JavaUtils;
   import org.apache.geronimo.core.service.InvocationKey;
   import org.apache.geronimo.core.service.InvocationResult;
  +import org.apache.geronimo.core.service.SimpleInvocationResult;
   import org.apache.geronimo.transaction.context.TransactionContext;
   import org.apache.geronimo.webservices.MessageContextInvocationKey;
   import org.openejb.EJBContainer;
  @@ -123,7 +124,7 @@
        *
        * @see org.apache.axis.providers.java.RPCProvider
        */
  -    private class AxisRpcInvocation implements EJBInvocation {
  +    public class AxisRpcInvocation implements EJBInvocation {
           private int index;
   
           // Valid in server-side interceptor stack once an instance has been 
identified
  @@ -132,6 +133,7 @@
           // Valid in server-side interceptor stack once a TransactionContext 
has been created
           private transient TransactionContext transactionContext;
   
  +        private InvocationResult result;
           private Map attributes = new HashMap();
           private OperationDesc operation;
           private MessageContext messageContext;
  @@ -216,6 +218,14 @@
   
           public void setTransactionContext(TransactionContext 
transactionContext) {
               this.transactionContext = transactionContext;
  +        }
  +
  +        public InvocationResult createResult(Object object) {
  +            return new SimpleInvocationResult(true, object);
  +        }
  +
  +        public InvocationResult createExceptionResult(Exception exception) {
  +            return new SimpleInvocationResult(false, exception);
           }
   
           public Object get(InvocationKey key) {
  
  
  

Reply via email to