We are building an add-on which does some changes to the JIRA configuration.
With JIRA 7 we hit the following issue:
1. Open a transaction with the com.atlassian.jira.transaction.Txn API
2. Create an issue type using IssueTypeManager.createIssueType()
3. Get the newly created issue type by id using ConstanstsManager.getIssueTypeObject(id)
Result: The last call returns null. If transactions are disabled everything works correctly.
We tracked down the problem to the fact that DefaultsConstantManager.IssueTypeCacheLoader opens a new DB connection and completely ignores the current transaction.
This effectively means that transactions are unusable with JIRA 7.
Here is a simple groovy script to reproduce (with Script Runner). Comment out the Txn.begin() call and everything will work: