users@glassfish.java.net

Re: Problem with http.proxyhostalut,

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 16 Apr 2008 10:26:27 -0400

Salut,

can you try adding:

<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>

in ${glassfish.home}/domains/domain1/config/domain.xml

Restart the server and see if you code works?

Thanks

-- Jeanfrancois

Olivier Liechti wrote:
> Hello,
>
> I have a Java EE application, with a JSF front-end. In a backing bean, I
> want to fetch a URL and need the possibility to set the http proxy at the
> application level. So, I tried the following:
>
> System.setProperty("http.proxySet", "true");
> System.setProperty("http.proxyHost", "myproxy.mynetwork.net");
> System.setProperty("http.proxyPort", "8080");
>
> URI uri = new URI("http", url, null);
> URL serviceUrl = uri.toURL();
> BufferedReader br = new BufferedReader(new
> InputStreamReader(serviceUrl.openStream()));
>
> I get a "java.net.ConnectException: Operation timed out" exception. I
> sniffed the network traffic with wireshark and observed that the HTTP
> request does NOT go through the proxy...
>
> What am I am missing?
>
> Many thanks and best regards,
>
> Olivier