Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.2
I would like to know how to switch dynamically from one DB schema to another.
I do not know the number of schemas i could have to manage as far as some additional schemas could be added dynamically while my application is still up and running.
I found a way which is based on the fully specific Oracle statement:
alter session set current_schema="my_user"
executed after each getCurrentSession()
but this solution has two main drawbacks:
-> it is tied to Oracle, on DB2 for example it should be something another statement...
-> this statement is executed to often; each time getCurrentSession() is called
So is there any other way to manage that more properly?
Thanks and regards
Samuel