msjkus wrote:
Hi,
I am using hibrenate with oracle in my application.
My question is that if my application server is still on and i m using hibernate with its cache then is it possible that i can change the database from any other application which is not using hibernate (my be jdbc : odbc).
Awating for your reply.
I did not understand very well your problem, but:
- a SessionFactory is built on a specific database: you cannot silently replace jdbc connection properties in order to swith from original database to another database (I had same problem, at my first experience with Hibernate).
One database <--> One SessionFactory
- if you plan to access the same database both with Hibernate and another application, you have to pay great attention! Double attention if both Hibernate and other application read and WRITE data...
For example: if you use optimistic locks managed by Hibernate, the other application has to be able to manage the <version>.
Regarding the cache, be sure to understand the differece between first level cache (mandatory and managed by the Session) and second level cache (optional, non operational by default, and SessionFactory/cluster wide)
Delta