-->
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: hibernate used in shared jar files
PostPosted: Tue Nov 08, 2005 10:24 am 
Newbie

Joined: Tue Nov 08, 2005 10:03 am
Posts: 1
We are creating a framework that provides additional functionality for webapps. Our environment is a Tomcat installation, and we have created a number of shared classes that can be accessed by webapps deployed on our server via a custom API.

The shared classes use hibernate for their persistence. These shared classes are bundled as a jar and reside in the /shared/lib folder in Tomcat.

The problem is that the shared classes jar has its own hibernate.cfg.xml file that overrides any that may reside within the webapp.

The webapps we are using are produced by third parties, and we do not want to place any requirements on them with respect to usage or the way they configure their hibernate installation.

I think that I can get around this by making the hibernate settings programmatically within the shared jar and that would allow any hibernate.cfg.xml file in the webapp to work properly?

Is there a good (recommended) way to handle this scenario? Are there any potential problems with the solution I have proposed?

Brad
Chief Architect -- Penguinfire Media inc.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 10:34 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Look at JBossAS and its HARDeployer.
You can use AS just as web container (Tomcat).

You can probably add this jar of your's to every .har file (without .cfg.xml) and then simply configure this .har.

_________________
--------------------------------
Ales Justin
JBoss, a division of Red Hat


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.