File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes Spring 2.5 / AbstractTransactionalJUnit4SpringContextTests/ datasource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring 2.5 / AbstractTransactionalJUnit4SpringContextTests/ datasource" Watch "Spring 2.5 / AbstractTransactionalJUnit4SpringContextTests/ datasource" New topic

Spring 2.5 / AbstractTransactionalJUnit4SpringContextTests/ datasource

Santosh Ramachandrula
Ranch Hand

Joined: Apr 04, 2004
Posts: 252
Hi, I have two data-sources in my application context. In my test method I want to access both the data-sources, How do I achieve this?

For single data-source I am using the below and it works fine.

Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
I think you cannot, as AbstractTransactionalJUnit4SpringContextTests accepts only one data source.
You may look at source code and try to override some methods, but I guess it would be a lot of work.

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
I agree. Here's the link:
subject: Spring 2.5 / AbstractTransactionalJUnit4SpringContextTests/ datasource
jQuery in Action, 3rd edition