public class TransactionSynchronizationRegistryFactory extends AbstractNamedCacheComponentFactory implements AutoInstantiableFactory {
public <T> T construct(Class<T> componentType) {
// See if we had a TransactionSynchronizationRegistry injected into our config
TransactionSynchronizationRegistry transactionSynchronizationRegistry = null;
TransactionSynchronizationRegistryLookup lookup = configuration.getTransactionSynchronizationRegistryLookup();
try {
if (lookup != null) {
return componentType.cast(lookup.getTransactionSynchronizationRegistry());
}
}
catch (Exception e) {
log.info("failed looking up TransactionSynchronizationRegistry, will not use interposed synchronizations", e);
}