Skip to content

Instantly share code, notes, and snippets.

Carlos Barragan carlosbarragan

Block or report user

Report or block carlosbarragan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
carlosbarragan /
Created Nov 29, 2016
Example for creating a DataSource via CDI
* Please note for this to work you need to add the corresponding dependencies.
* In this case, we use as connection pool
* and an embedded derby database.
public DataSource exposeDataSource() {
Properties props = new Properties();
props.setProperty("dataSource.databaseName", "mydb");
props.put("dataSource.logWriter", new PrintWriter(System.out));
You can’t perform that action at this time.