gsegelk wrote:
I think what you are saying will solve my problem, but I don't know how to get access to the Connection object (for some reason, I feel really dumb saying that...it will probably hit me like a ton of bricks once I see what's going on!)
I currently go through the following steps before getting a Session object via factory.openSession():
1. Create a Configuration object
2. Use the 'setProperty' method on the Configuration object for db IP, port, user, password
3. Use the 'addResource' method on the Configuration object to set the mapping file
4. Create a SessionFactory using the 'buildSessionFactory' method on the Connection object
5. Create the session using the 'openSession' method on the SessionFactory object
6. Interact with the Session object (.save(), etc)
Is there a different way I should be initiating the connection manually? Thank you for your quick response and it seems like the issue is close to being solved!
after creating sessionFactory in step 5 do
Connection connection = mySessionFactory.openSession.connection();
// test connection