[Seasar-user:8169] Re: Interceptorについて

ぺにー [E-MAIL ADDRESS DELETED]
2007年 6月 7日 (木) 20:53:41 JST


ご丁寧な返答ありがとうございます。

ご教授いただいた方法で解決できました。
SMART deployを使用している場合は、
customizer.diconに記述した方がよいのですね。
勉強になります。

「SMART deployの設定方法」を読んで理解するようにします。
ありがとうございました。

-----Original Message-----
From: [E-MAIL ADDRESS DELETED]
[mailto:[E-MAIL ADDRESS DELETED]] On Behalf Of Koichi
Kobayashi
Sent: Thursday, June 07, 2007 6:00 PM
To: [E-MAIL ADDRESS DELETED]
Subject: [Seasar-user:8163] Re: Interceptorについて

小林 (koichik) です.

Date:    Thu, 7 Jun 2007 10:00:49 +0900
From:    "ぺにー" <[E-MAIL ADDRESS DELETED]>
To:       [E-MAIL ADDRESS DELETED]
Subject: [Seasar-user:8142] Re: Interceptorについて

> Eclipseコンソールログを添付しておりますのでご確認お願いしたいと思います。

	at jp.co.gihyo.javaexpert.teeda.web.error.ErrorPage.doAction(ErrorPage.java:6)
	at jp.co.gihyo.javaexpert.teeda.web.error.ErrorPage$$EnhancedByS2AOP$$15cd49f.$$doAction$$invokeSuperMethod$$(ErrorPage$$EnhancedByS2AOP$$15cd49f.java)
	at jp.co.gihyo.javaexpert.teeda.web.error.ErrorPage$$EnhancedByS2AOP$$15cd49f$$MethodInvocation$$doAction0.proceed(MethodInvocationClassGenerator.java)
	at org.seasar.framework.aop.interceptors.ClassLoaderAwareTraceInterceptor.invoke(ClassLoaderAwareTraceInterceptor.java:53)
	at jp.co.gihyo.javaexpert.teeda.web.error.ErrorPage$$EnhancedByS2AOP$$15cd49f$$MethodInvocation$$doAction0.proceed(MethodInvocationClassGenerator.java)
	at jp.co.gihyo.javaexpert.teeda.web.error.ErrorPage$$EnhancedByS2AOP$$15cd49f.doAction(ErrorPage$$EnhancedByS2AOP$$15cd49f.java)

ErrorPage にトレースインターセプタが適用されてますね.
[Seasar-user:8102] の ErrorPage.dicon では

<components>
	<component name="handleThrowableInterceptor"
class="jp.co.gihyo.javaexpert.teeda.web.error.HandleThrowableInterceptor">
	</component>
	<component class="jp.co.gihyo.javaexpert.teeda.web.error.ErrorPage">
		<aspect>handleThrowableInterceptor</aspect>
	</component>
</components>

となっており,トレースインターセプタは指定されて
いないことから,この定義は効いてなくて SMART deploy で
自動登録された ErrorPage が動いているものと思われます.

と書いていて,ErrorPage の <component> 要素に
name 属性がないことに気づきました.(^^;

<component name="errorPage"
class="jp.co.gihyo.javaexpert.teeda.web.error.ErrorPage">
           ^^^^^^^^^^^^^^^^
このために SMART deploy での自動登録の方が
有効になっていたのだと思います.

SMART deploy を使っているなら,インターセプタの
設定も上記のように個別にするのではなく,
customizer.dicon でするのがいいと思います.

  <component name="pageCustomizer"
    class="org.seasar.framework.container.customizer.CustomizerChain">
    <!-- ここから -->
    <initMethod name="addCustomizer">
      <arg>
        <component
class="org.seasar.framework.container.customizer.AspectCustomizer">
          <property
name="interceptorName">"handleThrowableInterceptor"</property>
          <property name="pointcut">"do.*, initialize, prerender"</property>
        </component>
      </arg>
    </initMethod>
    <!-- ここまで -->
  </component>

のようになります.
元々の customizer.dicon に pageCustomizer の設定が
あると思うので,「ここから」~「ここまで」の間を
追加してください.
詳しくは「SMART deployの設定方法」を参照してください.

http://s2container.seasar.org/ja/S2.4SmartDeployConfig.html



--
<signature>
   <name>Koichi Kobayashi</name>
   <e-mail>[E-MAIL ADDRESS DELETED]</e-mail>
</signature>

_______________________________________________
Seasar-user mailing list
[E-MAIL ADDRESS DELETED]
https://ml.seasar.org/mailman/listinfo/seasar-user


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