Closed jack-kerouac closed 5 years ago
You could also override the default token services yourself. This class is provided by the spring security oauth library and not by this plugin.
Please reopen if you feel this is still an issue, but I believe you have a path forward.
We are using version 3.0.0-RC2 and have multiple data sources configured. We use the
@grails.transaction.Transactional
annotation for demarking our services as transactional.grails.spring.transactionManagement.proxies
is set tofalse
.Any invocation of a method in
DefaultTokenServices
fails complaining that it cannot decide whichTransactionManager
to chose:This is IMHO because this the
DefaultTokenServices
uses the Spring variant of the @Transactional annotation which is dependent on proxies being created. While the proxy is created, theTransactionInterceptor
has noTransactionManager
configured which would, I guess, be done when initializing Grails services.So I was wondering whether the
DefaultTokenServices
should not be switched to use the@grails.transaction.Transactional
annotation be default or whether there should be two versions of the class, one with Grails, one with Spring transaction annotations.I did not verify whether the same problem also appears if there is only one
DataSource
involved because in this case, theTransactionInterceptor
might be able to determine the correct transaction manager if none is configured.