$B>.NSMM(B<br>$B$$$D$b$*@$OC$K$J$C$F$*$j$^$9!#(B<br><br>$B$O$$!"(Blogic.dicon$B$N$[$&$O(Bname$BB0@-$O$D$1$F$$$^$;$s!#(B<br>mock.dicon$B$N$[$&$K(Bname$BB0@-$r$D$1$F$d$C$F$_$?$N$G$9$,!"(B<br>logic.dicon$B$KMQ0U$7$?$[$&$,%;%C%H$5$l$F$7$^$$$^$7$?!#(B<br><br>$B2<5-$NNc$G$$$&!"(BHogeService$B$H(BHogeLogic$B$ON>J}$H$b(B logic.dicon $B$K(B<br>$BEPO?$5$l$F$$$k7A$G$9!#(B<br><br>$B!VL>A0$,$"$k$[$&$,M%@h$5$l$k!W$H$$$&$3$H$G$9$,!"(B<br>
<br>class HogeService {<br>&nbsp; @resource<br>&nbsp; private HogeLogic hogeLogic;<br>}<br><br>$B$N>l9g!"!V(BhogeLogic$B!W(B($B%/%i%9L>$r(Bdecapitalize$B$7$?$b$N(B)<br>$B$H$$$&L>A0$G%3%s%]!<%M%s%H$rC5$7!"(B<br>$BL5$1$l$P!"(B HogeLogic$B$r%$%s%?!<%U%'!<%9$K;}$D(B<br>$B%3%s%]!<%M%s%H$rC5$9$H$$$&M}2r$G$h$m$7$$$G$7$g$&$+!)(B<br><br>$B$^$?!"Nc$G$O>e5-$N$h$&$K=q$-$^$7$?$,!"(B<br>
$B<B:]$K$O%"%N%F!<%7%g%s$G$O$J$/(Bsetter$B%$%s%8%'%/%7%g%s(B<br>$B$J$N$G$9$,!"$=$l$K$h$k0c$$$O$"$j$^$9$G$7$g$&$+!)(B<br><br>$B$b$7!"F1$8L>A0$G(Bcomponent$B$rEPO?$7$F$7$^$C$?>l9g$O(B<br>$B$I$N$h$&$K$J$k$N$G$7$g$&$+!)(B<br><br>$B0J>e$h$m$7$/$*4j$$$$$?$7$^$9!#(B<br><br><br><div class="gmail_quote">2008/11/13 Koichi Kobayashi <span dir="ltr">&lt;<a href="mailto:koichik@improvement.jp">koichik@improvement.jp</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">$B>.NS(B (koichik) $B$G$9!%(B<br>
<br>
Date: &nbsp; &nbsp;Thu, 13 Nov 2008 21:01:45 +0900<br>
From: &nbsp; &nbsp;&quot;Mitsutaka Sato&quot; &lt;<a href="mailto:miztaka@gmail.com">miztaka@gmail.com</a>&gt;<br>
To: &nbsp; &nbsp; &nbsp;seasar-user &lt;<a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a>&gt;<br>
Subject: [Seasar-user:16296] [s2-container] $B$"$k%F%9%H$N$H$-$@$1(BMockInterceptor$B$r;H$C$?(BMock$B$KCV$-49$($?$$$H$-(B<br>
<div><div></div><div class="Wj3C7c"><br>
&gt; HogeService$B$N%F%9%H%1!<%9$G!"(BhogeLogic$B$r(BMockInterceptor$B$r;H$C$?(BMock$B$KCV$-49$($?$$$H$-!"(B<br>
&gt; $B$I$N$h$&$K$9$l$P$h$$$G$7$g$&$+!)(B<br>
&gt;<br>
&gt; HogeLogic$B$O(Blogic.dicon$B$K(B<br>
&gt; &nbsp; &nbsp; &lt;component<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; class=&quot;com.hoge.impl.HogeLogicImpl&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; instance=&quot;prototype&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;aspect&gt;j2ee.requiredTx&lt;/aspect&gt;<br>
&gt; &nbsp; &nbsp; &lt;/component&gt;<br>
&gt; $B$N$h$&$KDj5A$5$l$F$$$F!"(B<br>
&gt;<br>
&gt; mock.dicon $B$K(B<br>
&gt; &nbsp; &nbsp; &lt;component name=&quot;mockInterceptor&quot;<br>
&gt;<br>
&gt; class=&quot;org.seasar.framework.aop.interceptors.MockInterceptor&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;initMethod name=&quot;setReturnValue&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;arg&gt;&quot;getCenterSeq&quot;&lt;/arg&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;arg&gt;&quot;9998000001&quot;&lt;/arg&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/initMethod&gt;<br>
&gt; &nbsp; &nbsp; &lt;/component&gt;<br>
&gt; &nbsp; &nbsp; &lt;component<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; class=&quot;com.hoge.HogeLogic&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; instance=&quot;prototype&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;aspect&gt;mockInterceptor&lt;/aspect&gt;<br>
&gt; &nbsp; &nbsp; &lt;/component&gt;<br>
&gt; $B$H=q$$$F!"(B<br>
&gt;<br>
&gt; app.dicon$B$G$O(B<br>
&gt; mock.dicon$B$H(Blogic.dicon$B$r(Binclude$B$7$^$7$?!#(B<br>
&gt; $B=gHV$rF~$lBX$($F$_$F$b!"<BBV(B(HogeLogicImpl)$B$N$[$&$,%;%C%H$5$l$F$7$^$$$^$9!#(B<br>
<br>
</div></div>$B<B:]$K$O(B logic.dicon $B$NDj5A$@$1%3%s%]!<%M%s%HL>$,(B<br>
$B;XDj$5$l$F$$$J$$$G$7$g$&$+!)(B<br>
<br>
$B$b$7$=$&$J$i!$(Bmock.dicon $B$G$b%3%s%]!<%M%s%HL>$r(B<br>
$B;XDj$7$F$/$@$5$$!%(B<br>
<br>
 &nbsp; &nbsp;&lt;component<br>
 &nbsp; &nbsp; &nbsp; &nbsp;name=&quot;hogeLogic&quot;<br>
<div class="Ih2E3d"> &nbsp; &nbsp; &nbsp; &nbsp;class=&quot;com.hoge.HogeLogic&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;instance=&quot;prototype&quot;&gt;<br>
<br>
</div>Seasar2.4 $B$G$O:G=i$K%3%s%]!<%M%s%H$rL>A0$G8!:w$7$^$9!%(B<br>
$B$=$N$?$a!$JRJ}$@$1L>A0$,;XDj$5$l$F$$$k$H!$>o$K$=$A$i$,(B<br>
DI $B$5$l$^$9!%(B<br>
<div class="Ih2E3d"><br>
&gt; logic.dicon$B$r(Binclude$B$7$J$1$l$P$$$$$@$1$NOC$J$s$G$9$,!"B>$K$b$?$/$5$sEPO?$5$l$F$$$k$N$G!#(B<br>
&gt; $B2#Ce$G$-$kJ}K!$O$J$$$+$H!#(B<br>
&gt;<br>
&gt; $BF1$8%$%s%?!<%U%'!<%9$r;}$D(BComponent$B$N>l9g!"M%@h$5$l$k=g0L$H$+$"$k$s$G$7$g$&$+!)(B<br>
<br>
</div>$B$"$j$^$9!%(B<br>
app.dicon $B$,(B foo.dicon $B$H(B bar.dicon $B$r$3$N=g$G(B<br>
$B%$%s%/%k!<%I$7!$(Bfoo.dicon $B$,(B baz.dicon $B$r(B<br>
$B%$%s%/%k!<%I$7$F$$$k>l9g!$(B<br>
<br>
app.dicon<br>
 &nbsp;foo.dicon<br>
 &nbsp; &nbsp;baz.dicon<br>
 &nbsp;bar.dicon<br>
<br>
app.dicon $B$KDj5A$5$l$F$$$k%3%s%]!<%M%s%H$+$i$O!$(B<br>
$B>e5-$N=gHV$GM%@hE*$K8+$($^$9!%(B<br>
$B$D$^$j!$(B<br>
<br>
$B!&(Bapp.dicon $B$,$b$C$H$bM%@h(B<br>
$B!&(Bfoo.dicon $B$O(B bar.dicon $B$d(B baz.dicon $B$h$jM%@h(B<br>
$B!&(Bbaz.dicon $B$O(B bar.dicon $B$h$jM%@h(B<br>
<br>
$B$H$J$j$^$9!%(B<br>
$B$3$A$i$N?^$b;29M$K$7$F$/$@$5$$!%(B<br>
<br>
<a href="http://s2container.seasar.org/2.4/s2-framework/ja/apidocs/org/seasar/framework/container/S2Container.html" target="_blank">http://s2container.seasar.org/2.4/s2-framework/ja/apidocs/org/seasar/framework/container/S2Container.html</a><br>

<br>
<br>
--<br>
&lt;component name=&quot;koichik&quot;&gt;<br>
 &nbsp; &nbsp;&lt;property name=&quot;fullName&quot;&gt;&quot;Koichi Kobayashi&quot;&lt;/property&gt;<br>
 &nbsp; &nbsp;&lt;property name=&quot;email&quot;&gt;&quot;<a href="mailto:koichik@improvement.jp">koichik@improvement.jp</a>&quot;&lt;/property&gt;<br>
 &nbsp; &nbsp;&lt;property name=&quot;blog&quot;&gt;&quot;<a href="http://d.hatena.ne.jp/koichik" target="_blank">http://d.hatena.ne.jp/koichik</a>&quot;&lt;/property&gt;<br>
&lt;/component&gt;<br>
<br>
_______________________________________________<br>
Seasar-user mailing list<br>
<a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
<a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>
</blockquote></div><br>