use of org.firebirdsql.jaybird.xca.FBManagedConnectionFactory in project jaybird by FirebirdSQL.
the class DataSourceFactory method loadSimpleDS.
private Object loadSimpleDS(Reference ref) {
RefAddr propertyContent = ref.get(FBSimpleDataSource.REF_MCF);
FBManagedConnectionFactory mcf = null;
if (propertyContent != null) {
byte[] data = (byte[]) propertyContent.getContent();
mcf = (FBManagedConnectionFactory) deserialize(data);
}
if (mcf == null) {
mcf = new FBManagedConnectionFactory(false);
}
FBSimpleDataSource ds = new FBSimpleDataSource(mcf);
ds.setDescription(getRefAddr(ref, FBSimpleDataSource.REF_DESCRIPTION));
return ds;
}
use of org.firebirdsql.jaybird.xca.FBManagedConnectionFactory in project jaybird by FirebirdSQL.
the class FBConnectionPoolDataSource method initialize.
private void initialize() throws SQLException {
synchronized (lock) {
if (internalDs != null) {
return;
}
GDSType gdsType = GDSType.getType(getType());
if (gdsType == null) {
gdsType = GDSFactory.getDefaultGDSType();
}
FBManagedConnectionFactory mcf = new FBManagedConnectionFactory(gdsType, getConnectionProperties());
internalDs = (FBDataSource) mcf.createConnectionFactory();
internalDs.setLogWriter(getLogWriter());
}
}
Aggregations