|
Home > Archive > WebSphere Application Server > August 2007 > Setting up Application Environment Variables in WAS 6.1
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Setting up Application Environment Variables in WAS 6.1
|
|
|
| I have installed a vendor app in WAS 6.1.0.1 ND.
This app needs (in every Member/app server) some environment variables set.
If I have these set in a shell and I start up the member from that shell, the app works. But if I start up the member(s) using the Integrated Solution Console, the app is missing the env. vars.
I've tried setting name-value pairs in the member's process definition->JVM->Custom Properties section. But they are not being taken.
Where is the correct place in WAS to set name-value pairs that will look like simple shell environment variables to the applications in the app server regardless of how they were started?
TIA, Greg
| |
| Doug Breaux 2007-08-17, 1:23 pm |
| gkanders@us.ibm.com wrote:
> I have installed a vendor app in WAS 6.1.0.1 ND.
>
> This app needs (in every Member/app server) some environment variables set.
>
> If I have these set in a shell and I start up the member from that shell, the app works. But if I start up the member(s) using the Integrated Solution Console, the app is missing the env. vars.
>
> I've tried setting name-value pairs in the member's process definition->JVM->Custom Properties section. But they are not being taken.
>
> Where is the correct place in WAS to set name-value pairs that will look like simple shell environment variables to the applications in the app server regardless of how they were started?
>
> TIA, Greg
I can't answer the last question off the top of my head, but you can get what
you want by making sure that you set the environment variables in
setupCmdLine.sh and restart your NodeAgent to pick up the variables. Then
restarts done from the console will also pick up the variables.
--
Doug
| |
| Anant M 2007-08-17, 1:23 pm |
| You may want to set up these name pair values in the following location.
Application servers > Server Name > Process Definition > Environment Entries
I have configured a vendor app which requires some values in the environment and it works fine for me.
Thanks
Anant
| |
| Yuriy Petrov 2007-08-17, 1:23 pm |
| gkanders@us.ibm.com wrote:
> I have installed a vendor app in WAS 6.1.0.1 ND.
>
> This app needs (in every Member/app server) some environment variables set.
>
> If I have these set in a shell and I start up the member from that shell, the app works. But if I start up the member(s) using the Integrated Solution Console, the app is missing the env. vars.
>
> I've tried setting name-value pairs in the member's process definition->JVM->Custom Properties section. But they are not being taken.
>
> Where is the correct place in WAS to set name-value pairs that will look like simple shell environment variables to the applications in the app server regardless of how they were started?
>
> TIA, Greg
Does the application contain/use native code other than JVM itself (some .so's/.dll's which are
either shipped with the app, or are required to be provided outside the .ear)? If so, then this may
be the explanation - the native code directly asks OS (like C's "char *getenv(const char *NAME);")
for the env.var that it needs. In that case the WAS's environment variables won't work.
| |
|
| Thanks for the reply. I actually (as a stop-gap) had put them in $WAS_HOME/bin/startServer.sh, and that worked with console restarts, etc.
I do want to avoid modifying the scripts if possible, because I might eventually need different values for different servers. And we do have a separtate group here who wants to own/maintain the WAS installations. I don't want to have something stop work
ing if they upgrade and overwrite the scripts.
Anyway, thanks, I'll use the script if I can't get a setting in the console to work.
Greg
| |
|
| Thanks for the suggestion. I had previously tried 3 or 4 different properties settings, but don't remember if this was one. So I'll try this.
Thanks, Greg
| |
|
| Hi.
Thanks for the info.
It's not clear to me that this is the case, because there are external files, but they are JAR files (foundation classes for the app) and one of the env. vars points at these. But I also need LIBPATH and LC_ALL=C, so those may be calling the OS directly.
I the previous suggestion doesn't work, at least this would be a reasonable explination.
G
| |
|
| Thank You! This seems to be working.
I had tried a number of locations, but this is the magic one.
Thanks Again. Greg
|
|
|
|
|