I am porting a legacy application to hibernate 5 and I'm having trouble with the login phase. Here's how it works (I can't change that):
- user initially connects to oracle DB with a generic login/password (same for all users)
- then user runs a "login" stored procedure and enters a unique password as parameter
- the procedure returns a specific Oracle DB username/password to the user
- user disconnects from DB and reconnects using the credentials given by the stored procedure
I currently create one instance of sessionFactory per connected user, but I'm worried that this will impact performance. Is there a better way to do this?
Thanks