-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to retrieve org.hibernate.SessionFactory?
PostPosted: Mon Sep 15, 2008 11:51 pm 
Newbie

Joined: Mon Sep 08, 2008 3:01 am
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.