Hi all,
I have a small problem I would like to solve. I am pretty sure I am not the only one having this problem.
Hibernate will be connected to a quite big database (15Gigs) all day long in read only access. At midnight, I have to reload the database again with updated Data (let say : Account, Client, Product, Basket, etc). But I dont want my application to feel the down time when loading, reconstructing the index, the foreign key, etc. So I guess I have 2 scenarios to preserve the old data while loading the new one.
The first one is to load the new data in some Table B and make a Switch View (from Table A to Table B) when the load is complete. The only problem will be the management of the database exception when switching view if a JDBC Transaction need the data at the same time of the switch.
The second idea would be to load a Database B while the other application access the DataBase A, and then when the load is finish, we set the DataSource factory to give a dataConnection to B instead of A. The only problem is that if I need to explicitly name the database in Hibernate to make SQL JOIN between 2 databases, this solution will not work.
Any idea for solution 1 or 2?
Thanks for replying.
Etienne.
Montreal
|