What you could do is have multiple setups so that some junit tests use the container, others use it from a differnet location. You may be able to use a container (Look at spring or the Avalon wrapper) to handle this. Just configure two copys of Hibernate depending on where you need your datasources. Of course, this is a heavy solution if all you are solving is this..
For configuration, look at the unit tests for hibernate. The properties file has many examples of different configuration methods... Eric > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > hanasaki > Sent: Wednesday, December 10, 2003 5:59 AM > To: Hibernate-Devel - LIST > Subject: [Hibernate] JUnit testing of hibernate code segments > that need > a datasource > > > Hibernate has been setup to use the data source provided by Tomcat. > There are some JUnit tests that need to be run on code > segments/classes > that are not running inside the container. How can a Datasource and > java:comp/env/jdbc be create and setup for the application outside of > the container? > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign > up for IBM's > Free Linux Tutorials. Learn everything from the bash shell > to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel