Hi all,
Please help me to overcome the following scenario:
I have a stand-alone application. This application allow user input the information to establish connection to database similar with the information below:
Code:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="PU">
<properties>
<property name="connection.driver_class" value="net.sourceforge.jtds.jdbc.Driver" />
<property name="connection.url" value="jdbc:jtds:sqlserver://demo:1433/mytest" />
<property name="connection.username" value="tester" />
<property name="connection.password" value="tester" />
<property name="dialect" value="org.hibernate.dialect.SQLServerDialect" />
</properties>
</persistence-unit>
</persistence>
From the input information, I want to get org.hibernate.SessionFactory so that I can open new session.
Please tell me if there is some way to do that. If YES, please show me how.
Many thanks