连接方式与普通的数据库不一样.connection.url 中使用了LOAD-BALANCE = yes 要不然会报错
<hibernate-configuration>
<session-factory>
<property name="connection.username">username</property>
<property name="connection.url">
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 11.172.0.71)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 11.172.0.70)(PORT = 1521))(LOAD_BALANCE = yes)(FAILOVER = yes)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)(FAILOVER_MODE=(TYPE = SELECT)(METHOD = BASIC)(RETIRES = 20)(DELAY = 15))))
</property>
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.password">pwd</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<mapping resource="Add valid path"/>
</session-factory>
</hibernate-configuration>