class OracleJarUtils {

    public static DataSource createOracleDataSource(String uri)
    throws Exception
	{
		// Create the OracleDataSource used to get DB connection(s)
		DataSource ds = null;
		try
		{
			Class oracleDataSourceClass = loadClass("oracle.jdbc.pool.OracleDataSource");
			Object ods = oracleDataSourceClass.newInstance(); 	  
			ds = (DataSource) ods;

			Method setURLMethod = oracleDataSourceClass.getMethod("setURL", String.class);
			Method getConnectionPropertiesMethod = oracleDataSourceClass.getMethod("getConnectionProperties");
			Method setConnectionPropertiesMethod = oracleDataSourceClass.getMethod("setConnectionProperties", Properties.class);
			setURLMethod.invoke(ods, uri);
			// DDS-425. Set oracle.jdbc.V8Compatible so DATE column will be mapped to java.sql.TimeStamp
			//          oracle jdbc 11g fixed this. So we can skip this after will upgrade jdbc to 11g.

			Properties prop = (Properties) getConnectionPropertiesMethod.invoke(ods);
			if (prop == null)
			{
				prop = new Properties();
			}
			//prop.put("oracle.jdbc.V8Compatible","true");
			setConnectionPropertiesMethod.invoke(ods, prop);
		} catch (Exception e)
		{
			String errMsg = "Error trying to create an Oracle DataSource"; 
			LOG.error(errMsg, e);
			throw e;
		}
	    return ds;
    }

}