On May 19, 2014, at 7:15 AM, Michael <[email protected]> wrote:
> Aki Yoshida-3 wrote >> I was wondering why you can't (or don't want to) configure the >> http.proxy setting once per VM. > > Some connections are with applications in external networks - here we need > the proxy - and some with others in the same network. Also, our web app may > invoke itself in certain scenarios. Our idea is to avoid the proxy (and the > reverse proxy) as a means of optimization in cases were connections are > rather "internal". Leaving that aside, we could well configure the proxy > setting per VM. > > As to your suggested solution, I'm wondering wether proxy settings take > effect before or after the client stub is created. Setting the proxy using > HTTPClientPolicy has never been a problem. It's only that accessing the WSDL > when the client stub is instantiated (new EksService(wdslUrl)) fails and > I've found no way to set the proxy on a per-instance basis to deal with that > case. The only ways to do that are: 1) Via spring or blueprint xml config 2) Via the OSGi config admin service (in OSGi) 3) A custom Configurer object. For (3), you can grab the bus.getExtension(Configurer.class) and wrapper it with a new on that checks the bean passed in to see if it’s an HTTPConduit and if so, reconfigure based on whatever else you need. Set your wrapper back in via bus.setExtension(….) -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
