IntelliJ Java IDE
The moose likes Object Relational Mapping and the fly likes Hibernate  + Singleton + SYNC  + DB Table Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Hibernate  + Singleton + SYNC  + DB Table" Watch "Hibernate  + Singleton + SYNC  + DB Table" New topic
Author

Hibernate + Singleton + SYNC + DB Table

Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 123
Hi,

If I configure my hibernate to be singleton,

then the Objects will be loaded once,

Behind the scene (consider Still the server is running),

In case if I alter/drop the Database Table structure,

How does these singleton objects react ?

what steps can be performed to ensure this ?



Thanks in advance!!
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3563

...In case if I alter/drop the Database Table structure, How does these singleton objects react ?

I'd say protect the DB access as this might not be a scenario in which Hibernate is designed for. But I haven't tried that to see exactly what happens.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
 
subject: Hibernate + Singleton + SYNC + DB Table
 
Threads others viewed
replace singleton with enum
Retrieving Table Structure Using Hibernate...
Retrieving Table Structure Using Hibernate...
Improving performance of Hibernate based batch program
need of schema export feature?
IntelliJ Java IDE