ConfigTransactionControllerInternal,
ConfigTransactionControllerImplMXBean,
Identifiable<TransactionIdentifier> {
- private static final Logger LOGGER = LoggerFactory.getLogger(ConfigTransactionControllerImpl.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ConfigTransactionControllerImpl.class);
private final ConfigTransactionLookupRegistry txLookupRegistry;
private final ObjectName controllerON;
boolean isDefaultBean, BundleContext bundleContext)
throws InstanceAlreadyExistsException {
- LOGGER.debug("Adding module {} to transaction {}", moduleIdentifier, this);
+ LOG.debug("Adding module {} to transaction {}", moduleIdentifier, this);
if (moduleIdentifier.equals(module.getIdentifier()) == false) {
throw new IllegalStateException("Incorrect name reported by module. Expected "
+ moduleIdentifier + ", got " + module.getIdentifier());
}
private synchronized void destroyModule(ModuleIdentifier moduleIdentifier) {
- LOGGER.debug("Destroying module {} in transaction {}", moduleIdentifier, this);
+ LOG.debug("Destroying module {} in transaction {}", moduleIdentifier, this);
transactionStatus.checkNotAborted();
ModuleInternalTransactionalInfo found = dependencyResolverManager.findModuleInternalTransactionalInfo(moduleIdentifier);
if (blankTransaction == false &&
found.isDefaultBean()) {
- LOGGER.warn("Warning: removing default bean. This will be forbidden in next version of config-subsystem");
+ LOG.warn("Warning: removing default bean. This will be forbidden in next version of config-subsystem");
}
// first remove refNames, it checks for objectname existence
writableSRRegistry.removeServiceReferences(
ObjectNameUtil.createTransactionModuleON(getTransactionName(), moduleIdentifier));
} catch (InstanceNotFoundException e) {
- LOGGER.error("Possible code error: cannot find {} in {}", moduleIdentifier, writableSRRegistry);
+ LOG.error("Possible code error: cannot find {} in {}", moduleIdentifier, writableSRRegistry);
throw new IllegalStateException("Possible code error: cannot find " + moduleIdentifier, e);
}
private void validateNoLocks() throws ValidationException {
transactionStatus.checkNotAborted();
- LOGGER.trace("Validating transaction {}", getTransactionIdentifier());
+ LOG.trace("Validating transaction {}", getTransactionIdentifier());
// call validate()
List<ValidationException> collectedExceptions = new ArrayList<>();
for (Entry<ModuleIdentifier, Module> entry : dependencyResolverManager
try {
module.validate();
} catch (Exception e) {
- LOGGER.warn("Validation exception in {}", getTransactionName(),
+ LOG.warn("Validation exception in {}", getTransactionName(),
e);
collectedExceptions.add(ValidationException
.createForSingleException(name, e));
throw ValidationException
.createFromCollectedValidationExceptions(collectedExceptions);
}
- LOGGER.trace("Validated transaction {}", getTransactionIdentifier());
+ LOG.trace("Validated transaction {}", getTransactionIdentifier());
}
/**
try {
validateNoLocks();
} catch (ValidationException e) {
- LOGGER.trace("Commit failed on validation");
+ LOG.trace("Commit failed on validation");
configBeanModificationDisabled.set(false); // recoverable error
throw e;
}
+ "to obtain a lock");
}
- LOGGER.trace("Committing transaction {}", getTransactionIdentifier());
+ LOG.trace("Committing transaction {}", getTransactionIdentifier());
// call getInstance()
for (Entry<ModuleIdentifier, Module> entry : dependencyResolverManager
Module module = entry.getValue();
ModuleIdentifier name = entry.getKey();
try {
- LOGGER.debug("About to commit {} in transaction {}",
+ LOG.debug("About to commit {} in transaction {}",
name, getTransactionIdentifier());
AutoCloseable instance = module.getInstance();
checkNotNull(instance, "Instance is null:{} in transaction {}", name, getTransactionIdentifier());
} catch (Exception e) {
- LOGGER.error("Commit failed on {} in transaction {}", name,
+ LOG.error("Commit failed on {} in transaction {}", name,
getTransactionIdentifier(), e);
internalAbort();
throw new IllegalStateException(
// count dependency order
- LOGGER.trace("Committed configuration {}", getTransactionIdentifier());
+ LOG.trace("Committed configuration {}", getTransactionIdentifier());
transactionStatus.setCommitted();
return dependencyResolverManager.getSortedModuleIdentifiers();
}
private void internalAbort() {
- LOGGER.trace("Aborting {}", this);
+ LOG.trace("Aborting {}", this);
transactionStatus.setAborted();
close();
}