List of usage examples for org.springframework.context.support GenericXmlApplicationContext setValidating
public void setValidating(boolean validating)
From source file:org.objectrepository.instruction.Console.java
public static void start(InstructionType instructionType) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { GenericXmlApplicationContext context = new GenericXmlApplicationContext(); context.setValidating(false); context.load("META-INF/spring/or-manager.xml"); context.refresh();//from www . j av a 2 s. com InstructionManager instructionManager = context.getBean(InstructionManager.class); TaskType task = InstructionTypeHelper.firstTask(instructionType); task.setStatusCode(400); InstructionManager.class.getMethod(task.getName(), InstructionType.class).invoke(instructionManager, instructionType); }
From source file:org.objectrepository.MessageConsumerDaemon.java
public void init() { log.info("Startup service..."); GenericXmlApplicationContext context = new GenericXmlApplicationContext(); context.setValidating(false); context.load("/META-INF/spring/application-context.xml", "META-INF/spring/dispatcher-servlet.xml"); context.refresh();/*w ww. ja v a 2 s. co m*/ setContext(context); context.registerShutdownHook(); final RejectedExecutionHandler rejectedExecutionHandler = context.getBean(RejectedExecutionHandler.class); for (Queue taskExecutor : taskExecutors) { taskExecutor.setRejectedExecutionHandler(rejectedExecutionHandler); taskExecutor.initialize(); log.info("Initialized " + taskExecutor.getQueueName()); } }