User: user57  
  Date: 01/07/12 16:53:02

  Modified:    src/main/org/jboss/ejb/plugins
                        StatelessSessionInstanceInterceptor.java
  Log:
   o re-indent & removal of unused imports.
  
  Revision  Changes    Path
  1.8       +28 -50    
jboss/src/main/org/jboss/ejb/plugins/StatelessSessionInstanceInterceptor.java
  
  Index: StatelessSessionInstanceInterceptor.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/StatelessSessionInstanceInterceptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StatelessSessionInstanceInterceptor.java  2001/06/18 20:01:23     1.7
  +++ StatelessSessionInstanceInterceptor.java  2001/07/12 23:53:02     1.8
  @@ -6,40 +6,19 @@
    */
   package org.jboss.ejb.plugins;
   
  -import java.lang.reflect.Method;
   import java.rmi.RemoteException;
  -import java.util.Map;
  -import java.util.HashMap;
  -import java.util.ArrayList;
  -
  -import javax.ejb.EJBObject;
  -import javax.ejb.CreateException;
  -import javax.ejb.EJBException;
  -import javax.ejb.NoSuchEntityException;
  -import javax.ejb.RemoveException;
  -import javax.ejb.EntityBean;
  -import javax.transaction.Status;
  -import javax.transaction.Synchronization;
  -import javax.transaction.Transaction;
  -import javax.transaction.TransactionManager;
  -import javax.transaction.RollbackException;
  -import javax.transaction.SystemException;
   
   import org.jboss.ejb.Container;
  -import org.jboss.ejb.StatelessSessionContainer;
  -import org.jboss.ejb.EnterpriseContext;
  -import org.jboss.ejb.InstanceCache;
  -import org.jboss.ejb.InstancePool;
   import org.jboss.ejb.MethodInvocation;
  +import org.jboss.ejb.StatelessSessionContainer;
   
   /**
  - *   This container acquires the given instance. This must be used after
  - *   the EnvironmentInterceptor, since acquiring instances requires a proper
  - *   JNDI environment to be set
  + * This container acquires the given instance. This must be used after
  + * the EnvironmentInterceptor, since acquiring instances requires a proper
  + * JNDI environment to be set
    *
  - *   @see <related>
  - *   @author <a href="mailto:[EMAIL PROTECTED]";>Rickard Öberg</a>
  - *   @version $Revision: 1.7 $
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Rickard Öberg</a>
  + * @version $Revision: 1.8 $
    */
   public class StatelessSessionInstanceInterceptor
      extends AbstractInterceptor
  @@ -47,39 +26,40 @@
      // Constants -----------------------------------------------------
       
      // Attributes ----------------------------------------------------
  -     protected StatelessSessionContainer container;
  +
  +   protected StatelessSessionContainer container;
      
      // Static --------------------------------------------------------
   
      // Constructors --------------------------------------------------
      
      // Public --------------------------------------------------------
  -   public void setContainer(Container container) 
  +
  +   public void setContainer(final Container container) 
      { 
  -     this.container = (StatelessSessionContainer)container; 
  +      this.container = (StatelessSessionContainer)container; 
      }
   
  -   public  Container getContainer()
  +   public Container getContainer()
      {
  -     return container;
  +      return container;
      }
        
      // Interceptor implementation --------------------------------------
  -   public Object invokeHome(MethodInvocation mi)
  -      throws Exception
  +   
  +   public Object invokeHome(final MethodInvocation mi) throws Exception
      {
  -       // We don't need an instance since the call will be handled by container
  +      // We don't need an instance since the call will be handled by container
         return getNext().invokeHome(mi);
      }
   
  -   public Object invoke(MethodInvocation mi)
  -      throws Exception
  +   public Object invoke(final MethodInvocation mi) throws Exception
      {
         // Get context
         mi.setEnterpriseContext(container.getInstancePool().get());
         
  -       // There is no need for synchronization since the instance is always fresh 
also there should
  -       // never be a tx associated with the instance.
  +      // There is no need for synchronization since the instance is always fresh 
also there should
  +      // never be a tx associated with the instance.
         
         try
         {
  @@ -87,23 +67,21 @@
            return getNext().invoke(mi);
         } catch (RuntimeException e) // Instance will be GC'ed at MI return
         {
  -             mi.setEnterpriseContext(null);
  -             throw e;
  +         mi.setEnterpriseContext(null);
  +         throw e;
         } catch (RemoteException e) // Instance will be GC'ed at MI return
         {
  -     mi.setEnterpriseContext(null);
  -     throw e;
  +         mi.setEnterpriseContext(null);
  +         throw e;
         } catch (Error e) // Instance will be GC'ed at MI return
         {
  -         mi.setEnterpriseContext(null);
  -         throw e;
  +         mi.setEnterpriseContext(null);
  +         throw e;
         } finally
         {
  -             // Return context
  -             if (mi.getEnterpriseContext() != null)
  -                     container.getInstancePool().free(mi.getEnterpriseContext());
  +         // Return context
  +         if (mi.getEnterpriseContext() != null)
  +            container.getInstancePool().free(mi.getEnterpriseContext());
         }
      }
  -   
   }
  -
  
  
  

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

Reply via email to