如何利用"c3p0"配置Oracle和MySQL连接
1个回答
展开全部
一、连接Oracle数据库 oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@192.168.0.1:1521:orcl username password 10 20 10 org.hibernate.dialect.OracleDialect false true true true net.sf.ehcache.hibernate.EhCacheProvider org.hibernate.connection.C3P0ConnectionProvider true 1, false 0, yes 'Y', no 'N' true true true org.hibernate.hql.ast.ASTQueryTranslatorFactory xxx/xx/xx.hbm.xml xxx/xx/xx.hbm.xml 二.连接mysql数据库 com.mysql.jdbc.Driver jdbc:mysql://192.168.0.1/databasename? useUnicode=true& characterEncoding=utf-8&autoReconnect=true username password 10 20 10 org.hibernate.dialect.MySQLDialect false true true true net.sf.ehcache.hibernate.EhCacheProvider org.hibernate.connection.C3P0ConnectionProvider true 1, false 0, yes 'Y', no 'N' true true true org.hibernate.hql.ast.ASTQueryTranslatorFactory xxx/xx/xx.hbm.xml xxx/xx/xx.hbm.xml (责任编辑:卢兆林)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询