On Wed, May 21, 2014 at 8:46 AM, cgiera <christoph.gi...@mic-cust.com> wrote: > We also tried > > bean(Myclass.class, "myMethod"); > bean(new Myclass(), "myMethod"); > beanRef(Myclass.class.getName(), "myMethod", false); > > They all don't work, the instance is everytime the same. > > Just for my understanding, I thought beanRef(...) will create a new instance > and bean(...) will create a "singleton". This assumption is not 100% correct > by me, or? > > I'll log a jira ticket. > I'll also try to apply a patch, but here I need short help: > As mentioned some posts above, if I change the RegistryBean.getBean() method > back to the version before CAMEL-6724 everything works fine again. > Do you think this is the place where the bug exists? If so, I'll investigate > and try to get the new version running. >
No the bean holder should be different that holds a reference to the class type, that way it becomes a prototype. And maybe the cache option needs to decide that too, so you can still refer to a type and have the instance created once and cached. > kind regards, > Christoph > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/beanRef-is-caching-instances-in-camel-2-13-0-unwanted-behavior-tp5751335p5751398.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/