Author: jstrachan Date: Mon Sep 3 10:37:31 2012 New Revision: 1380192 URL: http://svn.apache.org/viewvc?rev=1380192&view=rev Log: allow derived classes to override the use of the default postprocessor (e.g. we'll want to do this in CDI eventually when its all working nicely to avoid double injection)
Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java?rev=1380192&r1=1380191&r2=1380192&view=diff ============================================================================== --- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java (original) +++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java Mon Sep 3 10:37:31 2012 @@ -398,7 +398,16 @@ public abstract class CamelTestSupport e template = threadTemplate.get(); consumer = threadConsumer.get(); camelContextService = threadService.get(); + applyCamelPostProcessor(); + } + /** + * Applies the {@link DefaultCamelBeanPostProcessor} to this instance. + * + * Derived classes using IoC / DI frameworks may wish to turn this into a NoOp such as for CDI + * we would just use CDI to inject this + */ + protected void applyCamelPostProcessor() throws Exception { // use the default bean post processor from camel-core DefaultCamelBeanPostProcessor processor = new DefaultCamelBeanPostProcessor(context); processor.postProcessBeforeInitialization(this, getClass().getName());