데이터베이스2012. 4. 9. 12:34

<bean id="com.ex.MemberDao" class="com.ex.MemberDaoImpl">
     <property name="dataSource" ref="memberDatabaseDataSource"/>
</bean>

<bean id="com.ex.StoreDao" class="com.ex.StoreDaoImpl">
     <property name="dataSource" ref="storeDatabaseDataSource"/>
</bean>

<tx:annotation-driven transaction-manager="memberTransactionManager"/>
<tx:annotation-driven transaction-manager="storeTransactionManager"/>

<bean id="memberTransactionManager"     class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
     <property name="dataSource"><ref bean="memberDatabaseDataSource"/></property>
</bean>

<bean id="storeTransactionManager"     class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
     <property name="dataSource"><ref bean="storeDatabaseDataSource"/></property>
</bean>

Posted by 미랭군