<p>$BJV?.$"$j$,$H$&$4$6$$$^$9!#(B<br>
okuda$B$G$9!#(B</p>
<p>$B$J$k$[$I!"(Bthreadlocal$B$G$7$?$+!#(B<br>
$BG<F@$7$^$7$?!#(B<br>
$B?WB.$JBP1~$H2sEz$K!"2~$a$F46<U$$$?$7$^$9!#(B<br>
$BM-$jFq$&$4$6$$$^$7$?!#(B</p>
<p>$B0J>e!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B</p>
<div class="gmail_quote">2011/10/12 12:41 "Toshihiro Nakamura" <<a href="mailto:toshihiro.nakamura@gmail.com">toshihiro.nakamura@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
$BCfB<(B(taedium)$B$G$9!#(B<br>
<br>
$B3NG'$"$j$,$H$&$4$6$$$^$7$?!#(B<br>
1.19.0$B$H$7$F:#=5Kv$"$?$j$K%j%j!<%9$7$?$$$H;W$$$^$9!#(B<br>
<br>
> $BNc$($P!"BP>]$H$9$k%G!<%?%=!<%9$,0[$J$k#2$D$N%j%/%(%9%H$,F1;~$KMh$?>l9g!"(B<br>
> $B6O$+$J%?%$%_%s%0$GA0<T$H$J$C$?%j%/%(%9%H$O!"(B<br>
> $B8e<T$N%G!<%?%=!<%9L>$G<hF@$7$K$$$C$F$7$^$&$H$$$&$3$H$O$J$$$N$G$7$g$&$+!)(B<br>
<br>
$B7kO@$+$i8@$($P!"$=$&$$$&$3$H$O5/$-$^$;$s!#(B<br>
DataSourceFactoryImpl$B$K@_Dj$5$l$?%G!<%?%=!<%9L>$O(B<br>
java.lang.ThreadLocal$B$G4IM}$5$l$F$$$k$+$i$G$9!#(B<br>
$B$D$^$j!"%j%/%(%9%H$4$H$KJL$NNN0h$G4IM}$5$l$k$N$G(B<br>
$B6%9g$7$J$$$H$$$&$o$1$G$9!#(B<br>
<br>
2011$BG/(B10$B7n(B12$BF|(B11:17 . <<a href="mailto:luck62@gmail.com">luck62@gmail.com</a>>:<br>
> $BJV?.$"$j$,$H$&$4$6$$$^$9!#(B<br>
> okuda$B$G$9!#(B<br>
><br>
>> $B<!$N$b$N$r$*;H$$$/$@$5$$!#(B<br>
> $BF0:n3NG'$7$?$H$3$m!"L5;v#2$D$N%G!<%?%=!<%9$,@Z$jBX$($F(B<br>
> $B%"%/%;%9$7$F$$$k$3$H$,3NG'$G$-$^$7$?!#(B<br>
> $BK\Ev$K$"$j$,$H$&$4$6$$$^$7$?!#(B<br>
><br>
> $B:G8e$K(B1$BE@$@$13NG'$7$?$$$3$H$,$"$k$N$G$9$,!"$h$m$7$$$G$7$g$&$+!)(B<br>
> $B!J(B<a href="http://s2container.seasar.org/2.4/ja/jdbc.html#DataSourceDynamicSwiching" target="_blank">http://s2container.seasar.org/2.4/ja/jdbc.html#DataSourceDynamicSwiching</a>$B!K(B<br>
> $B%5%s%W%k$K$"$k(BSelectDataSourceInterceptor$B$K$F!"(B<br>
> dataSourceFactory.setSelectableDataSourceName( "anyname" );<br>
> $B$H(BDataSourceFactory$B$KBP$7$FL>A0$r@_Dj$7$F$$$^$9$,!"(B<br>
> $BNc$($P!"BP>]$H$9$k%G!<%?%=!<%9$,0[$J$k#2$D$N%j%/%(%9%H$,F1;~$KMh$?>l9g!"(B<br>
> $B6O$+$J%?%$%_%s%0$GA0<T$H$J$C$?%j%/%(%9%H$O!"(B<br>
> $B8e<T$N%G!<%?%=!<%9L>$G<hF@$7$K$$$C$F$7$^$&$H$$$&$3$H$O$J$$$N$G$7$g$&$+!)(B<br>
> $B$D$^$j!"%j%/%(%9%H(BA.setSelectableDataSourceName("A")$B!!"*(B<br>
> $B%j%/%(%9%H(BB.setSelectableDataSourceName("B")<br>
> $B"*%j%/%(%9%H(BA.ActionExecute...$B!!"*!!%j%/%(%9%H(BB.ActionExecute...<br>
> $B$H$$$&>uBV$,5/$3$j$($k$N$+!"$H$$$&E@$H!"2>$K5/$3$j$($k>l9g$K(BS2$B$d(BDoma$B$,(B<br>
> $B$=$l$r5[<}$7$F$/$l$k$N$+!"$H$$$&E@$,5$$K$J$C$F$$$^$9!#(B<br>
> $B!J8!F$0c$$$J<ALd$r$7$F$$$k$h$&$G$7$?$i!"$9$_$^$;$s!#!K(B<br>
><br>
> $B0J>e!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B<br>
><br>
><br>
> 2011$BG/(B10$B7n(B11$BF|(B23:06 Toshihiro Nakamura <<a href="mailto:toshihiro.nakamura@gmail.com">toshihiro.nakamura@gmail.com</a>>:<br>
>> $BCfB<(B(taedium)$B$G$9!#(B<br>
>><br>
>>> $B@h$N%a!<%k$N(BSNAPSHOT$BHG(BDoma$B$r;n$7$F$_$?$N$G$9$,!"(B<br>
>>> $B$d$O$j!"(BDataSourceName$B$,<hF@$G$-$J$$$H%(%i!<$H$J$C$F$7$^$$$^$9!#(B<br>
>><br>
>> $B$9$_$^$;$s!#>p$1$J$$%_%9$r$7$F$$$^$7$?!#(B<br>
>> SNAPSHOT$B$r:n$jD>$7$^$7$?!#(B<br>
>> $B<!$N$b$N$r$*;H$$$/$@$5$$!#(B<br>
>><br>
>> <a href="http://maven.seasar.org/maven2-snapshot/org/seasar/doma/doma/1.19.0-SNAPSHOT/doma-1.19.0-20111011.140035-2.jar" target="_blank">http://maven.seasar.org/maven2-snapshot/org/seasar/doma/doma/1.19.0-SNAPSHOT/doma-1.19.0-20111011.140035-2.jar</a><br>
>><br>
>><br>
>> 2011$BG/(B10$B7n(B11$BF|(B13:39 . <<a href="mailto:luck62@gmail.com">luck62@gmail.com</a>>:<br>
>>> $BJV?.$"$j$,$H$&$4$6$$$^$9!#(B<br>
>>> okuda $B$G$9!#(B<br>
>>><br>
>>> $B$42sEz$"$j$,$H$&$4$6$$$^$7$?!#(B<br>
>>> $B<+J,$NG'<1$,$=$lDx$:$l$F$$$J$/$F0B?4$7$^$7$?!#(B<br>
>>><br>
>>> $B@h$N%a!<%k$N(BSNAPSHOT$BHG(BDoma$B$r;n$7$F$_$?$N$G$9$,!"(B<br>
>>> $B$d$O$j!"(BDataSourceName$B$,<hF@$G$-$J$$$H%(%i!<$H$J$C$F$7$^$$$^$9!#(B<br>
>>><br>
>>> $B2~$a$F%G%P%C%0<B9T$GDI$C$F$_$?$H$3$m!"(B<br>
>>> AnyTableDaoImpl$B$N%3%s%9%H%i%/%?$+$i(B[doma...AbstractDao.]constructor(config)$B$,%3!<%k$5$l!"(B<br>
>>> $B$=$NCf$N(BvalidateConfig$B$K$F!"(BgetDataSourceName == null$B$H$J$j!"(BConfigException$B$,(B<br>
>>> $BH/@8$7$F$$$^$7$?!#(B<br>
>>> RuntimeConfig$B$N%$%s%9%?%s%92=$^$G$O9T$C$F$$$k$H;W$C$F$$$?$N$G$9$,!"(B<br>
>>> $B0JA0$N(B1.18.0$B$KLa$7$F$b!"F1$8$H$3$m$G%(%i!<$H$J$C$F$$$^$7$?$N$G!"(B<br>
>>> $B;d$N4*0c$$$@$C$?$N$+$b$7$l$^$;$s!#(B<br>
>>> $B!JA0=R$N(BDAO$B$rMxMQ$9$k(BAction$B$HMxMQ$7$J$$(BAction$B$GF0$-$,0[$J$k$H$$$&E@$OJQ$o$j$^$;$s!#!K(B<br>
>>> $B%9%?%C%/%H%l!<%9$rE>5-$$$?$7$^$9!#(B<br>
>>> $BB>$K2?$+I,MW$J>pJs$,$"$j$^$7$?$i!"6D$C$F$/$@$5$$!#(B<br>
>>> $BBgJQ$*<j?t$G$9$,!"$*NOE:$($r=E$M$F$*4j$$$$$?$7$^$9!#(B<br>
>>><br>
>>><br>
>>> $B!Z%9%?%C%/%H%l!<%9![(B<br>
>>> 2011-10-11 12:21:23,880 [http-8080-2] DEBUG<br>
>>> org.seasar.framework.container.hotdeploy.HotdeployBehavior - HOT<br>
>>> deploy$B$r3+;O$7$^$9(B<br>
>>> 2011-10-11 12:21:23,896 [http-8080-2] WARN<br>
>>> org.seasar.framework.container.hotdeploy.HotdeployClassLoader - HOT<br>
>>> deploy$BBP>]%/%i%9(B(xxx.package.exception.MyRuntimeException)$B$,HsBP>]%/%i%9$+$i;2>H$5$l$FDL>o$N%/%i%9%m!<%@$K%m!<%I$5$l$F$$$^$9!#(B<br>
>>> 2011-10-11 12:21:23,896 [http-8080-2] WARN<br>
>>> org.seasar.framework.container.hotdeploy.HotdeployClassLoader - HOT<br>
>>> deploy$BBP>]%/%i%9(B(xxx.package.config.MyConfig)$B$,HsBP>]%/%i%9$+$i;2>H$5$l$FDL>o$N%/%i%9%m!<%@$K%m!<%I$5$l$F$$$^$9!#(B<br>
>>> 2011-10-11 12:21:23,896 [http-8080-2] WARN<br>
>>> org.seasar.framework.container.hotdeploy.HotdeployClassLoader - HOT<br>
>>> deploy$BBP>]%/%i%9(B(xxx.package.log.MyLogger)$B$,HsBP>]%/%i%9$+$i;2>H$5$l$FDL>o$N%/%i%9%m!<%@$K%m!<%I$5$l$F$$$^$9!#(B<br>
>>> 2011-10-11 12:21:23,896 [http-8080-2] WARN<br>
>>> org.seasar.framework.container.hotdeploy.HotdeployClassLoader - HOT<br>
>>> deploy$BBP>]%/%i%9(B(xxx.package.config.TenantData)$B$,HsBP>]%/%i%9$+$i;2>H$5$l$FDL>o$N%/%i%9%m!<%@$K%m!<%I$5$l$F$$$^$9!#(B<br>
>>> 2011-10-11 12:21:23,896 [http-8080-2] DEBUG<br>
>>> org.seasar.framework.container.util.S2ContainerUtil -<br>
>>> $B%/%i%9(B(xxx.package.action.test.TestAction[test_testAction])$B$N%3%s%]!<%M%s%HDj5A$rEPO?$7$^$9(B<br>
>>> 2011-10-11 12:21:23,927 [http-8080-2] DEBUG<br>
>>> org.seasar.framework.container.util.S2ContainerUtil -<br>
>>> $B%/%i%9(B(xxx.package.service.test.TestService[test_testService])$B$N%3%s%]!<%M%s%HDj5A$rEPO?$7$^$9(B<br>
>>> 2011-10-11 12:21:24,005 [http-8080-2] DEBUG<br>
>>> org.seasar.framework.container.util.S2ContainerUtil -<br>
>>> $B%/%i%9(B(xxx.package.dao.base.impl.AnyTableDaoImpl[base_anyTableDao])$B$N%3%s%]!<%M%s%HDj5A$rEPO?$7$^$9(B<br>
>>> 2011-10-11 12:21:34,240 [http-8080-2] ERROR<br>
>>> xxx.package.servlet.MyRESTServlet - Internal error occurred.<br>
>>> org.seasar.framework.beans.IllegalPropertyRuntimeException:<br>
>>> [ESSR0059]$B%/%i%9(B(xxx.package.action.test.TestAction$$EnhancedByS2AOP$$8d1749)$B$N%W%m%Q%F%#(B(testService)$B$N@_Dj$K<:GT$7$^$7$?!#M}M3$O(Borg.seasar.framework.beans.IllegalPropertyRuntimeException:<br>
>>> [ESSR0059]$B%/%i%9(B(xxx.package.service.test.TestService$$EnhancedByS2AOP$$114a3c6)$B$N%W%m%Q%F%#(B(anyTableDao)$B$N@_Dj$K<:GT$7$^$7$?!#M}M3$O(Borg.seasar.framework.exception.InvocationTargetRuntimeException:<br>
>>> [ESSR0043]xxx.package.dao.base.impl.AnyTableDaoImpl$$EnhancedByS2AOP$$17ccb2f$B$,8F$S=P$7$?BP>]$,IT@5$G$9!#M}M3$O(Borg.seasar.doma.jdbc.ConfigException:<br>
>>> [DOMA2035] org.seasar.doma.jdbc.Config$B$N<BAu%/%i%9(B[xxx.package.config.doma.DomaConfig]$B$N%a%=%C%I(B[getDataSourceName]$B$+$i(Bnull$B$,JV$5$l$^$7$?!#(B<br>
>>> at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:297)<br>
>>> at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(AbstractBindingTypeDef.java:149)<br>
>>> at org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTypeMustDef.java:45)<br>
>>> at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(AbstractBindingTypeDef.java:91)<br>
>>> at org.seasar.framework.container.assembler.AccessTypeFieldDef.bind(AccessTypeFieldDef.java:50)<br>
>>> at org.seasar.framework.container.assembler.AccessTypeFieldDef.bind(AccessTypeFieldDef.java:42)<br>
>>> at org.seasar.framework.container.assembler.AutoPropertyAssembler.assemble(AutoPropertyAssembler.java:56)<br>
>>> at org.seasar.framework.container.deployer.RequestComponentDeployer.deploy(RequestComponentDeployer.java:67)<br>
>>> at org.seasar.framework.container.impl.ComponentDefImpl.getComponent(ComponentDefImpl.java:111)<br>
>>> at org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:129)<br>
>>> at xxx.package.servlet.container.extension.S2MyContainer.getComponent(S2MyContainer.java:28)<br>
>>> at net.arnx.jsonic.web.RESTServlet.doREST(RESTServlet.java:221)<br>
>>> at net.arnx.jsonic.web.RESTServlet.doPost(RESTServlet.java:141)<br>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)<br>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br>
>>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br>
>>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
>>> at org.seasar.framework.container.hotdeploy.HotdeployFilter.doHotdeployFilter(HotdeployFilter.java:99)<br>
>>> at org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:67)<br>
>>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>
>>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
>>> at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:79)<br>
>>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>
>>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
>>> at org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:69)<br>
>>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>
>>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
>>> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)<br>
>>> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)<br>
>>> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)<br>
>>> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br>
>>> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br>
>>> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)<br>
>>> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)<br>
>>> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)<br>
>>> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)<br>
>>> at java.lang.Thread.run(Thread.java:662)<br>
>>> Caused by: org.seasar.framework.beans.IllegalPropertyRuntimeException:<br>
>>> [ESSR0059]$B%/%i%9(B(xxx.package.service.test.TestService$$EnhancedByS2AOP$$114a3c6)$B$N%W%m%Q%F%#(B(anyTableDao)$B$N@_Dj$K<:GT$7$^$7$?!#M}M3$O(Borg.seasar.framework.exception.InvocationTargetRuntimeException:<br>
>>> [ESSR0043]xxx.package.dao.base.impl.AnyTableDaoImpl$$EnhancedByS2AOP$$17ccb2f$B$,8F$S=P$7$?BP>]$,IT@5$G$9!#M}M3$O(Borg.seasar.doma.jdbc.ConfigException:<br>
>>> [DOMA2035] org.seasar.doma.jdbc.Config$B$N<BAu%/%i%9(B[xxx.package.config.doma.DomaConfig]$B$N%a%=%C%I(B[getDataSourceName]$B$+$i(Bnull$B$,JV$5$l$^$7$?!#(B<br>
>>> at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:297)<br>
>>> at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(AbstractBindingTypeDef.java:149)<br>
>>> at org.seasar.framework.container.assembler.BindingTypeMustDef.doBind(BindingTypeMustDef.java:45)<br>
>>> at org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(AbstractBindingTypeDef.java:91)<br>
>>> at org.seasar.framework.container.assembler.AccessTypeFieldDef.bind(AccessTypeFieldDef.java:50)<br>
>>> at org.seasar.framework.container.assembler.AccessTypeFieldDef.bind(AccessTypeFieldDef.java:42)<br>
>>> at org.seasar.framework.container.assembler.AutoPropertyAssembler.assemble(AutoPropertyAssembler.java:56)<br>
>>> at org.seasar.framework.container.deployer.PrototypeComponentDeployer.deploy(PrototypeComponentDeployer.java:43)<br>
>>> at org.seasar.framework.container.impl.ComponentDefImpl.getComponent(ComponentDefImpl.java:111)<br>
>>> at org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:129)<br>
>>> at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:295)<br>
>>> ... 36 more<br>
>>> Caused by: org.seasar.framework.exception.InvocationTargetRuntimeException:<br>
>>> [ESSR0043]xxx.package.dao.base.impl.AnyTableDaoImpl$$EnhancedByS2AOP$$17ccb2f$B$,8F$S=P$7$?BP>]$,IT@5$G$9!#M}M3$O(Borg.seasar.doma.jdbc.ConfigException:<br>
>>> [DOMA2035] org.seasar.doma.jdbc.Config$B$N<BAu%/%i%9(B[xxx.package.config.doma.DomaConfig]$B$N%a%=%C%I(B[getDataSourceName]$B$+$i(Bnull$B$,JV$5$l$^$7$?!#(B<br>
>>> at org.seasar.framework.util.ConstructorUtil.newInstance(ConstructorUtil.java:65)<br>
>>> at org.seasar.framework.container.assembler.AbstractConstructorAssembler.assembleDefault(AbstractConstructorAssembler.java:115)<br>
>>> at org.seasar.framework.container.assembler.AutoConstructorAssembler.doAssemble(AutoConstructorAssembler.java:44)<br>
>>> at org.seasar.framework.container.assembler.AbstractConstructorAssembler.assemble(AbstractConstructorAssembler.java:55)<br>
>>> at org.seasar.framework.container.deployer.PrototypeComponentDeployer.deploy(PrototypeComponentDeployer.java:42)<br>
>>> at org.seasar.framework.container.impl.ComponentDefImpl.getComponent(ComponentDefImpl.java:111)<br>
>>> at org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2ContainerImpl.java:129)<br>
>>> at org.seasar.framework.container.assembler.AbstractBindingTypeDef.getValue(AbstractBindingTypeDef.java:295)<br>
>>> ... 46 more<br>
>>> Caused by: org.seasar.doma.jdbc.ConfigException: [DOMA2035]<br>
>>> org.seasar.doma.jdbc.Config$B$N<BAu%/%i%9(B[xxx.package.config.doma.DomaConfig]$B$N%a%=%C%I(B[getDataSourceName]$B$+$i(Bnull$B$,JV$5$l$^$7$?!#(B<br>
>>> at org.seasar.doma.internal.jdbc.dao.AbstractDao.validateConfig(AbstractDao.java:120)<br>
>>> at org.seasar.doma.internal.jdbc.dao.AbstractDao.<init>(AbstractDao.java:56)<br>
>>> at xxx.package.dao.base.impl.AnyTableDaoImpl.<init>(AnyTableDaoImpl.java:13)<br>
>>> at xxx.package.dao.base.impl.AnyTableDaoImpl$$EnhancedByS2AOP$$17ccb2f.<init>(AnyTableDaoImpl$$EnhancedByS2AOP$$17ccb2f.java)<br>
>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br>
>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)<br>
>>> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)<br>
>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)<br>
>>> at org.seasar.framework.util.ConstructorUtil.newInstance(ConstructorUtil.java:57)<br>
>>> ... 53 more<br>
>>> 2011-10-11 12:21:34,255 [http-8080-2] DEBUG<br>
>>> org.seasar.framework.container.hotdeploy.HotdeployBehavior - HOT<br>
>>> deploy$B$r=*N;$7$^$7$?(B<br>
>>><br>
>>> $B0J>e!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B<br>
>>><br>
>>> 2011$BG/(B10$B7n(B11$BF|(B11:40 Toshihiro Nakamura <<a href="mailto:toshihiro.nakamura@gmail.com">toshihiro.nakamura@gmail.com</a>>:<br>
>>>><br>
>>>> $BCfB<(B(taedium)$B$G$9!#(B<br>
>>>><br>
>>>> > <component name="actionCustomizer"<br>
>>>> > class="org.seasar.framework.container.customizer.CustomizerChain"><br>
>>>> > <initMethod name="addAspectCustomizer"><br>
>>>> > <arg>"selectDataSourceInterceptor"</arg><br>
>>>> > <arg>true</arg> // $B"+DI2C(B<br>
>>>> > </initMethod><br>
>>>> > ....<br>
>>>> > </component><br>
>>>> > $B$H$9$k$@$1$G59$7$+$C$?$G$7$g$&$+!)(B<br>
>>>><br>
>>>> $B$O$$!"Bg>fIW$G$9!#(B<br>
>>>><br>
>>>> > 1$B%j%/%(%9%H$N4V$G$"$l$P!"J#?t$N(Bprototype$B%*%V%8%'%/%H$N4V$GF1$8(Brequest$B%*%V%8%'%/%H$,;H$$$^$o$5$l$k!"(B<br>
>>>> > $B$H$$$&G'<1$G9g$C$F$$$k$G$7$g$&$+!)(B<br>
>>>><br>
>>>> $B9g$C$F$$$^$9!#(B<br>
>>>><br>
>>>><br>
>>>> 2011$BG/(B10$B7n(B11$BF|(B10:44 . <<a href="mailto:luck62@gmail.com">luck62@gmail.com</a>>:<br>
>>>> > $BJV?.$"$j$,$H$&$4$6$$$^$9!#(B<br>
>>>> > okuda$B$G$9!#(B<br>
>>>> ><br>
>>>> >> $B=$@5$7$F(BSNAPSHOT$B$r:n@.$7$?$N$G(Bdoma-1.18.0.jar$B$NBe$o$j$K(B<br>
>>>> >> $B<!$N(Bjar$B$G;n$7$F$$$?$@$1$J$$$G$7$g$&$+!#(B<br>
>>>> > $BAaB.$N$4BP1~$"$j$,$H$&$4$6$$$^$9!#(B<br>
>>>> > $BF0:n3NG'$,=*$o$j$^$7$?$i!"2~$a$F$4Js9p$$$?$7$^$9!#(B<br>
>>>> ><br>
>>>> >> $B%$%s%?!<%;%W%?$r%+%9%?%^%$%6$G@_Dj$9$k:](BuseLookupAdapter$B$r(Btrue$B$K$9$kI,MW$,$"$j$^$9!#(B<br>
>>>> > $B>pJs$"$j$,$H$&$4$6$$$^$9!#(B<br>
>>>> > <component name="actionCustomizer"<br>
>>>> > class="org.seasar.framework.container.customizer.CustomizerChain"><br>
>>>> > <initMethod name="addAspectCustomizer"><br>
>>>> > <arg>"selectDataSourceInterceptor"</arg><br>
>>>> > <arg>true</arg> // $B"+DI2C(B<br>
>>>> > </initMethod><br>
>>>> > ....<br>
>>>> > </component><br>
>>>> > $B$H$9$k$@$1$G59$7$+$C$?$G$7$g$&$+!)(B<br>
>>>> > $B!J5-:\$$$?$@$$$?%j%s%/$N>eCJ(BAspectCustomizer $B$rMxMQ$9$kNc$O!"%3%s%]!<%M%s%H<+F0EPO?$rMxMQ$7$J$$>l9g$N(B<br>
>>>> >$B!!(B addCustomizer$B$N%3!<%INc$NG'<1$G$9!#!K(B<br>
>>>> ><br>
>>>> > $B>/$7OC$,0o$l$F$7$^$&$N$G$9$,!"(BS2$B$N%$%s%9%?%s%94IM}$K$D$$$F<ALd$5$;$F$/$@$5$$!#(B<br>
>>>> > $B%$%s%9%?%s%9B0@-$H$7$F!"(Bsingleton, prototype, request, etc..$B$H$"$j$^$9$,!"(B<br>
>>>> > $B2<$N%l%Y%k$+$i>e$N%l%Y%k$r(BDI$B$GJ];}$9$k$H$-!"Nc$($P!"(B<br>
>>>> > prototype$B%9%3!<%W$N%*%V%8%'%/%H$N%a%s%P%U%#!<%k%I$G(Brequest$B%9%3!<%W$N(BResource$B$,Dj5A$5$l$F$$$k>l9g!"(B<br>
>>>> > 1$B%j%/%(%9%H$N4V$G$"$l$P!"J#?t$N(Bprototype$B%*%V%8%'%/%H$N4V$GF1$8(Brequest$B%*%V%8%'%/%H$,;H$$$^$o$5$l$k!"(B<br>
>>>> > $B$H$$$&G'<1$G9g$C$F$$$k$G$7$g$&$+!)(B<br>
>>>> > $B!J@($/=iJbE*$J<ALd$+$H;W$$$^$9$,!"(BDI$B$r=i$a$FMxMQ$9$k$b$N$G$7$F!#!#!K(B<br>
>>>> > $B0J>e!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B<br>
>>>> ><br>
>>>> ><br>
>>>> > 2011$BG/(B10$B7n(B10$BF|(B22:39 Toshihiro Nakamura <<a href="mailto:toshihiro.nakamura@gmail.com">toshihiro.nakamura@gmail.com</a>>:<br>
>>>> >><br>
>>>> >> $BCfB<(B(taedium)$B$G$9!#(B<br>
>>>> >><br>
>>>> >> > $B$^$?!"%G%P%C%0<B9T$GDI$C$F$_$?8B$j$G$O!"(BAnyTableDaoImpl$B!J(Bdoma...AbstractDao$B!K$N%3%s%9%H%i%/%?$+$i(B<br>
>>>> >> > RuntimeConfig$B$r%$%s%9%?%s%92=$9$k:]$N(B<br>
>>>> >> > AssertionUtil.assertNotNull(config.getDataSourceName()); $B$K$F(B<br>
>>>> >> > $BA0=R$N$h$&$K(Bnull$B$G<hF@$5$l$k$?$a!"%(%i!<$,H/@8$7$F$$$k$h$&$G$7$?!#(B<br>
>>>> >><br>
>>>> >> $B$3$N5sF0$O!"(BDoma$B$N%P%0$G$9$M!#!#!#(B<br>
>>>> >> $B=$@5$7$F(BSNAPSHOT$B$r:n@.$7$?$N$G(Bdoma-1.18.0.jar$B$NBe$o$j$K(B<br>
>>>> >> $B<!$N(Bjar$B$G;n$7$F$$$?$@$1$J$$$G$7$g$&$+!#(B<br>
>>>> >><br>
>>>> >> <a href="http://maven.seasar.org/maven2-snapshot/org/seasar/doma/doma/1.19.0-SNAPSHOT/doma-1.19.0-20111010.130704-1.jar" target="_blank">http://maven.seasar.org/maven2-snapshot/org/seasar/doma/doma/1.19.0-SNAPSHOT/doma-1.19.0-20111010.130704-1.jar</a><br>
>>>> >><br>
>>>> >> $B$=$l$H!":#2s$N8=>]$HD>@\$O4X78$"$j$^$;$s$,!"(B<br>
>>>> >> $B%$%s%?!<%;%W%?$r%+%9%?%^%$%6$G@_Dj$9$k:](BuseLookupAdapter$B$r(Btrue$B$K$9$kI,MW$,$"$j$^$9!#(B<br>
>>>> >> $B!J$=$&$7$J$$$H!"(BCOOL deploy$B;~$K!"%$%s%?!<%;%W%?$,(Bprototype$B$H$7$FF0:n$7$^$;$s!K(B<br>
>>>> >> $B@_DjJ}K!$O<!$N%j%s%/@h$,;29M$K$J$j$^$9!#(B<br>
>>>> >> <a href="http://www.seasar.org/wiki/index.php?FAQ%2FS2AOP#q69751d4" target="_blank">http://www.seasar.org/wiki/index.php?FAQ%2FS2AOP#q69751d4</a><br>
>>>> >><br>
>>>> >> 2011$BG/(B10$B7n(B10$BF|(B12:29 . <<a href="mailto:luck62@gmail.com">luck62@gmail.com</a>>:<br>
>>>> >> > $BJV?.$"$j$,$H$&$4$6$$$^$9!#(B<br>
>>>> >> > okdua$B$G$9!#(B<br>
>>>> >> ><br>
>>>> >> >> $B!V(BgetComponent$B$K$h$C$F<hF@$9$k!W$H$"$j$^$9$,!"$3$l$O!"(B<br>
>>>> >> >> net.arnx.jsonic.web.extension.S2Container$B%/%i%9$N(BgetComponent$B%a%=%C%I(B<br>
>>>> >> >> $B$NCf$G9T$o$l$k=hM}$r;X$7$F$$$k$N$G$7$g$&$+!)(B<br>
>>>> >> > $B?=$7Lu$"$j$^$;$s!#(B<br>
>>>> >> > net.arnx.jsonic.web.extension.S2Container$B%/%i%9$N(BgetComponent$B$r;X$7$F$$$^$7$?!#(B<br>
>>>> >> ><br>
>>>> >> > $B!JJdB-$G$9$,!"(Bnet.arnx.jsonic.web.RESTServlet$B$NCf$G$O!"(BS2Container$B$+$i(BSingletonS2ContainerFactory$B$X(B<br>
>>>> >> > $B0Q>y$7$F(BgetComponent$B$+$i(Bcomponent$B$r<hF@$7!"JLES8F$S=P$9%a%=%C%IL>$r7hDj$7$F$+$i!"(B<br>
>>>> >> > component$B$K(Bexecute$B$r$+$1$F$$$k$h$&$G$9!#!K(B<br>
>>>> >> ><br>
>>>> >> >> SelectDataSourceInterceptor$B$O(BS2$B%3%s%F%J$KEPO?$G$-$F$$$^$9$+!)(B<br>
>>>> >> > $B$O$$!"%Q%C%1!<%8L>(B.interceptor.SelectDataSourceInterceptor$B$H$7$F:n@.$7$F$*$j$^$9!#(B<br>
>>>> >> > $B$^$?!"(Bcreator.dicon $B$K$O!"(BInterceptorCreator $B$*$h$S(B ActionCreator$B$r(B<br>
>>>> >> > $BDj5A$7$F$*$j$^$9!#(B<br>
>>>> >> > $B!J(BService/DAO$B$K$D$$$F$b!"3:Ev$N(BCreator$B$rDj5A$7!"<+F0EPO?$rMxMQ$7$F$$$^$9!#!K(B<br>
>>>> >> ><br>
>>>> >> >> $B%3%s%9%H%i%/%?$H(BgetComponent$B$OJLJ*$G$9$7!"$=$l$i$NA0$K<B9T$5$;$k$H$$$&$N(B<br>
>>>> >> >> $B$H$O$A$,$&$s$8$c$J$$$G$7$g$&$+!#(B<br>
>>>> >> > ActionCreator$B$rMxMQ$7$?>l9g!"(BAction$B$O(B request $B%9%3!<%W$G:n@.$5$l$k$H(B<br>
>>>> >> > $B%j%U%!%l%s%9$K$"$j$^$7$?$N$G!"$F$C$-$j(BgetComponent$B$,%3!<%k$5$l$?;~$K(B<br>
>>>> >> > $B%$%s%9%?%s%92=$r9T$C$F$$$k$b$N$H;W$C$F$$$^$7$?!#(B<br>
>>>> >> > $B$^$?!"(BAction$B%$%s%9%?%s%92=;~$K!"(BService$B$N%$%s%9%?%s%92=$b9T$o$l!"(B<br>
>>>> >> > $B99$K$=$NCf$G(BDAO$B$N%$%s%9%?%s%92=$,9T$o$l!"!"$HEAGE$9$k$b$N$H2r<a$7$F$$$^$7$?!#(B<br>
>>>> >> > $B!J%9%3!<%W$K$h$C$F(Bsingleton$B$G=`Hw$9$k$b$N$O!"%$%s%9%?%s%92=$5$l$J$$$H$$$&0UL#(B<br>
>>>> >> >$B!!(B $B$G!"873J$K$OJLJ*$HI=8=$5$l$F$$$k$N$G$7$?$i!"$9$_$^$;$s!#!K(B<br>
>>>> >> ><br>
>>>> >> > $B2?8N!"%3%s%9%H%i%/%?$H;d$,;W$C$?$N$+$H$$$&$H!"(B<br>
>>>> >> > $B!&(BDAO$B$rMxMQ$9$k(BAction $B!J87L)$K$O!V(BDAO$B$rMxMQ$9$k(BService$B!W$rMxMQ$9$k(BAction$B!K(B<br>
>>>> >> > $B!&(BDAO$B$rMxMQ$7$J$$(BAction<br>
>>>> >> > $B$NFs$D$G;n$7$F$_$?$H$3$m!"8e<T$N(BDAO$B$rMxMQ$7$J$$(BAction$B$G$O!"(B<br>
>>>> >> > SelectDataSourceInterceptor.invoke()$B$,<B9T$5$l$?$?$a$G$9!#(B<br>
>>>> >> > $B!J<B9T$O%V%l!<%/%]%$%s%H!u%m%0=PNO$G3NG'$7$^$7$?!#!K(B<br>
>>>> >> > $B$^$?!"A0<T$N(BDAO$B$rMxMQ$9$k(BAction$B$N>l9g$O!"(B<br>
>>>> >> > $B2<5-$N$h$&$J%m%0$,=PNO$5$l$F$$$^$7$?!#(B<br>
>>>> >> > $B$G$9$N$G!"<B:]$N%j%/%(%9%H$KBP$9$k%a%=%C%I$N<B9T$NA0$K(BDAO$B$N%$%s%9%?%s%92=$,9T$o$l!"(B<br>
>>>> >> > Dao.constructor() $B"*(B SelectDataSourceInterceptor.invoke()<br>
>>>> >> ><br>
>>>> >> > $B$N$h$&$K$J$C$F$7$^$$!"(BSelectDataSourceInterceptor.invoke()$B$NA0$K(BAppConfig$B$+$i(BDataSourceName$B$r(B<br>
>>>> >> > $B<hF@$7$h$&$H$7$F$$$k$N$G$O$J$$$+!)$H2r<a$7$?$?$a$G$9!#(B<br>
>>>> >> > $B$^$?!"%G%P%C%0<B9T$GDI$C$F$_$?8B$j$G$O!"(BAnyTableDaoImpl$B!J(Bdoma...AbstractDao$B!K$N%3%s%9%H%i%/%?$+$i(B<br>
>>>> >> > RuntimeConfig$B$r%$%s%9%?%s%92=$9$k:]$N(B<br>
>>>> >> > AssertionUtil.assertNotNull(config.getDataSourceName()); $B$K$F(B<br>
>>>> >> > $BA0=R$N$h$&$K(Bnull$B$G<hF@$5$l$k$?$a!"%(%i!<$,H/@8$7$F$$$k$h$&$G$7$?!#(B<br>
>>>> >> ><br>
>>>> >> > $B$"$H0lJb$N$h$&$J5$$,$9$k$N$G$9$,!"$I$&@_Dj$9$l$P$h$$$N$+J,$+$i$J$$<!Bh$G$9!#!#(B<br>
>>>> >> > $B8@MUB-$i$:$JItJ,$b$"$k$+$H;W$$$^$9$,!"$465<($$$?$@$1$k$H9,$$$G$9!#(B<br>
>>>> >> ><br>
>>>> >> ><br>
>>>> >> > $B!Z%m%0![(B<br>
>>>> >> > ...<br>
>>>> >> ><br>
>>>> >> > $B%/%i%9(B(foo.bar.package.action.LoginAction[login_loginAction])$B$N%3%s%]!<%M%s%HDj5A$rEPO?$7$^$9(B<br>
>>>> >> > ...<br>
>>>> >> ><br>
>>>> >> > $B%/%i%9(B(foo.bar.package.interceptor.SelectDataSourceInterceptor[selectDataSourceInterceptor])$B$N%3%s%]!<%M%s%HDj5A$rEPO?$7$^$9(B<br>
>>>> >> > ...<br>
>>>> >> ><br>
>>>> >> > $B%/%i%9(B(foo.bar.package.service.LoginService[login_loginService])$B$N%3%s%]!<%M%s%HDj5A$rEPO?$7$^$9(B<br>
>>>> >> > ...<br>
>>>> >> ><br>
>>>> >> > $B%/%i%9(B(foo.bar.package.dao.base.impl.AnyTableDaoImpl[base_anyTableDao])$B$N%3%s%]!<%M%s%HDj5A$rEPO?$7$^$9(B<br>
>>>> >> ><br>
>>>> >> > $B0J>e!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B<br>
>>>> >> ><br>
>>>> >> > 2011$BG/(B10$B7n(B10$BF|(B4:29 Toshihiro Nakamura <<a href="mailto:toshihiro.nakamura@gmail.com">toshihiro.nakamura@gmail.com</a>>:<br>
>>>> >> >><br>
>>>> >> >> $BCfB<(B(taedium)$B$G$9!#(B<br>
>>>> >> >><br>
>>>> >> >> > $B%/%i%$%"%s%H$+$i%j%/%(%9%H$,Mh$?:]!"(BAction$B$r(BgetComponent$B$K$h$C$F<hF@$9$k(B<br>
>>>> >> >> > $B$N$G$9$,!"F1$8%?%$%_%s%0$G(BService/DAO$B$b%$%s%9%?%s%92=$5$l$k$3$H$r(B<br>
>>>> >> >> > $B3NG'$7$^$7$?!#(B<br>
>>>> >> >><br>
>>>> >> >> $B!V(BgetComponent$B$K$h$C$F<hF@$9$k!W$H$"$j$^$9$,!"$3$l$O!"(B<br>
>>>> >> >> net.arnx.jsonic.web.extension.S2Container$B%/%i%9$N(BgetComponent$B%a%=%C%I(B<br>
>>>> >> >> $B$NCf$G9T$o$l$k=hM}$r;X$7$F$$$k$N$G$7$g$&$+!)(B<br>
>>>> >> >> $B%"%W%j%1!<%7%g%s$G9T$C$F$$$k=hM}$r;X$7$F$$$k$N$+(BJSONIC$B$K$h$k=hM}$r(B<br>
>>>> >> >> $B;X$7$F$$$k$N$+$o$+$j$^$;$s$G$7$?!#(B<br>
>>>> >> >><br>
>>>> >> >> SelectDataSourceInterceptor$B$O(BS2$B%3%s%F%J$KEPO?$G$-$F$$$^$9$+!)(B<br>
>>>> >> >> SMART deploy$B$r;H$C$FEPO?$9$k$N$G$"$l$P!"(B<br>
>>>> >> >> SelectDataSourceInterceptor$B$,!V%k!<%H%Q%C%1!<%8L>(B.interceptor$B!W$H$$$&(B<br>
>>>> >> >> $BL>A0$N%Q%C%1!<%8$KG[CV$5$l$F$$$k$3$H$r3NG'$7$F$/$@$5$$!#(B<br>
>>>> >> >> $B$5$i$K!"(Bcreator.dicon$B$K<!$N5-=R$,$"$k$3$H$r3NG'$7$F$/$@$5$$!#(B<br>
>>>> >> >> <component<br>
>>>> >> >> class="org.seasar.framework.container.creator.InterceptorCreator"/><br>
>>>> >> >><br>
>>>> >> >> creator.dicon$B$G0J2<$N5-=R$O$5$l$F$$$^$9$+!)(B<br>
>>>> >> >> <component<br>
>>>> >> >> class="org.seasar.framework.container.creator.ActionCreator"/><br>
>>>> >> >> $B$3$N5-=R$,$J$$$H!"(Bcustomizer.dicon$B$N(BactionCustomizer$B$N@_Dj$,H?1G$5$l$^$;$s!#(B<br>
>>>> >> >> $B!J(BAction$B$r(BSMART deploy$B$GEPO?$7$F$$$k$N$G$"$l$P5-=R$5$l$F$$$k$O$:$G$9$,!K(B<br>
>>>> >> >><br>
>>>> >> >> > $B$7$+$7!"(BInterceptor$B$,<B9T$5$l$:!"(BDAO$B$K$F(BConfig$B$+$i(BDatasourceName$B$r<hF@(B<br>
>>>> >> >> > $B$G$-$J$$$H$$$&%(%i!<$,H/@8$7$F$7$^$$$^$7$?!#(B<br>
>>>> >> >><br>
>>>> >> >> $BG0$N$?$a$K!"(BInterceptor$B$O<B9T$5$l$F$$$k$1$l$I$b(B<br>
>>>> >> >> DatasourceName$B$K(Bnull$B$,@_Dj$5$l$k$3$H$G%(%i!<$,H/@8$7$F$$$k!"(B<br>
>>>> >> >> $B$H$$$&2DG=@-$O$J$$$+3NG'$7$F$_$k$H$h$$$+$b$7$l$^$;$s!#(B<br>
>>>> >> >><br>
>>>> >> >> > Interceptor$B$O!"%3%s%9%H%i%/%?!J(BgetComponent$B!K$NA0$K<B9T$5$;$k$3$H$,(B<br>
>>>> >> >> > $B$G$-$J$$$N$G$7$g$&$+!)(B<br>
>>>> >> >><br>
>>>> >> >> Interceptor$B$r;H$&$HFCDj$N%a%=%C%I8F$S=P$7$NA08e$GG$0U$N=hM}$r<B9T$G$-$^$9!#(B<br>
>>>> >> >> $B:#2s$d$j$?$$$3$H$O$^$5$K$=$l$@$H;W$$$^$9!J(BAction$B$N%a%=%C%I$NA08e$G=hM}$r$9$k!K!#(B<br>
>>>> >> >> $B%3%s%9%H%i%/%?$H(BgetComponent$B$OJLJ*$G$9$7!"$=$l$i$NA0$K<B9T$5$;$k$H$$$&$N(B<br>
>>>> >> >> $B$H$O$A$,$&$s$8$c$J$$$G$7$g$&$+!#(B<br>
>>>> >> >><br>
>>>> >> >> $BMW7o$KBP$7$F!"8=:_$d$m$&$H$7$F$$$k$3$H$NJ}8~@-$O$^$A$,$C$F$$$J$$$H;W$$$^$9!#(B<br>
>>>> >> >> $B2?$i$+$NM}M3$G!"(BInterceptor$B$,(BAction$B$KE,MQ$5$l$F$$$J$$$h$&$G$9$,(B<br>
>>>> >> >> $BE,@Z$K@_Dj$9$l$P2r7h$G$-$k$H;W$$$^$9!#(B<br>
>>>> >> >><br>
>>>> >> >> 2011$BG/(B10$B7n(B9$BF|(B22:00 <<a href="mailto:luck62@gmail.com">luck62@gmail.com</a>>:<br>
>>>> >> >> > $B$O$8$a$^$7$F!#(B<br>
>>>> >> >> > okuda$B$H?=$7$^$9!#(B<br>
>>>> >> >> ><br>
>>>> >> >> > $B8=:_!"(BSeasar2+Doma(+JSONIC REST Servlet)$B$K$F!"3+H/$r9T$J$C$F$*$j$^$9!#(B<br>
>>>> >> >> > $B%G!<%?9=B$$,F1$8$G%9%-!<%^$,0[$J$k(BDB$B$XF0E*$K@Z$jBX$($F%"%/%;%9$7$?$$$N$G(B<br>
>>>> >> >> > $B$9$,!">e<j$/F0:n$7$J$/m5$$$F$*$j$^$9!#(B<br>
>>>> >> >> > $BBgJQ$*<j?t$G$9$,!"$465<($$$?$@$1$k$H9,$$$G$9!#(B<br>
>>>> >> >> ><br>
>>>> >> >> > $B!Z4D6-![(B<br>
>>>> >> >> > $B!&(BJDK 1.6u27<br>
>>>> >> >> > $B!&(BTomacat 6.0.29<br>
>>>> >> >> > $B!&(BSeasar2 2.4.44<br>
>>>> >> >> > $B!&(BDoma 1.18.0<br>
>>>> >> >> > $B!&(BJSONIC 1.2.7<br>
>>>> >> >> > $B!&(BJDBC4 Postgresql Driver, Version 9.1-901<br>
>>>> >> >> ><br>
>>>> >> >> > $B!ZMW7o![(B<br>
>>>> >> >> > $B!&%j%/%(%9%H(BURI$B$K$h$C$F!"@\B3$9$k%9%-!<%^$rF0E*$KJQ99$9$k(B<br>
>>>> >> >> > $B!&(BDI$B$r9T$&:]$O(BEJB3$B=`5r$G9T$&(B<br>
>>>> >> >> ><br>
>>>> >> >> > $B!Z;n$7$?J}K!![(B<br>
>>>> >> >> > $B!&(BDoma JPetStore$B$r;29M$K!"(Bdemo.config$B%Q%C%1!<%8$N$b$N$r$=$N$^$^N.MQ(B<br>
>>>> >> >> ><br>
>>>> >> >> ><br>
>>>> >> >> > (AppConfig,CommonsJdbcLogger,S2RequiresNewController,SqlFileRepositoryProxy)<br>
>>>> >> >> > DAO$B$K$O!"(B@Dao(config = AppConfig.class)$B%"%N%F!<%7%g%s$rIUM?$7$F$$$^$9!#(B<br>
>>>> >> >> > $B!&!VF1$8<oN`$N%G!<%?%=!<%9$rF0E*$K@Z$jBX$($k!W(B<br>
>>>> >> >> ><br>
>>>> >> >> > <a href="http://s2container.seasar.org/2.4/ja/jdbc.html#DataSourceDynamicSwiching" target="_blank">http://s2container.seasar.org/2.4/ja/jdbc.html#DataSourceDynamicSwiching</a><br>
>>>> >> >> > $B$r;29M$K!"2<5-!Z:n@.%=!<%9![$N$h$&$K(Bdicon$B$*$h$S(BInterceptor$B$r:n@.(B<br>
>>>> >> >> ><br>
>>>> >> >> > $B!Z<ALd![(B<br>
>>>> >> >> > $B#1!%(B<br>
>>>> >> >> > Interceptor$B"*(BAction$B"*(BService$B"*(BDAO$B$H(BDI$B$rMQ$$$F%"%/%;%9$7$F$$$/$3$H$r(B<br>
>>>> >> >> > $BA[Dj$7$F$$$^$9!#(B<br>
>>>> >> >> > $B%/%i%$%"%s%H$+$i%j%/%(%9%H$,Mh$?:]!"(BAction$B$r(BgetComponent$B$K$h$C$F<hF@$9$k(B<br>
>>>> >> >> > $B$N$G$9$,!"F1$8%?%$%_%s%0$G(BService/DAO$B$b%$%s%9%?%s%92=$5$l$k$3$H$r(B<br>
>>>> >> >> > $B3NG'$7$^$7$?!#(B<br>
>>>> >> >> > $B$7$+$7!"(BInterceptor$B$,<B9T$5$l$:!"(BDAO$B$K$F(BConfig$B$+$i(BDatasourceName$B$r<hF@(B<br>
>>>> >> >> > $B$G$-$J$$$H$$$&%(%i!<$,H/@8$7$F$7$^$$$^$7$?!#(B<br>
>>>> >> >> > Interceptor$B$O!"%3%s%9%H%i%/%?!J(BgetComponent$B!K$NA0$K<B9T$5$;$k$3$H$,(B<br>
>>>> >> >> > $B$G$-$J$$$N$G$7$g$&$+!)(B<br>
>>>> >> >> ><br>
>>>> >> >> > $B#2!%(B<br>
>>>> >> >> > $B2>$K$G$-$J$$>l9g!"$I$N$h$&$J%"%W%m!<%A$r<h$k$3$H$,9%$^$7$$$N$G$7$g$&$+!)(B<br>
>>>> >> >> ><br>
>>>> >> >> ><br>
>>>> >> >> > $B!Z:n@.%=!<%9![(B<br>
>>>> >> >> > [user1-jdbc.dicon $B$*$h$S(B user2-jdbc.dicon]<br>
>>>> >> >> > $B!J(Buser2-jdbc.dicon$B$O(Buser2DataSource$B$H$7$F(BDataSourceImpl$B$rDj5A$7!"(B<br>
>>>> >> >> >$B!!(B $B8e$O!"2<5-(Buser1-jdbc.dicon$B$HF1$8!K(B<br>
>>>> >> >> > <components namespace="jdbc"><br>
>>>> >> >> > <include path="jta.dicon"/><br>
>>>> >> >> > <include path="jdbc-extension.dicon"/><br>
>>>> >> >> ><br>
>>>> >> >> > <component name="user1DataSource"<br>
>>>> >> >> > class="org.seasar.extension.dbcp.impl.DataSourceImpl"/><br>
>>>> >> >> > <component<br>
>>>> >> >> > class="org.seasar.extension.jdbc.impl.BasicResultSetFactory"/><br>
>>>> >> >> > <component<br>
>>>> >> >> > class="org.seasar.extension.jdbc.impl.ConfigurableStatementFactory"><br>
>>>> >> >> > <arg><br>
>>>> >> >> > <component<br>
>>>> >> >> > class="org.seasar.extension.jdbc.impl.BasicStatementFactory"/><br>
>>>> >> >> > </arg><br>
>>>> >> >> > <property name="fetchSize">100</property><br>
>>>> >> >> > </component><br>
>>>> >> >> ><br>
>>>> >> >> > <!-- for PostgreSQL --><br>
>>>> >> >> > <component name="xaDataSource"<br>
>>>> >> >> > class="org.seasar.extension.dbcp.impl.XADataSourceImpl"><br>
>>>> >> >> > <property<br>
>>>> >> >> > name="driverClassName">"org.postgresql.Driver"</property><br>
>>>> >> >> > <property name="URL"><br>
>>>> >> >> > "jdbc:postgresql://localhost/TEST"<br>
>>>> >> >> > </property><br>
>>>> >> >> > <property name="user">"user1"</property><br>
>>>> >> >> > <property name="password">"xxxx"</property><br>
>>>> >> >> > </component><br>
>>>> >> >> > <component name="connectionPool"<br>
>>>> >> >> > class="org.seasar.extension.dbcp.impl.ConnectionPoolImpl"><br>
>>>> >> >> > <property name="timeout">600</property><br>
>>>> >> >> > <property name="maxPoolSize">10</property><br>
>>>> >> >> > <property name="allowLocalTx">true</property><br>
>>>> >> >> > <destroyMethod name="close"/><br>
>>>> >> >> > </component><br>
>>>> >> >> > </components><br>
>>>> >> >> ><br>
>>>> >> >> > [jdbc.dicon]<br>
>>>> >> >> > <components namespace="jdbc"><br>
>>>> >> >> > <include path="user1-jdbc.dicon"/><br>
>>>> >> >> > <include path="user2-jdbc.dicon"/><br>
>>>> >> >> ><br>
>>>> >> >> > <component name="dataSource"<br>
>>>> >> >> ><br>
>>>> >> >> > class="org.seasar.extension.datasource.impl.SelectableDataSourceProxy"/><br>
>>>> >> >> > <component name="dataSourceFactory"<br>
>>>> >> >> > class="org.seasar.extension.datasource.impl.DataSourceFactoryImpl"/><br>
>>>> >> >> > </components><br>
>>>> >> >> ><br>
>>>> >> >> > [SelectDataSourceInterceptor]<br>
>>>> >> >> > public class SelectDataSourceInterceptor implements MethodInterceptor<br>
>>>> >> >> > {<br>
>>>> >> >> > @Resource<br>
>>>> >> >> > public DataSourceFactory dataSourceFactory;<br>
>>>> >> >> > @Resource<br>
>>>> >> >> > private HttpServletRequest request;<br>
>>>> >> >> ><br>
>>>> >> >> > @Override<br>
>>>> >> >> > public Object invoke(MethodInvocation invocation) throws Throwable<br>
>>>> >> >> > {<br>
>>>> >> >> > String currentName =<br>
>>>> >> >> > dataSourceFactory.getSelectableDataSourceName();<br>
>>>> >> >> > try {<br>
>>>> >> >> > String dataSourceName = getDataSourceName();<br>
>>>> >> >> ><br>
>>>> >> >> > dataSourceFactory.setSelectableDataSourceName(dataSourceName);<br>
>>>> >> >> > return invocation.proceed();<br>
>>>> >> >> > } finally {<br>
>>>> >> >> ><br>
>>>> >> >> > dataSourceFactory.setSelectableDataSourceName(currentName);<br>
>>>> >> >> > }<br>
>>>> >> >> > }<br>
>>>> >> >> ><br>
>>>> >> >> > public String getDataSourceName() {<br>
>>>> >> >> > // request $B$+$i(BURI$B$r<hF@$7!"BP>](BDataSource$BL>(B("user1" or "user2")<br>
>>>> >> >> > // $B$r7hDj(B<br>
>>>> >> >> > }<br>
>>>> >> >> > }<br>
>>>> >> >> ><br>
>>>> >> >> > [customizer.dicon$BH4?h(B]<br>
>>>> >> >> > <component name="actionCustomizer"<br>
>>>> >> >> > class="org.seasar.framework.container.customizer.CustomizerChain"><br>
>>>> >> >> > <initMethod name="addAspectCustomizer"><br>
>>>> >> >> > <arg>"selectDataSourceInterceptor"</arg><br>
>>>> >> >> > </initMethod><br>
>>>> >> >> > ....<br>
>>>> >> >> > </component><br>
>>>> >> >> ><br>
>>>> >> >> ><br>
>>>> >> >> > $B0J>e!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B<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>
>>>> >> >> ><br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >><br>
>>>> >> >> --<br>
>>>> >> >> Toshihiro Nakamura<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>
>>>> >> ><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>
>>>> >> ><br>
>>>> >> ><br>
>>>> >><br>
>>>> >><br>
>>>> >><br>
>>>> >> --<br>
>>>> >> Toshihiro Nakamura<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>
>>>> ><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>
>>>> ><br>
>>>> ><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Toshihiro Nakamura<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>
>>> _______________________________________________<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>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Toshihiro Nakamura<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>
>><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>
><br>
<br>
<br>
<br>
--<br>
Toshihiro Nakamura<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>