-->
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.  [ 3 posts ] 
Author Message
 Post subject: Can Hibernate and non-Hibernate Applications Share a DB
PostPosted: Mon Jan 24, 2005 7:40 pm 
Newbie

Joined: Mon Jan 24, 2005 7:12 pm
Posts: 5
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: any

Mapping documents: N/A

Code between sessionFactory.openSession() and session.close(): N/A

Full stack trace of any exception that occurs:

Name and version of the database you are using: Sybase 12

The generated SQL (show_sql=true):N/A

Debug level Hibernate log excerpt:N/A


I am a newbie to Hibernate.

I am considering Hibernate for an application that uses a database that is used by a number of other applications. These applications can insert and update rows in the database.

Can I use Hibernate in this situation without making changes to the other applications.

(My concern is in how the special Hibernate tables and indexes will be updated if the other programs don't use Hibernate.)

A variant on this question: if i have a legacy database I want to use with Hibernate are there tools that can make the db Hibernate readable.

Any responses or pointers to areas of the documentation that I might have missed would be much appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 24, 2005 8:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Sure you can. Considerations are the same regardless of the technique being used to access the database concurrently from multiple applications. Note: Hibernate does not require special tables or indexes to work correctly.

Middlegen is currently the recommended tool (Hibernate 2.x) to reverse engineer the database. See Wiki and Middlegen pages. Hibernate 3.x toolset will include database reverse engineering tools - it is being actively worked on at the moment.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 12:18 pm 
Newbie

Joined: Wed Jan 05, 2005 12:30 pm
Posts: 17
Location: Philadelphia, PA
A couple of notes from my experience with this:

1) Don't use the Increment generator. It only updates its counter once per SessionFactory.

2) Be careful about how you configure an L2 cache. I have a web application with multiple frames that load the same information on different HttpRequests. As a result I get big benefits from L2 caching. There are several tables, updated often using VB apps that I read from often but rarely write to. On these tables I use timeToLiveSeconds=30. This is long enough for each of the frames to load without having to hit the database repeatedly but short enough that changes made by other applications are available almost immediately. Of course, this strategy should not be used for financial or safety-critical data.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.