public void setDatasources(List<DataSourceConfig> src) {
   if (src != null) {
     for (DataSourceConfig ds : src) {
       ConfigurationDBRef configDB = new ConfigurationDBRef();
       configDB.setDriverManagerConnection(
           "com.ebay.jetstream.dal.jdbc.DalJdbcDriver", "_" + ds.getDsName(), null);
       // configDB.setDriverManagerConnection(, "_" + ds.getDsName(), null);
       configDB.setMetadataOrigin(MetadataOriginEnum.SAMPLE);
       configDB.setConnectionLifecycleEnum(ConnectionLifecycleEnum.POOLED);
       getDatabaseReferences().put(ds.getEplRefName(), configDB);
     }
   }
 }
Example #2
0
  public Connection getConnection() throws SQLException {
    DataSource tempDs = ds;
    Object obj = currentUser.get();
    // System.out.println("currentUser:"******"currentUser:"******",jndi:" + jndiName);
      if (tempDs instanceof DataSourceWrapper) {
        tempDs = ((DataSourceWrapper) tempDs).getDataSource();
      }
    }

    Connection conn = tempDs.getConnection();
    return new ConnectionWrapper(conn, new Exception());
  }
 public void begin(String namespace, String name, Attributes attributes) throws Exception {
   DataSourceConfig dsc = (DataSourceConfig) digester.peek();
   dsc.addProperty(attributes.getValue("property"), attributes.getValue("value"));
 }