i know jta can support multiple datasource. but the performance is bad, and also need datasource to support it.
in my old project, we just use pure jdbc to handle multiple datasource(in fact , they are two oracle database)
the old code style is
in this old code style, only fail happen between (1) and (2) will cause the data not consistent. but since the two data base all in our local area network. so it few happen. In fact. we think it is ok. no need JTA.
but now if we use Spring jdbc declare transaction. we find the framework can not reach the goal as the old code style.
In fact, the Spring Jdbc 's simulant code style is below
...... --------use conn1 do someting
.....................use conn2 do someting
clean up conn2
........----------- still use conn1 do thing
to compare the two code style, you will find the Spring jdbc framework will more easy cause the data not consistent. how to make Spring generate code like the first code style.
we would not want to use jca,since the two database both in our company.
we think the code style(1) is enough. but we want to use Spring jdbc framework.
who can help me.
my email is :email@example.com. if you think the mail is better communication fashion, you can send mail to me