try {
//ds = new StandardXADataSource();
ds = (StandardXADataSource) ObjectType.getInstance(wrapperClass);
pds = new StandardXAPoolDataSource();
} catch (NoClassDefFoundError e) {
throw new GenericEntityException("Cannot find xapool.jar");
} catch (ClassNotFoundException e) {
throw new GenericEntityException("Cannot load wrapper class: " + wrapperClass, e);
} catch (InstantiationException e) {
throw new GenericEntityException("Unable to instantiate " + wrapperClass, e);
} catch (IllegalAccessException e) {
throw new GenericEntityException("Problems getting instance of " + wrapperClass, e);
}
if (ds == null)
throw new GenericEntityException("StandardXaDataSource was not created, big problem!");
ds.setDriverName(jotmJdbcElement.getAttribute("jdbc-driver"));
ds.setUrl(jotmJdbcElement.getAttribute("jdbc-uri"));
ds.setUser(jotmJdbcElement.getAttribute("jdbc-username"));
ds.setPassword(jotmJdbcElement.getAttribute("jdbc-password"));