I have two databases. One of Oracle 10g. Another one from Mysql. I configured my web application using Nhibernate for Oracle, and now I need to use the MySQL database. So, how can I configure hibernate.cfg.xml so that I can use both databases in the same application?
My current hibernate.cfg.xml:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
<property name="connection.connection_string">Data Source=xe;Persist Security Info=True;User ID=hr;Password=hr;Unicode=True</property>
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
<mapping assembly="DataTransfer" />
</session-factory>
</hibernate-configuration>
Flint source
share