User: mnf999  
  Date: 01/12/18 21:42:31

  Modified:    src/main/org/jboss/ejb/plugins
                        MessageDrivenInstancePool.java
                        MessageDrivenTxInterceptorBMT.java
                        MetricsInterceptor.java
                        NoPassivationCachePolicy.java
                        SecurityInterceptor.java
                        SecurityProxyInterceptor.java
  Log:
  init()->create() and use of Invocation
  
  Revision  Changes    Path
  1.9       +3 -3      
jboss/src/main/org/jboss/ejb/plugins/MessageDrivenInstancePool.java
  
  Index: MessageDrivenInstancePool.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/MessageDrivenInstancePool.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MessageDrivenInstancePool.java    2001/11/24 20:43:22     1.8
  +++ MessageDrivenInstancePool.java    2001/12/19 05:42:31     1.9
  @@ -18,7 +18,7 @@
    *      @author <a href="mailto:[EMAIL PROTECTED]";>Peter Antman</a>.
    * @author <a href="mailto:[EMAIL PROTECTED]";>Andreas Schaefer</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Sacha Labourey</a>
  - *   @version $Revision: 1.8 $
  + *   @version $Revision: 1.9 $
    *      
    * <p><b>Revisions:</b>
    * <p><b>20010718 andreas schaefer:</b>
  @@ -44,10 +44,10 @@
      // Public --------------------------------------------------------
      
      // Z implementation ----------------------------------------------
  -   public void init()
  +   public void create()
         throws Exception
      {
  -      super.init();
  +      super.create();
         // for MDB, we *do* pool
         this.reclaim = true;
      }
  
  
  
  1.10      +4 -4      
jboss/src/main/org/jboss/ejb/plugins/MessageDrivenTxInterceptorBMT.java
  
  Index: MessageDrivenTxInterceptorBMT.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/MessageDrivenTxInterceptorBMT.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MessageDrivenTxInterceptorBMT.java        2001/09/01 19:50:30     1.9
  +++ MessageDrivenTxInterceptorBMT.java        2001/12/19 05:42:31     1.10
  @@ -9,7 +9,7 @@
   import java.util.Map;
   import java.rmi.ServerException;
   
  -import org.jboss.ejb.MethodInvocation;
  +import org.jboss.invocation.Invocation;
   
   
   /**
  @@ -19,18 +19,18 @@
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Sebastien Alborini</a>
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Peter Antman</a>.
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Ole Husgaard</a>
  - *   @version $Revision: 1.9 $
  + *   @version $Revision: 1.10 $
    */
   public class MessageDrivenTxInterceptorBMT
      extends AbstractTxInterceptorBMT
   {
  -   public Object invokeHome(MethodInvocation mi)
  +   public Object invokeHome(Invocation mi)
         throws Exception
      {
         throw new ServerException("No home methods for message beans.");
      }
   
  -   public Object invoke(MethodInvocation mi)
  +   public Object invoke(Invocation mi)
         throws Exception
      {
         return invokeNext(true, mi);
  
  
  
  1.13      +6 -6      jboss/src/main/org/jboss/ejb/plugins/MetricsInterceptor.java
  
  Index: MetricsInterceptor.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/MetricsInterceptor.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- MetricsInterceptor.java   2001/11/24 20:43:22     1.12
  +++ MetricsInterceptor.java   2001/12/19 05:42:31     1.13
  @@ -30,7 +30,7 @@
   
   // jboss imports
   import org.jboss.ejb.Container;
  -import org.jboss.ejb.MethodInvocation;
  +import org.jboss.invocation.Invocation;
   import org.jboss.monitor.MetricsConstants;
   
   /**
  @@ -90,7 +90,7 @@
       }
   
       // Interceptor implementation ------------------------------------
  -    public Object invokeHome(MethodInvocation mi) throws Exception {
  +    public Object invokeHome(Invocation mi) throws Exception {
        
           long begin = System.currentTimeMillis();
        
  @@ -102,7 +102,7 @@
           }
      }
   
  -    public Object invoke(MethodInvocation mi) throws Exception {
  +    public Object invoke(Invocation mi) throws Exception {
   
           long begin = System.currentTimeMillis();
           
  @@ -117,10 +117,10 @@
      /**
       * Starts the JMS publisher thread.
       */
  -   public void init() {
  +   public void create() {
          
           /*
  -         * looks like init() is called after setContainer().
  +         * looks like create() is called after setContainer().
            * wonder if container method callback order is documented somewhere, it 
should be.. 
            */
            
  @@ -146,7 +146,7 @@
        * @param   begin   invocation begin time in ms
        * @param   end     invocation end time in ms
        */
  -    private final void addEntry(MethodInvocation mi, long begin, long end) {
  +    private final void addEntry(Invocation mi, long begin, long end) {
           
           /* this gets called by the interceptor */
           
  
  
  
  1.7       +2 -2      
jboss/src/main/org/jboss/ejb/plugins/NoPassivationCachePolicy.java
  
  Index: NoPassivationCachePolicy.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/NoPassivationCachePolicy.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NoPassivationCachePolicy.java     2001/08/03 17:15:44     1.6
  +++ NoPassivationCachePolicy.java     2001/12/19 05:42:31     1.7
  @@ -15,7 +15,7 @@
    *
    * @see AbstractInstanceCache
    * @author <a href="mailto:[EMAIL PROTECTED]";>Simone Bordet</a>
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
    */
   public class NoPassivationCachePolicy 
        implements EnterpriseContextCachePolicy
  @@ -38,7 +38,7 @@
        // Public --------------------------------------------------------
   
        // Z implementation ----------------------------------------------
  -     public void init() throws Exception 
  +     public void create() throws Exception 
        {
                m_map = new HashMap();
        }
  
  
  
  1.28      +5 -5      jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java
  
  Index: SecurityInterceptor.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- SecurityInterceptor.java  2001/12/03 03:43:42     1.27
  +++ SecurityInterceptor.java  2001/12/19 05:42:31     1.28
  @@ -13,7 +13,7 @@
   import java.util.Set;
   
   import org.jboss.ejb.Container;
  -import org.jboss.ejb.MethodInvocation;
  +import org.jboss.invocation.Invocation;
   import org.jboss.metadata.BeanMetaData;
   import org.jboss.metadata.SecurityIdentityMetaData;
   import org.jboss.security.AnybodyPrincipal;
  @@ -27,7 +27,7 @@
   
   @author <a href="[EMAIL PROTECTED]">Oleg Nitz</a>
   @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>.
  -@version $Revision: 1.27 $
  +@version $Revision: 1.28 $
   */
   public class SecurityInterceptor extends AbstractInterceptor
   {
  @@ -85,7 +85,7 @@
           super.start();
       }
   
  -    public Object invokeHome(MethodInvocation mi) throws Exception
  +    public Object invokeHome(Invocation mi) throws Exception
       {
           // Authenticate the subject and apply any declarative security checks
           checkSecurityAssociation(mi, true);
  @@ -110,7 +110,7 @@
               }
           }
       }
  -    public Object invoke(MethodInvocation mi) throws Exception
  +    public Object invoke(Invocation mi) throws Exception
       {
           // Authenticate the subject and apply any declarative security checks
           checkSecurityAssociation(mi, false);
  @@ -141,7 +141,7 @@
        2. Validate access to the method by checking the principal's roles against
           those required to access the method.
        */
  -    private void checkSecurityAssociation(MethodInvocation mi, boolean home)
  +    private void checkSecurityAssociation(Invocation mi, boolean home)
           throws Exception
       {
           Principal principal = mi.getPrincipal();
  
  
  
  1.9       +7 -7      
jboss/src/main/org/jboss/ejb/plugins/SecurityProxyInterceptor.java
  
  Index: SecurityProxyInterceptor.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/SecurityProxyInterceptor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SecurityProxyInterceptor.java     2001/12/03 03:43:42     1.8
  +++ SecurityProxyInterceptor.java     2001/12/19 05:42:31     1.9
  @@ -16,7 +16,7 @@
   import org.jboss.ejb.Container;
   import org.jboss.ejb.ContainerInvokerContainer;
   import org.jboss.ejb.EnterpriseContext;
  -import org.jboss.ejb.MethodInvocation;
  +import org.jboss.invocation.Invocation;
   
   import org.jboss.security.AuthenticationManager;
   import org.jboss.security.SecurityProxy;
  @@ -30,7 +30,7 @@
    * interceptor has access to the EJB instance and context.
    * 
    * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>.
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public class SecurityProxyInterceptor
      extends AbstractInterceptor
  @@ -123,13 +123,13 @@
         super.start();
      }
   
  -   public Object invokeHome(MethodInvocation mi) throws Exception
  +   public Object invokeHome(Invocation mi) throws Exception
      {
         // Apply any custom security checks
         if( securityProxy != null )
         {
            EJBContext ctx = null;
  -         EnterpriseContext ectx = mi.getEnterpriseContext();
  +         EnterpriseContext ectx = (EnterpriseContext)mi.getEnterpriseContext();
            if( ectx != null )
               ctx = ectx.getEJBContext();
            Object[] args = mi.getArguments();
  @@ -150,13 +150,13 @@
         return getNext().invokeHome(mi);
      }
      
  -   public Object invoke(MethodInvocation mi) throws Exception
  +   public Object invoke(Invocation mi) throws Exception
      {
         // Apply any custom security checks
         if( securityProxy != null )
         {
  -         Object bean = mi.getEnterpriseContext().getInstance();
  -         EJBContext ctx = mi.getEnterpriseContext().getEJBContext();
  +         Object bean = ((EnterpriseContext) 
mi.getEnterpriseContext()).getInstance();
  +         EJBContext ctx = ((EnterpriseContext) 
mi.getEnterpriseContext()).getEJBContext();
            Object[] args = mi.getArguments();
            securityProxy.setEJBContext(ctx);
            try
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to