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 8401205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:44:44+00:00 2026-06-09T21:44:44+00:00

My application receives frequent remote events through a socket connection, each starting a new

  • 0

My application receives frequent remote events through a socket connection, each starting a new thread, and the subsequent actions often triggers the same object graph to be saved each time, with a single locked static session. But while that save executes, new updates are sometimes received which will add new elements to the same object graph. Which I believe is the reason for the exception:

TransientObjectException
object references an unsaved transient instance - 
save the transient instance before flushing.  

If that’s the reason, it’s understandable. But how I prevent this exception? If I let transaction Rollback, subsequent exceptions occur like StaleStateObject, then NonUniqueObjectException.

So how can this be handled or prevented?

  • 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-09T21:44:46+00:00Added an answer on June 9, 2026 at 9:44 pm

    Likely cause if this exception was that the entity collection was being modified while iterating over the collection during SaveOrUpdate (in different thread). So I believe locks must be placed to avoid these concurrent actions.

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

Sidebar

Related Questions

I'm writing a Comet application that has to keep track of each open connection
My Java application receives data through UDP. It uses the data for an online
On Windows only the focused application receives display power events via the WM_SYSCOMMAND message
Our application receives log files via email and so the lines are often broken
On Windows-7 my application receives continuous repaint events from windows. I am using wxWidgets.
My application receives email from users. A response from gmail, for example, comes in
I am sending and receiving data using fsockopen and fwrite. My application receives the
I have an application that receives a number of datums that characterize 3 dimensional
I`m developing an application which receives data from my GPS device like coordinates, speed
I am developing an application that receives a stream of audio samples from a

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.