Make REQUIRES_NEW transactions and/or access to PlatformTransactionManager

I’m helping to develop a plugin for Confluence Server/DC. While using this as a reference, I’m trying to make transactions with transaction attribute PROPAGATION_REQUIRES_NEW. However, when I try to incorporate Spring’s PlatformTransactionManager into a plugin, I get the following error:

[INFO] [talledLocalContainer] 2022-11-17 14:34:10,344 ERROR [Spring DM Context Creation Timer] [plugin.osgi.factory.OsgiPlugin] logAndClearOustandingDependencies Plugin '<plugin>' never resolved service '&platformTransactionManager' with filter '(&(objectClass=org.springframework.transaction.PlatformTransactionManager)(objectClass=org.springframework.transaction.PlatformTransactionManager))'
[INFO] [talledLocalContainer] 2022-11-17 14:34:10,344 ERROR [Spring DM Context Creation Timer] [plugin.osgi.factory.OsgiPlugin] onPluginContainerFailed Unable to start the plugin container for plugin '<plugin>'

Is there a way to accomplish this?

4 Likes