In my custom authentication provider, I was able to get the domain object through my Service API, but when I scanned from one domain object to another to get a specific value to perform additional checks, Spring complains that the Hibernate session is not working, t exists: -
domain.getAnotherDomain().getProperty();
I have the following AOP transaction for transferring all my project APIs with a transaction, and I am sure that my custom authentication provider will fall into the following pattern: -
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:advisor pointcut="execution(* my.project..*.*(..))" advice-ref="txAdvice" />
</aop:config>
I also have the OpenSessionInView filter installed, but I don't think this applies to Spring Security anyway.
, API- , , .
? .