in tx-control-providers/jpa/tx-control-provider-jpa-common/src/main/java/org/apache/aries/tx/control/jpa/common/impl/AbstractManagedJPADataSourceSetup.java [58:80]
public AbstractManagedJPADataSourceSetup(BundleContext context, String pid, Properties jdbcProperties,
Map<String, Object> baseJPAProperties, Map<String, Object> providerProperties) throws InvalidSyntaxException, ConfigurationException {
this.context = context;
this.pid = pid;
this.jdbcProperties = jdbcProperties;
this.baseJPAProperties = baseJPAProperties;
this.providerProperties = providerProperties;
String targetFilter = (String) providerProperties.get(AbstractJPAManagedServiceFactory.DSF_TARGET_FILTER);
if (targetFilter == null) {
String driver = (String) providerProperties.get(OSGI_JDBC_DRIVER_CLASS);
if (driver == null) {
LOG.error("The configuration {} must specify a target filter or a JDBC driver class", pid);
throw new ConfigurationException(OSGI_JDBC_DRIVER_CLASS,
"The configuration must specify either a target filter or a JDBC driver class");
}
targetFilter = "(" + OSGI_JDBC_DRIVER_CLASS + "=" + driver + ")";
}
targetFilter = "(&(" + OBJECTCLASS + "=" + DataSourceFactory.class.getName() + ")" + targetFilter + ")";
this.dsfTracker = new ServiceTracker<>(context, context.createFilter(targetFilter), this);
}