use of org.apache.aries.transaction.AriesTransactionManager in project aries by apache.
the class Activator method start.
public void start(BundleContext ctx) {
context = ctx;
// Expose blueprint namespace handler if xbean is present
try {
nshReg = JdbcNamespaceHandler.register(ctx);
} catch (NoClassDefFoundError e) {
LOGGER.warn("Unable to register JDBC blueprint namespace handler (xbean-blueprint not available).");
} catch (Exception e) {
LOGGER.error("Unable to register JDBC blueprint namespace handler", e);
}
Filter filter;
String flt = "(&(|(objectClass=javax.sql.XADataSource)(objectClass=javax.sql.DataSource))(!(aries.managed=true)))";
try {
filter = context.createFilter(flt);
} catch (InvalidSyntaxException e) {
throw new IllegalStateException(e);
}
t = new ServiceTracker<CommonDataSource, ManagedDataSourceFactory>(ctx, filter, this);
tm = new SingleServiceTracker<AriesTransactionManager>(ctx, AriesTransactionManager.class, this);
tm.open();
}
Aggregations