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: Multiple applications sharing same hibernate mapping classes
PostPosted: Thu Jan 04, 2007 6:50 am 
Newbie

Joined: Thu Jan 04, 2007 6:36 am
Posts: 1
I have a tomcat server running a set of applications. Each application has its own database and the applications are using identical code base. The application is Spring+hibernate+Struts

At the moment, when tomcat is started, each context is initialized with its own hibernate mapping classes, datasource, dao, sessionfactory etc. This will take very long time and consum a lof of memory.

Is there anyway I can initialize those common stuff eg, hibernate mapping class, dao only once and let the applications share these instances (by passing datasource)?

I will be very thankful for any help
Edit/Delete Message


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 6:59 am 
Regular
Regular

Joined: Thu Aug 17, 2006 4:50 am
Posts: 55
Location: Mallorca
SessionFactory creation is a heavyweight operation. Since every application has its own database, i think you have not option here.


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.