Hello community,
In light of the new requirements for the upcoming Confluence 9, we have encountered an issue with our plugin as outlined here.
The proposed solution involves migrating to Java Config, a process we have successfully executed with our Jira plugin in the past. However, we have encountered a roadblock.
Following the documentation provided here and here, which we previously used for converting our Jira plugin, we have attempted to implement the migration.
The issue arises when attempting to use the com.atlassian.activeobjects.external.ActiveObjects from an internal service BasServiceImpl
invoking the findSession
method with the error: Failed to find org.hibernate.Session from the current thread
.
// Interface
@Transactional
public interface BasService
{
// Methods
….
}
....
// Constructor
public BasServiceImpl(ActiveObjects ao, PageManager pagerManager, AttachmentManager attachmentManager, BootstrapManager bootstrapManager, NotificationManager notificationManager, AccessModeCompatService accessModeCompatService, MailService mailService, ApplicationProperties appProps, PermissionManager permissionManager, MockupsLicenseManager licenseManager, UserAccessor p_userAccessor)
{
_ao = *checkNotNull*(ao);
...
}
public BasSession findSession(String token)
{
final BasSession[] basSession;
BasSession ret = null;
// runtime exception with Java Config
basSession = _ao.find(BasSession.class, "TOKEN = ?", token);
…
}
It appears there may be a discrepancy within the Spring mechanism, yet we have been unable to identify a solution, despite comparing our configuration with the Jira plugin, which is operational.
Maybe the @Transactional keyword is not handled correctly with Java Config ?
For reference, here you can find the configuration files.
Thanks for any advise !