public void storeConfiguration() throws RuntimeException { transactionTemplate.execute(new TransactionCallback() { public Object doInTransaction() { bandanaManager.setValue(context, "fooKey", "fooValue"); throw new RuntimeException("Boom!"); bandanaManager.setValue(context, "barKey", "barValue"); } }); }
Nothing had been stored for "fooKey" before the code above executed. According to the documentation of the TransactionTemplate, the RuntimeException should have caused all the changes to be rolled back. So when calling
bandanaManager.getValue(context, "fooKey");
I expected that "null" would be returned. Instead I got "fooVale" :(
After some investigations I found out what caused this behavior:
The rollback worked for the underlying database but not for the Bandana cache. So, after empting the Bandana cache (via the Confluence administration) and w/o changing anything else, another call to
bandanaManager.getValue(context, "fooKey");
yielded the previously expected "null".
Community moderators have prevented the ability to post new answers.
After speaking to Dennis I created a Bug in JIRA: https://jira.atlassian.com/browse/CONF-26695
After speaking to Dennis I created a Bug in JIRA: https://jira.atlassian.com/browse/CONF-26695
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry that I am unable to answer that question - but it is indeed an interesting problem that you've found there - thanks for sharing! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.