-->
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.  [ 2 posts ] 
Author Message
 Post subject: Sharing Configuration between Hibernate 2 and 3?
PostPosted: Sat Feb 26, 2005 8:41 pm 
Beginner
Beginner

Joined: Tue Nov 09, 2004 9:48 am
Posts: 23
Guys,

I'm working on a fat desktop application that uses Hibernate 2, but I've been forced to use Hibernate 3 in some cases to be able to take advantage of the new Projection features, particularly with Criteria queries.

App startup time is very important, and I've been examining http://www.hibernate.org/194.html and trying to figure out how I can use that with 2.1, because app startup is currently very slow when parsing the configuration.

Now, after adding Hibernate 3, it's even slower. Hibernate 3 seems to take almost twice as long as 2 to load, and between the two, it's extremely long.

What I'd like to do is be able to use the same Configuration or Session object for both Hibernate 2 and 3. That way, at least I only have to load a Configuration once, rather than twice.

Anyway to do this? I'm sure this is quite impossible, but thought it worth a shot to ask.

Any other suggestions?

Thanks!

jbwiv


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 27, 2005 7:20 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you can't - at least not easily (and it for sure isnt recommended).
But you can without problems run them in the same vm no problems there.

the reason why it takes time in H3 is probably because you are still referring to hibernate-2 dtd which h3 will need to go fetch from the net ...and thats dog slow.

change it to a hibernate 3 dtd and it will go faster.
/max

_________________
Max
Don't forget to rate


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