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

  • Home
  • SEARCH
  • 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 3492428
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:45:26+00:00 2026-05-18T11:45:26+00:00

Hi I am working on hibernate and need some information about the stateless session.

  • 0

Hi
I am working on hibernate and need some information about the stateless session. tried to search on google but didnt get that much information. so please need any link or pdf’s about stateless session on how, why and when to use it. what are the pros and cons of using it.
thanks

  • 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-05-18T11:45:27+00:00Added an answer on May 18, 2026 at 11:45 am

    There isn’t much to say about Stateless Sessions, anyway. Basically, it serves only one purpose: to not cache anything at all.

    In regular sessions, Hibernate maintains a “session-level cache”, which is cleared when you close your session, for instance. In some other cases, you can plug a caching mechanism to act as a “second level cache”, which is complimentary to this “session-level cache” and can survive even after a session is closed.

    However, this can be a problem if you are in a batch-operation mode. For instance, it doesn’t makes sense to keep any entity in the cache (session-level) if you are just reading an input file and inserting entities in the database. You know you won’t need that entity anymore. So, that’s where you use the Stateless session.

    There’s no change in the API, just changes in the implementation.

    Take a look at this link. This is all you need to know about Stateless Sessions:
    http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/batch.html#batch-statelesssession

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

Sidebar

Related Questions

I am new to NHibernate and need some information regarding the internal working of
I'm working on a project where we use Hibernate and JBoss 5.1. We need
So I'm using hibernate and working with an application that manages time. What is
I'm currently working on a project that makes use of Seam/Hibernate (JPA) on MySQL.
I am working in a project that's work with N Hibernate. Due to performance
I'm working on an hibernate Spring Mysql app, sometimes when i make a gethibernateTemplate()get(class,id)
I'm working with Spring/Hibernate (using NetBeans 6.9.1). I need to import Excel sheet into
I need to replicate the following working HQL query using criteria API. session.CreateQuery( select
Definitely, I'm talking about working with MVC pattern. Definitely, Hibernate make our life easier
The project that I'm working on has the following setup: JPA 2.0 (Hibernate 4

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.