Tim Dysinger wrote:
Create a new applicationContext-dataSource.xml file and add your local db properties, for example:I have my setup using Bpm4Struts, Spring, Hibernate and Java cartridges. My deployment target is a simple War file on Tomcat5 or JBoss. This works great and everything is fine.
However, I cannot run unit tests that exercise my Spring services outside of the J2EE container [ie, JUnit test in Eclipse]. There are no EJBs involved but the Spring setup files are generated to expect in-container deployment.
Is there an easy way to setup your AndroMDA project so that Spring can
run in the container for deployment but outside the container for
testing? I don't want to have to re-deploy everything everytime there
is a change and be forced use Cactus to reach into a container to
test.
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"><value>oracle.jdbc.driver.OracleDriver</value></property>
<property name="username"><value>user</value></property>
<property name="password"><value>password</value></property>
<property name="url"><value>jdbc:oracle:oci:@instance</value></property>
</bean>
then just copy this over the original one (I'm assuming you're using the JNDI datasource in the original), and this one will be used instead (either that or make sure this one is on the classpath before the original so that this new one is used first
-Tim
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user