<tx:annotation-driven/> <property name="dataSource" ref="dataSource1"/> <property name="dataSource" ref="dataSource2"/>
2. In you service layer code
@Transactional(value = "jdbcTxManager") public List<String> getNames() { return userDao.getNames(); } @Transactional(value = "jpaTxManager") public void persitentUser(User user) { return user.persist(); }
please have a look
ReplyDeletehttp://www.rajkrrsingh.blogspot.in/2012/06/spring-working-with-datasource-and.html