0

我们正在使用 Spring、tomcat、hibernate 和 oracle 11.0.2。有没有一种方法可以在不重新启动应用程序层的情况下在 2 个 oracle 实例(ins1 和 ins2)之间切换?hibernate 中是否有任何设置允许我们动态地执行此操作?

4

1 回答 1

0

Spring 的 HotSwappableTargetSource 允许在运行时更改 bean。也许你可以根据自己的需要来使用它。仍然会有限制(例如两个数据库中的相同数据库模式,...)

http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/aop/target/HotSwappableTargetSource.html

于 2013-04-09T17:21:49.187 回答