I'm new with spring/hibernate and I'm starting a new project using those 2 great technologies.
My project is a bit complicated as it uses 2 (actually 3) database connections...
1 - Read only - localhost
2 - Update - Company's server in House
3 - Pending Queries System - this is an extra db to make sure we never loose info between 1 and 2. So if the company's internet is down we don't have any loss of data as they are always "cached" in this numero 3 db.
Anyway I m not here to talk about my architecture that I won't really be able to change, but to know HOW to do it with Spring/Hibernate.
I already create severals SessionFactories, DataSources, and transactionManagers.
apparently i have to use aop but i m not really sure if it is the best way
This is my config for aop
expression="execution(* com.companyname.dao.*Impl.*(..))" />
<aop:pointcut id="noTxServiceOperation" expression="execution(*
<!-- ADVICE -->
<tx:advice id="defaultTxAdvice" transaction-manager="txManager">
<tx:method name="get*" read-only="true" />
<tx:method name="*" />
<tx:advice id="noTxAdvice" transaction-manager="noTxManager">
<tx:method name="*" propagation="NEVER" />
Could anyone just help me first to make a project with 2 databases Slave/Master like?
Or does anyone has any ideas how to do my 3 db project?