On Sat, Apr 14, 2012 at 11:35 PM, Bob Jolliffe <[email protected]> wrote:
> Hi Claus
>
> On 13 April 2012 16:12, Claus Ibsen <[email protected]> wrote:
>> Hi
>>
>> What runtime do you use? Tomcat, Standalone, OSGi etc?
>
> Both tomcat and jetty in different settings.
>
>> Camel should pickup that bean automatic as it lookup the registry by type.
>> As shown here
>> http://camel.apache.org/advanced-configuration-of-camelcontext-using-spring.html
>>
>> And does you class really have the correct name? It starts with import
>> in the mail below.
>
> Yes that was a typo.  It doesn't really have that name.  But what I
> have found, which was surprizing but OK now that I know, is that the
> LifecycleStrategyManager does indeed work as expected (which is
> great), but it doesn't seem to be picked up during testing.  I am
> guessing that the CamelTestSupport uses its own liefecycle manager.
> Is this true?
>

Are  you using the CamelSpringTestSupport which support Spring?

If you use pure Java for testing, you need to add the strategy using
the Java API.
There is API on CamelContext to do that.


>>
>> On Fri, Apr 13, 2012 at 1:25 PM, Bob Jolliffe <[email protected]> wrote:
>>> Hi
>>>
>>> I am struggling a bit with loading a custom
>>> LifecycleManagementStrategy.  (Like some previous posters I am looking
>>> to load some xml routes on startup).
>>>
>>> I have created a class DHIS2LifecycleManagementStrategy which extends
>>> DefaultLifecycleManagementStrategy and overridden the onContextStart()
>>> method.  But I'm not sure what exactly to put in my spring beans
>>> configuration file in order for this strategy to be picked up.  I have
>>> the following:
>>>
>>> <!-- custom lifecycle strategy -->
>>> <bean id="lifecyclestrategy" class="import
>>> org.hisp.dhis.integration.management.DHIS2LifecycleManagementStrategy"
>>> />
>>>
>>> <camel:context .... />
>>>
>>> Any idea what I am missing?
>>>
>>> Thanks
>>> Bob
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>> FuseSource
>> Email: [email protected]
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to