Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring 2.5 / AbstractTransactionalJUnit4SpringContextTests/ datasource

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic