Guest User

Untitled

a guest
Jun 25th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. @Bean
  2. @Primary
  3. public DataSource businessDataSource() throws IllegalArgumentException, NamingException {
  4. JndiObjectFactoryBean dataSource = new JndiObjectFactoryBean();
  5. dataSource.setResourceRef(true);
  6. dataSource.setJndiName("MYDS");
  7. dataSource.afterPropertiesSet();
  8.  
  9. return (DataSource) dataSource.getObject();
  10. }
Add Comment
Please, Sign In to add comment