private static void init() { if (init) return; init = true; AbstractTestUtil.init(null, true); manager = SpringUtil.getBean(CEPCoreAopManager.CEPCORE_AOP_BEAN); manager.addAopAdapter(CEPCoreAopManager.BEFORE_LOCAL, "aopTestAdapter", "aop.*"); manager.addAopAdapter(CEPCoreAopManager.BEFORE_LOCAL, "requestParamValidate", null); handlerManager = SpringUtil.getBean(ExceptionHandlerManager.MANAGER_BEAN); try { handlerManager.addHandler( "org.tinygroup.exception.TinySysRuntimeException", new ExceptionHanlder1()); } catch (ClassNotFoundException e) { e.printStackTrace(); } registerEventProcessor(ToolUtil.getEventProcessor1()); }
public static boolean handle(Throwable e, Event event, ClassLoader loader) { ExceptionHandlerManager manager = BeanContainerFactory.getBeanContainer(loader).getBean(ExceptionHandlerManager.MANAGER_BEAN); return manager.handle(e, event); }