Announcement Announcement Module
Collapse
No announcement yet.
Dynamic session Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic session

    Hi All,

    I'm using spring to develop a web application using Oracle as back-end.
    Oracle provides a elegant way to audit all operations made on the database and more (user permissions, CPU usage limitation, ...)

    So to take advantage of these capabilities, when an application's user is created, I create a database's user account and I assign it for him.

    This involves the creation of dynamic data-source depending on the connected user.
    I would like to know what's the best to do that and how to manage a connection pool.

    More explicitly, let's say that I've 5 users.
    So after the users are logged in, they must use a different data-source. This involves changing the way SessionFactory is returning session.
    So SessionFactoryBean must load the right datasource parameters before creating the session.

    I used UserCredentialsDataSourceAdapter to change the datasource depending on the user's information.

    Now, the problem is to change the username and password before each call to dao layer. How can I do this without writing the same routine in all dao classes.

    Thanks,
    Ramzi
    Last edited by ramcis; Oct 29th, 2009, 11:12 AM.

  • #2
    No help

    Any help please !!!

    Comment

    Working...
    X