-->
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.  [ 4 posts ] 
Author Message
 Post subject: JUniting hibernate applicatin part II
PostPosted: Wed Feb 18, 2004 1:33 am 
Beginner
Beginner

Joined: Sun Dec 21, 2003 9:18 pm
Posts: 21
Hi,

I refer to my earlier post : http://forum.hibernate.org/viewtopic.php?t=927799&highlight=

Okay now i have managed to junit my hibernate app. I have created 2 connectionFactory-ies. 1 will return me a connection using the datasource and the other one will return me a JDBC direct conection. BUT I also realize in order to do this, I also need to specify 2 different hibernate.cfg.xml.

One xml is with the datasource name and the other one without the datasource. I did this because when hibernate load the hibernate.cfg.xml, it will try to resolve the datasource name *even though the app may not using it. This is how I end up with two hibernate.cfg.xml.

Something bothers me though. Is this the correct way of doing it ? Or can I specify whether i want to use a datasource or not programatically ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2004 3:50 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I use ant to expand a hibernate.cfg.xml template. Expand is different between ear and local tests

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2004 8:42 am 
Beginner
Beginner

Joined: Sun Dec 21, 2003 9:18 pm
Posts: 21
emmanuel wrote:
I use ant to expand a hibernate.cfg.xml template. Expand is different between ear and local tests


What do you mean by expand ? can share some of the codes ^___^. This is the first time i heard of 'expand'


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2004 10:59 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
ant has a <copy> task with <filterset> options
http://ant.apache.org/manual/index.html

_________________
Emmanuel


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