Tapestry Engine Service[Tapestry]
(2006-03-28 17:16:21) by がく


< ページ移動: 1 2 >

Tapestry4になって、Engine Serviceの記述方法ががらっと変わりました。

Tapestry3では、application specificationに記述をしましたが、Tapestry4では、HiveMindに設定をします。 以下の設定では、dataSqueezerや、Engine Service内でVisitオブジェクトを使用したいため、サービスを追加しています。

hivemodule.xml

<contribution configuration-id="tapestry.state.ApplicationObjects">
	<state-object name="AppVisit" scope="session">
		<create-instance class="jp.co.taosoftware.tagraw.tape.AppVisit" />
	</state-object>
</contribution>

  <contribution configuration-id="tapestry.services.ApplicationServices">
    <service name="SessionService" object="service:SessionService"/>
  </contribution>
 	
	<service-point id="SessionService" interface="org.apache.tapestry.engine.IEngineService">
	  <invoke-factory>
	    <construct class="jp.co.taosoftware.tagraw.service.SessionService">
	      <set-object property="exceptionReporter" value="infrastructure:requestExceptionReporter"/>
	      <set-object property="response" value="infrastructure:response"/>
	      <set-object property="linkFactory" value="infrastructure:linkFactory"/>
	      <set-object property="dataSqueezer" value="infrastructure:dataSqueezer"/>
    	  <set-service property="appStateMgr" service-id="tapestry.state.ApplicationStateManager"/> 
	    </construct>
	  </invoke-factory>
	</service-point>

< ページ移動: 1 2 >


TOPへ戻る