This content has been marked as final. Show 3 replies
Been awhile since I've used Java, but IIRC Java's proxy settings are sysprops. That is, you don't have to pass them to constructors or methods, you can set them globally. See https://developers.google.com/gdata/articles/proxy_setup, for example.
Thank you for your response, however this will make all connections in the server pass through that proxy which is not something that I want (internal communications, etc.).
Does you know if Marketo itself has proxy support?
@Ken C You're not actually fixing the proxy for all connections as you would if you started the JVM that way. You're still making the changes at runtime and can reset the proxy settings afterward (controlling for multithreading of course).
Alternately you could implement proxySelector as at http://docs.oracle.com/javase/1.5.0/docs/guide/net/proxies.html.
I don't think the Marketo Java bundle has any special support for proxies, so you have to extend it. You can search the source code if you're not sure!