• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Database configurations with Hibernate and caching

 
Ajeeth Kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am building an webservice app which has 2 different DBs( Oracle and DB2). Please let me know whats the best way of designing the hibernate layer to access both the DBs ; I have some cross reference tables in both of them.

I am planning to create a logical model of the physical DB model ( combining both Oracle and DB2) and use property files or some configuration to map my logical to the actual physical table. What would be the best design for this? Do you recommend caching these conversion values?

Please let me know the best practice / way to work on my above situation.

fyi - I am neither a novice nor an expert in J2EE.
 
Ajeeth Kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geeks and techies! Still no answer??
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajeeth Kumar wrote:Hi,
I am planning to create a logical model of the physical DB model ( combining both Oracle and DB2) and use property files or some configuration to map my logical to the actual physical table. What would be the best design for this? Do you recommend caching these conversion values?


Not sure what you mean by it?

But for a start you will need to create two different session factories, one to interact to each db.
 
Ajeeth Kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul Babbar wrote:
Ajeeth Kumar wrote:Hi,
I am planning to create a logical model of the physical DB model ( combining both Oracle and DB2) and use property files or some configuration to map my logical to the actual physical table. What would be the best design for this? Do you recommend caching these conversion values?


Not sure what you mean by it?

But for a start you will need to create two different session factories, one to interact to each db.


Well I did create 2 session factories for the interaction. By Logical model, I was thinking of creating OOP conceptual objects for the better handling of the UC flows.
Is there any idea on how we can force caching of some table or object in hibernate .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic