今回はTeedaの設定まわり。
前回のS2Containerのコンポーネント登録を直しただけではダメです。
JBOSS自体にもJSFの機能がありますのでTeedaと競合してしまいます。
そこでWeb.xmlでJBOSSのJSFは使わないよ!と宣言してあげる必要がある。
以下を追記して下さい。
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
あと、HotDeoloyの場合、JBOSSだと
Seasarの初期化処理内でセッションのClassCastExceptionが発生してしまう。
ライブラリの奥地に手を入れるのはちょっとリスクだったので
開発時はTomcatを利用するようにしました。
その為、s2container.diconで
diconファイルを無理やり環境設定に応じて切り替えています。
<components>
<include condition="#ENV == 'ut'" path="warmdeploy.dicon"/>
<include condition="#ENV == 'ct' and !@System@getProperties().containsKey('jboss.host.name')" path="hotdeploy.dicon"/>
<include condition="#ENV != 'ut' and #ENV != 'ct' or @System@getProperties().containsKey('jboss.host.name')" path="cooldeploy.dicon"/>
<include condition="@System@getProperties().containsKey('jboss.host.name')" path="jbossVfsFactory.dicon"/>
<component class="org.seasar.framework.container.factory.SimplePathResolver">
<initMethod name="addRealPath">
<arg>"jdbc.diconn"</arg>
<arg>@System@getProperties().containsKey("jboss.host.name") ? "jdbc-jndi.dicon" : "jdbc.dicon"</arg>
</initMethod>
<initMethod name="addRealPath">
<arg>"jta.dicon"</arg>
<arg>@System@getProperties().containsKey("jboss.host.name") ? "jta-jboss42.dicon" : "jta.dicon"</arg>
</initMethod>
</component>
</components>
これでとりあえずはSeasar2&Teedaが動くようになります。
次回は一番ハマったログ出力設定。