Skip to content

Instantly share code, notes, and snippets.

@orenteriab
Created September 1, 2015 21:09
Show Gist options
  • Select an option

  • Save orenteriab/f654ff8450e322cb894d to your computer and use it in GitHub Desktop.

Select an option

Save orenteriab/f654ff8450e322cb894d to your computer and use it in GitHub Desktop.
/*Los imports, que son un buen*/
@Named
public class MyStored extends StoredProcedure{
private JdbcTemplate firstTemplate;
private JdbcTemplate secondTemplate;
@Inject
public MyStored(DataSource firstDataSource,
DataSource secondDataSource){
//Tal vez necesites agregarle un @Qualifier
//checa: http://docs.oracle.com/javaee/6/api/javax/inject/Qualifier.html
this.firstTemplate = new JdbcTemplate(firstDataSource);
this.secondTemplate = new JdbcTemplate(secondDataSource);
}
//Demás métodos aquí...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment