I am encountered with a strange error for a few days,and still in puzzled,details are below:
I'm using apache shiro with spring,
after some work,I got ready to setup "doGetAuthorizationInfo" method,because I'm using "@RequiresRoles" in my controller,
I found if I invoke XXXService(or any service) more than once,the exception occur(first time invoke XXXService,everything work fine),so,I'm try to test "doGetAuthenticationInfo" in same Realm which used for login,I invoked XXXService or other services several times in the method,it works fine,
and I also tried to change different datasource component,
so I think it's not datasource component bug,
I didn't find the reason.
When I was using dbcp datasource,exception like below:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
No others are causing exception.
Any other place didn't found this problem.
Thanks for any help.