code: public static DataSource oracleDbDataSource(String url, String user, String password) {
  		try {
  			@SuppressWarnings("unchecked")
  			Class<? extends DataSource> dataSourceClass = (Class<? extends DataSource>) Class.forName("oracle.jdbc.pool.OracleDataSource");
  			DataSource dataSource = dataSourceClass.newInstance();
  			dataSourceClass.getMethod("setURL", String.class).invoke(dataSource, url);
  			dataSourceClass.getMethod("setUser", String.class).invoke(dataSource, user);
  			dataSourceClass.getMethod("setPassword", String.class).invoke(dataSource, password);
  			
  			// OracleDataSource dataSource = new OracleDataSource();
  			// dataSource.setURL(url);
  			// dataSource.setUser(user);
  			// dataSource.setPassword(password);
  			return dataSource;
  		} catch (Exception e) {
  			throw new LoggingRuntimeException(e, logger, "Cannot connect to oracle db");
  		}
  	}
docs: Don't forget to add the dependency to ojdbc like this in your pom.xml
  <pre>
  &lt;dependency&gt;
  &lt;groupId&gt;com.oracle&lt;/groupId&gt;
  &lt;artifactId&gt;ojdbc7&lt;/artifactId&gt;
  &lt;version&gt;12.1.0.2&lt;/version&gt;
  &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  </pre>
  
  You need to register at the oracle maven repository to actually get the driver.
  
  @param url for example "jdbc:oracle:thin:@localhost:1521:orcl"
  @param user User
  @param password Password
  @return DataSource