dblevins    2005/02/19 04:46:39

  Modified:    modules/core/src/java/org/openejb/server/ejbd
                        EJBInvocationStream.java EjbRequestHandler.java
  Log:

  Removed getProxyFactory from EJBContainer interface and all references to it.
  Fixed the WSContainer so it doesn't put instances of InvocationResult in the 
soap message.
  Fixed the invocation test in WSContainerTest.
  Slightly improved the ulgy EJBInvocationStream code.
  
  Revision  Changes    Path
  1.3       +4 -20     
openejb/modules/core/src/java/org/openejb/server/ejbd/EJBInvocationStream.java
  
  Index: EJBInvocationStream.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/server/ejbd/EJBInvocationStream.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EJBInvocationStream.java  18 Jul 2004 22:32:24 -0000      1.2
  +++ EJBInvocationStream.java  19 Feb 2005 09:46:38 -0000      1.3
  @@ -65,7 +65,6 @@
       private final EJBInvocation invocationState = new EJBInvocationImpl();

       private EJBInterfaceType interfaceType;

   

  -    private EJBProxyFactory ejbProxyFactory;

       private int methodIndex = -1;

   

       public EJBInvocationStream() {

  @@ -76,17 +75,6 @@
           super(requestMethod);

       }

   

  -    /**

  -     * The EJBProxyFactory must be set before calling getMethodIndex.

  -     *

  -     * This method won't be needed in the long-run.  Eventually,

  -     * the method index will be part of the protocol.

  -     *

  -     * @param EJBProxyFactory ejbProxyFactory

  -     */

  -    public void setProxyFactory(EJBProxyFactory ejbProxyFactory) {

  -        this.ejbProxyFactory = ejbProxyFactory;

  -    }

   

       public Object[] getArguments() {

           return getMethodParameters();

  @@ -97,12 +85,6 @@
       }

   

       public int getMethodIndex() {

  -        if (methodIndex < 0){

  -            if (ejbProxyFactory == null){

  -                throw new IllegalStateException("Must set the 
EJBProxyFactory before calling getMethodIndex.");

  -            }

  -            methodIndex = 
ejbProxyFactory.getMethodIndex(getMethodInstance());

  -        }

           return methodIndex;

       }

   

  @@ -218,5 +200,7 @@
           return invocationState.getTransactionContext();

       }

   

  -

  +    public void setMethodIndex(int methodIndex) {

  +        this.methodIndex = methodIndex;

  +    }

   }

  
  
  
  1.16      +6 -2      
openejb/modules/core/src/java/org/openejb/server/ejbd/EjbRequestHandler.java
  
  Index: EjbRequestHandler.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/server/ejbd/EjbRequestHandler.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- EjbRequestHandler.java    11 Feb 2005 22:30:18 -0000      1.15
  +++ EjbRequestHandler.java    19 Feb 2005 09:46:39 -0000      1.16
  @@ -50,6 +50,7 @@
   import java.io.NotSerializableException;
   import java.rmi.RemoteException;
   import java.util.Collection;
  +import java.lang.reflect.Method;
   import javax.security.auth.Subject;
   import javax.ejb.Handle;
   
  @@ -128,10 +129,13 @@
   
           try {
               container = getContainer(req);
  -            req.setProxyFactory(container.getProxyFactory());
               ClassLoader cl = container.getClassLoader();
               Thread.currentThread().setContextClassLoader(cl);
               in.setClassLoader(cl);
  +
  +            Method methodInstance = req.getMethodInstance();
  +            int methodIndex = container.getMethodIndex(methodInstance);
  +            req.setMethodIndex(methodIndex);
   
               /**
                * The identification principal contains the subject id.  Use 
this
  
  
  

Reply via email to