I got the idea that you really want to define an instance of the DefaultCamelContext, and not the new class/implementation that you are asking about.
And the docs you referred to discuss this, and it's the example for how to do so. You can copy that sample and redefine it like this for example... DefaultCamelContext fooBlackBox = new DefaultCamelContext(registry); fooBlackBox.setName("fooBlackBox"); fooBlackBox.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { // receive foo and forward to bar from("direct:foo"). to("direct:bar"); } }); fooBlackBox.start(); registry.bind("someKey", fooBlackBox); I hope I understood you, else lets try again starting with what you want to accomplish. Taariq On Wed, Mar 13, 2013 at 12:35 PM, Sven Bauhan <s...@ast.dfs.de> wrote: > Ok now you lost me completely. > I do not understand what you want to tell me. > > Or did you just explain the source code in http://camel.apache.org/** > context.html <http://camel.apache.org/context.html> ? > > I already understood the code snippets in this explanation. But what is > missing for me, is how I can put it in a running context. > Is there a small example that I could investigate to understand how it > works? > > Thanks, Sven > > > On 03/11/13 14:45, Taariq Levack wrote: > >> Hi Sven >> >> Perhaps you've misunderstood the following... >> "Defining the context component" >> >> In this context(excuse me), what's meant is a bean definition. >> You should just use the DefaultCamelContext to define your own context, >> with it's own name as this one is blackbox, and it's own routes. >> >> Taariq >> >> >> On Mon, Mar 11, 2013 at 11:21 AM, Sven Bauhan <s...@ast.dfs.de> wrote: >> >> On 03/09/13 20:40, Henryk Konsek wrote: >>> >>> Hi Sven, >>>> >>>> I'm trying to build my own context component as described in >>>> >>>>> http://camel.apache.org/****context.html<http://camel.apache.org/**context.html> >>>>> <http://camel.**apache.org/context.html<http://camel.apache.org/context.html> >>>>> > >>>>> . >>>>> >>>>> Actually Context Component is ready to use out of the box. You don't >>>> need to create your own. Or if you have to, please share with us the >>>> reasoning behind this need. >>>> >>>> Best regards. >>>> >>>> No, you misunderstood me. I do not want to replace the Context >>>> Component >>>> >>> in Camel, but I need a class to define it. In the example the listing >>> shows >>> just the definition of the route without class or method. My questions >>> concers the place for the definition of DefaultCamelContext. Is there an >>> interface definition for a class containing a context component? >>> >>> Thanks, Sven >>> >>> >>> >