dblevins    2005/04/15 22:07:49

  Modified:    modules/core/src/java/org/openejb/slsb
                        StatelessInterceptorBuilder.java
  Log:

  Add the HandlerChainInterceptor before dispatch
  
  Revision  Changes    Path
  1.8       +14 -2     
openejb/modules/core/src/java/org/openejb/slsb/StatelessInterceptorBuilder.java
  
  Index: StatelessInterceptorBuilder.java
  ===================================================================
  RCS file: 
/scm/openejb/openejb/modules/core/src/java/org/openejb/slsb/StatelessInterceptorBuilder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StatelessInterceptorBuilder.java  25 Feb 2005 23:06:11 -0000      1.7
  +++ StatelessInterceptorBuilder.java  16 Apr 2005 02:07:49 -0000      1.8
  @@ -49,7 +49,6 @@
   
   import org.apache.geronimo.core.service.Interceptor;
   import org.apache.geronimo.naming.java.ComponentContextInterceptor;
  -
   import org.openejb.AbstractInterceptorBuilder;
   import org.openejb.ConnectionTrackingInterceptor;
   import org.openejb.SystemExceptionInterceptor;
  @@ -66,6 +65,8 @@
    */
   public class StatelessInterceptorBuilder extends AbstractInterceptorBuilder {
   
  +    private HandlerChainConfiguration handlerChainConfiguration;
  +
       public TwoChains buildInterceptorChains() {
           if (transactionContextManager == null) {
               throw new IllegalStateException("Transaction manager must be set 
before building the interceptor chain");
  @@ -76,6 +77,9 @@
   
           Interceptor firstInterceptor;
           firstInterceptor = new DispatchInterceptor(vtable);
  +        if (handlerChainConfiguration != null){
  +            firstInterceptor = new HandlerChainInterceptor(firstInterceptor, 
handlerChainConfiguration.getHandlerInfoList(), 
handlerChainConfiguration.getRoles());
  +        }
           firstInterceptor = new ComponentContextInterceptor(firstInterceptor, 
componentContext);
           if (trackedConnectionAssociator != null) {
               firstInterceptor = new 
ConnectionTrackingInterceptor(firstInterceptor, trackedConnectionAssociator);
  @@ -98,5 +102,13 @@
           firstInterceptor = new 
TransactionContextInterceptor(firstInterceptor, transactionContextManager, 
transactionPolicyManager);
           firstInterceptor = new SystemExceptionInterceptor(firstInterceptor, 
ejbName);
           return new TwoChains(firstInterceptor, systemChain);
  +    }
  +
  +    public HandlerChainConfiguration getHandlerChainConfiguration() {
  +        return handlerChainConfiguration;
  +    }
  +
  +    public void setHandlerChainConfiguration(HandlerChainConfiguration 
handlerChainConfiguration) {
  +        this.handlerChainConfiguration = handlerChainConfiguration;
       }
   }
  
  
  

Reply via email to