Hi If you mix url and then mutate the endpoint, then those changes are on the same instance.
If you want to configure an endpoint using java only, then use the new constructor, and then there is a addEndpoint on CamelContext if you want to register it in the Camel endpoint registry. That would require an "url" as the key for the endpoint. On Tue, Jul 15, 2014 at 11:35 AM, dermoritz <[email protected]> wrote: > I just stumbled across a problem: > https://issues.apache.org/jira/browse/CAMEL-7599 (i created it) > > It took me hours to figure out that setters on an endpoint acquired like > this > LogEndpoint endpoint = context.getEndpoint("log:tplogger", > LogEndpoint.class); > > won't work a call of > endpoint.setGroupSize(10); > is silently ignored. It seems to be fixed in 2.14 -thanks! > > Because I encountered similar problems with other endpoints (e.g. ftp with > idempotent setters, other setters seem to work). Is there a way to > know/check/debug if a setter will work. The setters in endpoints i created > and many others just work. So there must be a special mechanism that handles > the setup of some endpoints?! > > And most important does the fix of CAMEL-7599 applies only to LogEndpoint or > also other endpoints? > > Because most camel examples use uri strings to set up endpoints (also in > java examples) and i don't know why i have to mention that: > Using setters instead of strings in uri has two big advantages: the compiler > checks them (name and type) and the IDE has auto-complete. Copying > parameters from example sites and checking for typos in every uri is always > a pain. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/About-acquiring-endpoints-and-using-setters-on-them-tp5753830.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
