3

I have a Storage Extension that does this in extended JPADAOFactory class:

 public void commitTransaction(final String transactionId) throws StorageException {
        try {
            LOG.info("Committing transaction: {}", transactionId);
            commit(transactionId);
            LOG.info("Transaction: {} completed", transactionId);
        } catch (final Exception e) {
            LOG.error("Transaction: {} has failed", transactionId);
            throw new StorageException(e);
        } finally {
            Extension.cleanup(transactionId);
        }
    }

In commit method i first do:

super.commitTransaction(transactionId);

and then the rest of storage extension code.

Now, the problem is what happens is that once I do super.committransaction() and rest of extension fails, page is still published in broker.

How can I revert original super.commitTransaction() in case of storage extension fail, because this is not the case now. Plus i have a page in broker that is published, but transaction has status failed!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.