[Seasar-user:17339] Re: Seasar[複数Interceptorの使い方]

Koichi Kobayashi [E-MAIL ADDRESS DELETED]
2009年 4月 29日 (水) 18:00:44 JST


小林 (koichik) です.

Date:    Wed, 29 Apr 2009 16:44:39 +0900
From:    thomas <[E-MAIL ADDRESS DELETED]>
To:      [E-MAIL ADDRESS DELETED]
Subject: [Seasar-user:17338] Seasar[複数Interceptorの使い方]

> If i use like this for menu page and expensesheet page the login check
> interceptor has not called because i added these two pages in
> addIgnoreClassPattern of userlevel check interceptor.

IgnoreClassPatterns of CustomizerChain are applied to all
the children customizer of CustomizerChain.

<component class="CustomizerChain">
  <initMethod name="addAspectCustomizer"><!-- customizer 1 -->
  </initMethod>
  <initMethod name="addAspectCustomizer"><!-- customizer 2 -->
  </initMethod>
  <initMethod name="addIgnoreClassPattern"><!-- applied to customizer 1 and 2 -->
  </initMethod>
</component>

> I have to include addIgnoreClassPattern for each interceptor.Is it possible
> or not?
> If my thinging is not correct..If its not correct then how can i achieve
> this...

> customizer.dicon
> :::::::::::::::::::::::::*
<component name="pageCustomizer"
class="org.seasar.framework.container.customizer.CustomizerChain">
    <initMethod name="addCustomizer">
      <arg>traceCustomizer</arg>
    </initMethod>

    <initMethod name="addCustomizer">
      <arg>
        <component class="org.seasar.framework.container.customizer.AspectCustomizer">
          <property name="interceptorName">"LoginAuthInterceptor"</property>
          <property name="pointcut">"do.*,initialize, prerender"</property>
          <initMethod name="addIgnoreClassPattern">
            <arg>*"pmtool.web.login"*</arg>
            <arg>*"LoginPage"*</arg>
          </initMethod>
          <initMethod name="addIgnoreClassPattern">
            <arg>"*pmtool.web.error*"</arg>
            <arg>*"Error.**"</arg>
          </initMethod>
          <initMethod name="addIgnoreClassPattern">
            <arg>*"pmtool.web.exception*"</arg>
            <arg>"*Login.**"</arg>
          </initMethod>
        </component>
      </arg>
    </initMethod>

    <initMethod name="addCustomizer">
      <arg>
        <component class="org.seasar.framework.container.customizer.AspectCustomizer">
          <property name="interceptorName">"LoginUserInterceptor"</property>
          <property name="pointcut">"do.*,initialize, prerender"</property>
          <initMethod name="addIgnoreClassPattern">
            <arg>"pmtool.web.login"</arg>
            <arg>"LoginPage"</arg>
          </initMethod>
          <initMethod name="addIgnoreClassPattern">
            <arg>"pmtool.web.error"</arg>
            <arg>"Error.*"</arg>
          </initMethod>
          <initMethod name="addIgnoreClassPattern">
            <arg>"pmtool.web.exception"</arg>
            <arg>"Login.*"</arg>
          </initMethod>
          <initMethod name="addIgnoreClassPattern">
            <arg>"*pmtool.web.expensesheet*"</arg>
            <arg>*"Index.**"</arg>
          </initMethod>
          <initMethod name="addIgnoreClassPattern">
            <arg>"*pmtool.web.menu*"</arg>
            <arg>*"Menu.**"</arg>
          </initMethod>
      </arg>
    </initMethod>
</component>



-- 
<component name="koichik">
    <property name="fullName">"Koichi Kobayashi"</property>
    <property name="email">"[E-MAIL ADDRESS DELETED]"</property>
    <property name="blog">"http://d.hatena.ne.jp/koichik"</property>
</component>



Seasar-user メーリングリストの案内