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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:49:53+00:00 2026-06-17T13:49:53+00:00

I’m trying to make the connection to hibernate change dynamically based on the application

  • 0

I’m trying to make the connection to hibernate change dynamically based on the application user logged in.
I.E. Every application user will have his own oracle schema. To do so, I changed the values of dataSourceUnproxied.username and dataSourceUnproxied.password dynamically from the code depending on the logged on user, then I closed the connection and got the connection again with the new settings. It worked, but the problem is if two users are logged in to my application at the same time, the connection will be set to the connection of the last logged in user, and both users will use the same connection again. It seems that these variables are application scoped variables, which set the value for all the users.

Is there a way to make these values different based on the user session?

  • 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-17T13:49:55+00:00Added an answer on June 17, 2026 at 1:49 pm

    I think that your question is similar to this one
    http://grails.1312388.n4.nabble.com/unique-dataSource-per-HttpSession-td1343203.html

    Basically you could come up with your own datasource implementation.

    I believe that it may help you solve your issue with minor dark corners.

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

Sidebar

Related Questions

I am trying to make a simple example of Hibernate. I have two entities:
Connecting to database dynamically jsp Hi, I'm trying to make connection to database dynamically.
i am trying to make a 3rd party simple standalone/swing application that uses hibernate
I have a question or problem. I am trying to make a p2p connection
Trying to make a django test application which will use stored oracle's procedures to
I am trying to make connection using NSURLConnection with my server. I have implemented
I'm trying to make a connection to a SQL Server Express DB on localhost,
I'm trying make a login window where a user is prompted to enter their
Trying to make the infamous checkall checkbox for dynamically created rows from a MySQL
Trying to make an xna game, where the user needs to tap to stop

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.