Select the GlassFish target running the application before creating proxy options. create-jvm-options defaults to the domain administration server; it also accepts an instance, cluster or named configuration. The default can therefore modify the wrong JVM.

For an illustrative named configuration app-config:

asadmin create-jvm-options --target app-config "-Dhttp.proxyHost=proxy.example:-Dhttp.proxyPort=8080:-Dhttps.proxyHost=proxy.example:-Dhttps.proxyPort=8080"

Substitute the target and endpoint; the HTTP proxy list supplies HTTP candidates for permitted public-target requests. The colon-separated argument contains four options. Host values are hostnames without URL prefixes. Java's separate HTTP/HTTPS properties describe destination protocols; an HTTPS target can still use a normal HTTP CONNECT proxy.

Inspect saved values with list-jvm-options for the same target. Review existing entries first: create does not recreate an identical option, so a successful command does not resolve conflicting values by itself.

Then inspect the running instance's effective properties and the actual HTTP client. GlassFish distinguishes options requiring restart from system properties it can update immediately. Follow the deployed release rather than an unconditional restart recipe; an existing client may retain its own route.

This method applies to clients honoring JVM networking properties. An explicit library proxy or separate transport needs its own supported setting, while incoming listeners are unrelated. Preserve required direct destinations in Java bypass policy. Adding arbitrary username/password JVM properties does not supply every client's proxy authentication.

Аффингæй хæстæг статьялтæ