Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8757153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:14:11+00:00 2026-06-13T14:14:11+00:00

I have replaced the HQL queries with that of SQL to shift back to

  • 0

I have replaced the HQL queries with that of SQL to shift back to plain JDBC from hibernate for many reasons. Now, I am not able to understand what SessionFactory in hibernate means and what should I replace it with in plain JDBC?Also, sessions in hibernate has a lot of configuration stuff involved.How do I deal with all these in plain JDBC?Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:14:12+00:00Added an answer on June 13, 2026 at 2:14 pm

    I’ll try and clear up your misunderstanding of a session factory and hopefully point you in the right direction.

    The purpose of a session factory in JDBC is to handle connections to and from your database. When someone goes to your site and clicks a link that requires jdbc they will send out a request for a connection and the session factory will see that request. Then the session factory will either grab a connection from the pool or establish a new connection. This all happens in a matter of milliseconds.

    Think of your database connections like cars on a lot and the session factory is the manager with the keys. When a user comes to your site and needs a connection they ask for 1 car. Then the manager will either give them a car out front that is sitting there started up and ready to go (connection in the pool) or will go out back and look for a new connection start it up and hand that car out (takes longer then getting a pool connection).

    Then when the user is finished with the car (the connection) they give it back to the manager and he will decide if he should keep it out front and idle (in the pool) or bring it out back and turn it off. You can control where the session factory will look for the connections, and where he will place connections after they have been used by specifying attributes about your datasource (your database).

    To gain a further understanding of the session factory you must first gain a further understanding of pooling within jdbc. So I would highly advice doing some google searches in that area to help clear some things up! Hope this points you in the right direction!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please help me to prevent my data from SQL injection. I have replaced '
i have a scene1 that is replaced by scene2 [[ccdirector shareddirector]replacescene:scene2]//scene2 replacement after doing
I have some JPG files that need to be replaced at runtime with a
in order to avoid an include circle, I have replaced an #include that was
I have a query in SQL Server that I am trying to convert to
I have the following HQL( The Hibernate Query Language ) query (which is executed
I have replaced primefaces-3.2 with primefaces-3.4 RC1. After that, if I open any page,
I have replaced a table containing four tables (in a grid) with a div-table
I can't find Job in 2.0. Have been replaced by Promise? Promise seems a
I have a div with is replaced upon certain user actions. These actions are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.