User: fleury  
  Date: 00/07/27 16:34:00

  Modified:    src/main/org/jboss/ejb MethodInvocation.java
  Log:
  The MI is the right place to put the propagated transaction.  The TxInterceptor 
works from this guy and sets on the TxMan
  
  Revision  Changes    Path
  1.2       +18 -3     jboss/src/main/org/jboss/ejb/MethodInvocation.java
  
  Index: MethodInvocation.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/MethodInvocation.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MethodInvocation.java     2000/06/16 13:10:20     1.1
  +++ MethodInvocation.java     2000/07/27 23:33:59     1.2
  @@ -26,7 +26,7 @@
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
    *  @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>.
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
    */
   public class MethodInvocation
   {
  @@ -47,9 +47,9 @@
      // Constructors --------------------------------------------------
      public MethodInvocation(Object id, Method m, Object[] args, Transaction tx, 
Principal identity)
      {
  -      this.id = id;
  +             this.id = id;
                this.m = m;
  -      this.args = args;
  +             this.args = args;
                this.tx = tx;
                this.identity = identity;
      }
  @@ -68,7 +68,10 @@
        
        public void setTransaction(Transaction tx)
        {
  +             
  +             //System.out.println("Setting a transaction on Method 
invocation"+hashCode()+" "+m.getName()+" with "+tx);
                this.tx = tx;
  +             
        }
        
        public Transaction getTransaction()
  @@ -86,9 +89,21 @@
                return identity;
        }
         
  +     /*
  +     * setEnterpriseContext()
  +     *
  +     * Once a context is associated to a Method Invocation the MI can pass it all 
the relevant information
  +     * We set Transaction and Principal
  +     */
        public void setEnterpriseContext(EnterpriseContext ctx)
        {
                this.ctx = ctx;
  +             
  +             //Set the transaction
  +             ctx.setTransaction(tx);
  +             
  +             // Set the principal
  +             ctx.setPrincipal(identity);
        }
   
        public EnterpriseContext getEnterpriseContext()
  
  
  

Reply via email to