-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Migrating Existing program to Hibernate
PostPosted: Sun Jan 18, 2004 9:53 am 
Regular
Regular

Joined: Sun Jan 18, 2004 9:43 am
Posts: 50
Hi all


After I have learnt the great things about Hibernate I am really interested in migrating the data access layer of my existing program to Hibernate. I want to migrate the data access part by part and I am not sure if other data access method like direct plain JDBC would conflict with the Hibernate framework. And if I am also having other programs (running in different JVM) accessing and updating the database with JDBC. Again, would that conflict with the Hibernate framework? Since, the existing system is already quite big and fragmented therefore it is not really possible to replace the complete data access code with Hibernate. Please help!!


Thank You!

Warm regards

Edmond

_________________
Edmond Hung
Credit Card DNA Security System (Holdings) Ltd.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2004 11:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
If you are not using second level cache you should be fairly safe. Hibernate does not conflict with standard JDBC usage, and it should aquire the appropriate locks. You can do manual locking using session.lock() and session.load(). I don't have experience with multiple programs accessing the same data, but I know it is possible with hibernate. You have to be careful however.


Top
 Profile  
 
 Post subject: What is second Level cache?
PostPosted: Thu Feb 05, 2004 12:20 pm 
Regular
Regular

Joined: Sun Jan 18, 2004 9:43 am
Posts: 50
gloeglm wrote:
If you are not using second level cache you should be fairly safe. Hibernate does not conflict with standard JDBC usage, and it should aquire the appropriate locks. You can do manual locking using session.lock() and session.load(). I don't have experience with multiple programs accessing the same data, but I know it is possible with hibernate. You have to be careful however.


What is second level cache? I am using the default ehcache. Is it the second level cache? If so, how can I disable it? Because I have to set a cache class to start hibernate.

As I have said, I am migrating the existing application to hibernate and the existing DB schema doesn't use the FK to join table and I want to know if there would be any problem if I specify the associations between the tables in the mapping files.

Cheers

_________________
Edmond Hung
Credit Card DNA Security System (Holdings) Ltd.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2004 12:38 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
1. The second level cache is only used when you explicitly set it on your mapping (class level, etc). So if you don't do anything particuliar, it's not used.

2. If you mean do I need explicit FK constraints on my DB to use Hibernate core, then no.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.