Question

I'm trying to use an aliased password as a jvm arg, but the aliased password does not seem to be provided to the web app. Here is my domain.xml config:

<jvm-options>-Dmy_password=${ALIAS=my_password_alias}</jvm-options>

However, trying to retrieve the password just returns null

String password = System.getEnv("my_password"); // returns null

and

String password = System.getProperty("my_password"); // returns "${ALIAS=my_password_alias}"

I've tried on: GlassFish Server Open Source Edition 3.1.2.2 (build 5)

Searching online it seems someone else has run into a similar issue

Question: does glassfish support password aliases for jvm args?

Was it helpful?

Solution

It works, just use System.getProperty("my_password").

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top