How to connect to multiple databases in Hibernate

后端 未结 6 796
长发绾君心
长发绾君心 2020-11-27 16:37

I am new bee to Hibernate and trying out things. One thing that seems to amuse all is how to connect to different databases? I have two questions here:

  1. If in t
6条回答
  •  攒了一身酷
    2020-11-27 17:10

    Ideally you should move to Distributed transaction type of system[using Java Transaction Analyzer org.hibernate.transaction.JTATransactionFactory] in this case. If you are running in JBoss App Server, you can do it by using "Distributed Transaction Managers". You can learn more about it here.

提交回复
热议问题