yes, I now this - but it is two datasource (two configuration)
Thanks
On Thursday 06 May 2004 11:08 am, Matt Raible wrote:
> This is probably a better question for the Spring mailing list. But
> since it's really pretty easy - here's how I do it. All you really
> need to do is define a dataSource for your tests, and one for your WAR.
> I basically do this in a file named applicationContext-database.xml
> and use the one below for my tests:
>
>
> "http://www.springframework.org/dtd/spring-beans.dtd">
>
>
>
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfi
> gurer">
> name="location">database.properties
>
>
> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
>
> ${hibernate.connection.driver_class}
>
>
> ${hibernate.connection.url}
>
>
> ${hibernate.connection.username}
>
>
> ${hibernate.connection.password}
>
>
>
>
>
> Then for running in Tomcat, I use Ant to bundle the following one in my
> WAR:
>
>
> "http://www.springframework.org/dtd/spring-beans.dtd">
>
>
>
> class="org.springframework.jndi.JndiObjectFactoryBean">
> name="jndiName">java:comp/env/jdbc/appfuse
>
>
>
>
> HTH,
>
> Matt
>
>
> On May 6, 2004, at 2:54 AM, snpe wrote:
>
> > On Wednesday 05 May 2004 10:50 pm, QM wrote:
> >> On Thu, May 06, 2004 at 12:44:57AM +0000, snpe wrote:
> >> : Can I access jndi out of container (from simple test application)
> >> ?
> >>
> >> In other words, you would like to access Tomcat's JNDI provider
> >> outside of a Tomcat-managed webapp?
> >>
> >> Not possible.
> >> This has been discussed on the list before.
> >>
> >> What is your end-goal here? There may be another way.
> >
> > I set jndi and jdbc and it wokr fine in web application (container),
> > I want now test database with same configuration
> > (oracle,hibernate,spring and tomcat 5.0.19)
> > - I set spring context with direct jdbc datasource and create context
> > in base TestCase (for now), but I
> > think that ispossible use same configuration - I check cactus, yet
> >
> > Thanks
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org