update a payara jndi variable using asadmin

111 views Asked by At

I want to update a jndi variable testVar on my payara server that is a string type via the command line.

I see this online site https://docs.oracle.com/cd/E19798-01/821-1751/giwlk/index.html showing the following example of how to update but it looks confusing:

asadmin> set server.resources.custom-resource.custom
/my-custom-resource.property.value=2010server.resources.custom-resource.custom
/my-custom-resource.property.value=2010

It looks like a mix/mash of 3 different commands. I've tried some variations and keep getting this error:

remote failure: invalid name value pair server.resources.custom.custom-resource.myresource. Missing expected equal sign

1

There are 1 answers

0
CAMD_3441 On

Finally figured it out. The command to update a jndi variable is:

asadmin> set server.resources.custom-resource.testVar.property.value=HelloWorld

I then get a Command set executed successfully on the command line.

Note you can change the testVar above with whatever jndi variable name you have and update its property.value to the value you want.

Now when I go to the payara web console I can see that updated value.