Hi, This is Spring? Can you send us the Maven example reproducing the issue?
Cheers! wt., 5.05.2015 o 15:01 użytkownik bocamel <johnz...@gmail.com> napisał: > Because groovy script called by Camel cannot be debugged under IDE, I > created > my script as a hybrid so I can easily switch it between the bean mode and > script mode: > //================== > class GroovyProc4 { > @BeanInject('myConfig') > MyConfig myConfig > > public void process(Exchange exchange) { > println(myConfig?.name) > } > } > > def GroovyProc4 mybean = new GroovyProc4() > //mybean.myConfig = MyConfig.getInstanceFromRegistry(exchange.context, > "myConfig") > mybean.process(exchange) > //================== > > In the following route, I can choose to run the above processor as a script > or bean. > <camel:route autoStartup="true"> > <camel:from uri="timer://test?period=10s"/> > <camel:to uri="bean:groovyProc4" /> > > </camel:route> > > But when I ran it as a script, the @BeanInject in the class was ignored and > I would have to explicitly initialize the member property myConfig by > retrieving the value from Registry (in the commented out statement in the > script above). Is this the expected behavior? Thanks for any help! > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/BeanInject-ignored-in-Groovy-when-called-as-a-script-tp5766708.html > Sent from the Camel - Users mailing list archive at Nabble.com. >