java – 通过JDBC处理不同数据库方言的模式

我正在创建一个必须通过JDBC与不同数据库(Oracle,MSsql,MySQL ……)一起工作的应用程序.我必须通过JDBC工作,因为我的应用程序调用这些数据库中的存储过程.

构建此类应用程序的最佳方法是什么?这有什么框架吗?

重要:解决方案必须很好地处理Spring Framework.

我正在考虑Hibernate,因为它是强大的ORM解决方案,它具有对存储过程的构建支持http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#sp_query

请告诉我你目前的选择.

最好的祝福,
马克斯

解决方法:

Hibernate通常是标准选项(也是我选择的选项).我更喜欢使用JPA而不是Hibernate,但如果您需要存储过程,那么这不是一个选项.但关于iBatis的评论

虽然我自己没有iBatis的经验,但似乎iBatis的Spring支持并不差:

Spring Reference,第13.6:iBATIS SQL Maps章:

The iBATIS support in the Spring
Framework much resembles the JDBC
support in that it supports the same
template style programming, and as
with JDBC and other ORM technologies,
the iBATIS support works with Spring’s
exception hierarchy and lets you enjoy
Spring’s IoC features.

Transaction management can be handled
through Spring’s standard facilities.
No special transaction strategies are
necessary for iBATIS, because no
special transactional resource
involved other than a JDBC Connection.
Hence, Spring’s standard JDBC
DataSourceTransactionManager or
JtaTransactionManager are perfectly
sufficient.

相关文章

连接数据库的方式:第一种方式:ODBC:开放数据库连接是微软...
JDBCRequest 使用VariableNamesmysql:数据库连接池对象var...
 1.JDBCDBC(JavaDataBaseConnectivity):Java数据库连接技术...
1.需要jar包的支持:java.sqljavax.sqlmysql-conneter-java....
1.简介Activiti是一个业务流程管理(BPM)框架,它是覆盖了业务...
1.JDBC体系系统一组规范:接口JDBC接口(API)包括两个层次:...