I developing a application of reporting tool.
I have to connect multiple remote side database with their credentials and fetching the database value.
How can I do this?
This is my hibernate configuration file
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.connection.SetBigStringTryClob">true</property>
<property name="hibernate.jdbc.batch_size">0</property>
</session-factory>
</hibernate-configuration>
For connecting with multiple databases writing one session factory is not good. so how many databases if you want to connect writing that many configuration files is best way. For example assume, i want to connect oracle, mysql database. so what i can do is i will write one configuration file for oracle i.e oracle-configuration.cfg.xml and for mysql i will create mysql-configuration.cfg.xml
Now your question to connect with remote db, you need to give the remote address with the credentials.
for example, my remote database address is 192.168.0.14. now i want to connect oracle database now the connection properties like
oracle-configuration.cfg.xml