org.springframework.context.support.AbstractXmlApplicationContext Java Examples
The following examples show how to use
org.springframework.context.support.AbstractXmlApplicationContext.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TddlRuleConfig.java From tddl5 with Apache License 2.0 | 5 votes |
/** * 初始化某个版本的rule */ private synchronized boolean initVersionRule(String data, String version) { if (version == null) { version = NO_VERSION_NAME; } ApplicationContext ctx = null; try { // this rule may be wrong rule,don't throw it but log it, // and will not change the vtr! ctx = buildRuleByStr(version, data); } catch (Exception e) { throw new TddlNestableRuntimeException(e); } VirtualTableRoot tempvtr = (VirtualTableRoot) ctx.getBean(ROOT_BEAN_NAME); if (tempvtr != null) { // 直接覆盖 vtrs.put(version, tempvtr); ruleStrs.put(version, data); AbstractXmlApplicationContext oldCtx = this.oldCtxs.get(version); // 销毁旧有容器 if (oldCtx != null) { oldCtx.close(); } // 记录一下当前ctx this.oldCtxs.remove(version); this.oldCtxs.put(version, (AbstractXmlApplicationContext) ctx); } else { logger.error("rule no vtabroot!!"); return false; } return true; }
Example #2
Source File: TddlRuleConfig.java From tddl with Apache License 2.0 | 5 votes |
/** * 初始化某个版本的rule */ private synchronized boolean initVersionRule(String data, String version) { if (version == null) { version = NO_VERSION_NAME; } ApplicationContext ctx = null; try { // this rule may be wrong rule,don't throw it but log it, // and will not change the vtr! ctx = buildRuleByStr(version, data); } catch (Exception e) { logger.error("init rule error,rule str is:" + data, e); return false; } VirtualTableRoot tempvtr = (VirtualTableRoot) ctx.getBean(ROOT_BEAN_NAME); if (tempvtr != null) { // 直接覆盖 vtrs.put(version, tempvtr); ruleStrs.put(version, data); AbstractXmlApplicationContext oldCtx = this.oldCtxs.get(version); // 销毁旧有容器 if (oldCtx != null) { oldCtx.close(); } // 记录一下当前ctx this.oldCtxs.remove(version); this.oldCtxs.put(version, (AbstractXmlApplicationContext) ctx); } else { logger.error("rule no vtabroot!!"); return false; } return true; }
Example #3
Source File: SpringOrderRouterWithMulticastTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/SpringOrderRouterWithMulticastTest.xml"); }
Example #4
Source File: SpringCustomLoadBalancerTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/custom-loadbalancer.xml"); }
Example #5
Source File: SpringSplitterAggregateABCTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/splitter-aggregate.xml"); }
Example #6
Source File: ConsumerTemplateTest.java From camelinaction with Apache License 2.0 | 4 votes |
protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/consumerTemplate.xml"); }
Example #7
Source File: SpringSplitterBeanTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/splitter-bean.xml"); }
Example #8
Source File: SpringAggregateABCGroupTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/aggregate-abc-group.xml"); }
Example #9
Source File: SpringFailoverInheritErrorHandlerLoadBalancerTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/failover-inheriterrorhandler-loadbalancer.xml"); }
Example #10
Source File: SpringRoutingSlipSimpleTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/routingslip-simple.xml"); }
Example #11
Source File: SpringSplitterStopOnExceptionABCTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/splitter-stop.xml"); }
Example #12
Source File: SpringRandomLoadBalancerTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/random-loadbalancer.xml"); }
Example #13
Source File: SpringBigFileSedaTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/BigFileSedaTest.xml"); }
Example #14
Source File: SpringOrderRouterWithFilterTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/SpringOrderRouterWithFilterTest.xml"); }
Example #15
Source File: TracerSpringTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/TracerSpringTest.xml"); }
Example #16
Source File: XmlOrderNamespaceTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/xmlOrderNamespace.xml"); }
Example #17
Source File: SpringAggregateXMLTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/aggregate-xml.xml"); }
Example #18
Source File: SpringOrderRouterWithParallelMulticastTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/SpringOrderRouterWithParallelMulticastTest.xml"); }
Example #19
Source File: SpringSplitterBeanTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/splitter-bean.xml"); }
Example #20
Source File: SpringOrderRouterTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/SpringOrderRouterTest.xml"); }
Example #21
Source File: SpringOrderRouterOtherwiseTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/SpringOrderRouterOtherwiseTest.xml"); }
Example #22
Source File: OrderTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/camel-route.xml"); }
Example #23
Source File: SpringAggregateABCInvalidTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/aggregate-abc-invalid.xml"); }
Example #24
Source File: PurchaseOrderCsvSpringTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/order-csv.xml"); }
Example #25
Source File: PurchaseOrderJaxbTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/order-jaxb.xml"); }
Example #26
Source File: SpringFirstTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/firststep.xml"); }
Example #27
Source File: SpringOrderToCsvBeanTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("camelinaction/SpringOrderToCsvBeanTest.xml"); }
Example #28
Source File: SpringFailoverInheritErrorHandlerLoadBalancerTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/failover-inheriterrorhandler-loadbalancer.xml"); }
Example #29
Source File: SpringBigFileCachedThreadPoolTest.java From camelinaction with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/BigFileCachedThreadPoolTest.xml"); }
Example #30
Source File: SpringFileRollbackOnCompletionTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected AbstractXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("META-INF/spring/filerollback.xml"); }