|
From: Leif M. <le...@ta...> - 2003-10-18 16:50:14
|
Eric,
Thanks for the patch. I got it committed. There was a typo that
was preventing
the latest environment variable values from being loaded from the
registry. *envKeys
was being tested against NULL to see if the calloc was successful. But
it should have
just been envKeys (without the '*') My tests show that this change to
your patch is
correct, but can you confirm this just in case I am missing something?
If you rerun the test, you should now see the environment variables
being loaded in
from the registry. They will be in their raw unexpanded format. That
is what the
following loop is there for. It goes through and expands variables
iteratively until it
reaches a point where they are all expanded. This process will only
happen once
when the Wrapper is first started, even if the JVM is restarted one or
more times.
----
envKeysCount = dwIndex;
}
< if (*envKeys != NULL) {
dwIndex = 0;
----
envKeysCount = dwIndex;
}
> if (envKeys != NULL) {
dwIndex = 0;
----
The point of that whole block of code is to load the environment
variables from the
registry so that are made available to the wrapper when run as a
service. If this is not
done then the user would be required to reboot the machine in order to
make system
level environment variable changes available to the service. That was a
major PITA
even if it is a norm for Windows(tm) users. So I added that little work
around. :-)
Things have always worked fine for me, so I am glad you spotted
this. It would have
been quite difficult for me to track down.
>Last evening I was trying to get our 7 services running under WinXP and discovered something that may be the underlying cause of a large number of problems on the Windows platforms.
>
>
I am not sure that the original problem you were replying to is caused
by this however.
I am waiting for a log file as it looks like a standard environment
problem. I'll be able
to tell for sure when I get the log.
What were the problem(s) that you had been seeing that led you to look
for, and
then fix this? As I said, I had never seen any problems arise due to
the misuse of
the putenv function and would like to understand the symptoms so I can
answer
questions posed by other users. I also want to describe the problem
being solved
in the release notes.
Thanks again for taking the time to make the patch.
Cheers,
Leif
|