For component options just add getter/setters so they are configured using java bean style.
So if ppl use spring xml then they can setup the component <bean id="foo" class="...FooComponent"> <property name="someOption" value="someValue"/> <property name="someOption" value="someValue"/> <property name="someOption" value="someValue"/> </bean> On Thu, Jul 28, 2011 at 4:36 PM, E.Gherardini <e.gherard...@hotmail.com> wrote: > Hi, > in my component (for oracle coherence distributed cache) I have different > type of parameters: > > 1) parameters related to the endpoint (e.g. like the SedaComponent > "concurrentConsumers"): these parameters are the ones that I would like an > user configure inside the endpoint URI (as happens in the SedaComponent) and > that can change between different endpoints. > > 2) parameters related to the compontent itself, that must be shared between > different endpoint (ideally they should be set at component creation time), > and that I do not want an user to be able to change in an endpoint-URI (e.g. > the cache cluster IP/port, these MUST be the same between different > endpoints, or the endpoints will not be connected between them) or after the > component is created. > > To my understanding, the best way is: > > 1) for these parameters, parse the endpoint URI (as the SedaComponent does) > > 2) for these parameters, provide a constructor argument: but in this way, if > the default constructor is invoked by Camel, I can't find a way to force > Camel to reuse the already provided values. > > > I hope to get some hints from you ;) > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-correctly-handle-Component-parameters-tp4642932p4642932.html > Sent from the Camel Development mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/