On Thu, 22 May 2014, Marvin Addison wrote:

The stack trace indicates that some Spring AOP proxy is intercepting the
I see that createTicketGrantingTicket() has an @Transactional annotation 
applied to
it.  Could this be causing the spurious calls to autocommit and commit?

Yes, I think that's it. I would recommend trying to restrict the scope
of Spring AOP transactional proxies to just the service registry. I've
never seen that done, but <aop:aspectj-autoproxy> takes a subelement,
<include> [1] that is a regex where you can specify the scope of
included components. I can imagine a regex that would include
ServiceRegistryDao but exclude CentralAuthetnicationServiceImpl. Try
that and report back.

M

[1] http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

I played around with various forms on <include> on the <aop:aspectj-autoproxy>, but nothing I did made it stop calling autocommit and commit. Eventually, I even commented out the <aop:aspectj-autoproxy/> line entirely, but it was *still* calling autocommit and commit.

After getting some help from my coworker, I tried commenting out the transactionManager in deployerConfigContext.xml entirely:

<!-- <tx:annotation-driven transaction-manager="transactionManager"/> -->

This finally stopped CAS from calling autocommit and commit during authentication.

I think the <aop:aspectj-autoproxy> configuration is irrelevant because the transaction manager is automatically adding transactions via the @Transaction annotations.

I'm going to investigate if I can use declarative transactions using XML instead of relying on the annotations.

  
http://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/transaction.html#transaction-declarative


Thanks,
        Andy

--
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to