-->
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: hibernate.cfg.xml
PostPosted: Fri Oct 12, 2007 11:07 am 
Newbie

Joined: Thu Oct 11, 2007 10:41 am
Posts: 4
I have a jar(common.jar) file which will be used by all the J2EE applications. I put it under WebSphere\AppServer\lib\ext folder. The hibernate.cfg.xml is in common.jar.

If we have J2EE application which also use hibernate, it has its own hibernate.cfg.xml. Will hibernate.cfg.xml in common.jar affect hibernate.cfg.xml in the J2EE application? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 13, 2007 9:03 pm 
Beginner
Beginner

Joined: Tue Aug 14, 2007 6:29 pm
Posts: 27
Location: chicago
It depends on the classloading feature of websphere. Also if you know the order in which websphere loads the classes that may be helpful. If websphere loads the jar under ext first then you may be fine. In case if the ext and jar under J2EE app also loads at the same time you may experience SessionFactoryObjectNotFound exception because of clash between two config files.

Can't you have the hibernate cfg in one jar which is common for all J2EE applications running in websphere? Can't you place it directly under lib of app server?



Sun


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 9:27 am 
Newbie

Joined: Thu Oct 11, 2007 10:41 am
Posts: 4
Thanks for your reply,Sun.

>Can't you have the hibernate cfg in one jar which is common for all >J2EE applications running in websphere?
No, we don't want to test all applications since we touch the hibernate cfg file.

> Can't you place it directly under lib of app server?
If I do like this, I have the similar question: will the hibernate cfg file under lib of app server affect the hibernate cfg file under J2EE applications?

George


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.