658648:2016-02-20 18:00:00,hostName=.com,node_error:e:org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'sactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!),Flag=4e1c5cd12039c856755f3012
659044-org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'payTransactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
659337- at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212)
659464- at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
659570- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
659674- at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:400)
659799- at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:390)
659924- at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:226)
660036- at org.springframework.transaction.interceptor.TransactionAspectUtils.getTransactionManager(TransactionAspectUtils.java:77)
660161- at org.springframework.transaction.interceptor.TransactionAspectUtils.getTransactionManager(TransactionAspectUtils.java:54)
660286- at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:245)
660422- at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)
660533- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
660643- at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
660736- at com.sun.proxy.$Proxy22.atomChangePayTradeSuccess(Unknown Source)
660805- at com. . . . .biz. .impl.PBizServiceImpl.onlinePayed(PayPayBizServiceImpl.java:293)
659044-org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'payTransactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
659337- at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212)
659464- at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
659570- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
659674- at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:400)
659799- at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:390)
659924- at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:226)
660036- at org.springframework.transaction.interceptor.TransactionAspectUtils.getTransactionManager(TransactionAspectUtils.java:77)
660161- at org.springframework.transaction.interceptor.TransactionAspectUtils.getTransactionManager(TransactionAspectUtils.java:54)
660286- at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:245)
660422- at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)
660533- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
660643- at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
660736- at com.sun.proxy.$Proxy22.atomChangePayTradeSuccess(Unknown Source)
660805- at com. . . . .biz. .impl.PBizServiceImpl.onlinePayed(PayPayBizServiceImpl.java:293)
660925- at com. .CallBackNode.doService(PayCallBackNode.java:110)
原因解析:
代理类动态获取bean,会有个判断.
此时bean的内存关联关系并没有被销毁. 入口没关,代码依然可以执行.
*项目需求链接
线上问题, 每次重启时,获取bean时大量抛错,具体为如下图:
两者存在竞争,需要在容器关闭之前关闭mq.
*概要设计
~涉及外部模块.
~各流程模块(主模块,子模块)交互图
流程图
类图