dev@glassfish.java.net

Re: Another weird admin (?) problem

From: Ken <ken.cavanaugh_at_oracle.com>
Date: Tue, 25 Jan 2011 16:05:19 -0800

On 01/25/11 03:52 PM, Jennifer Chou wrote:
> So users will have problems with load-balancing if they use
> --systemproperties with create-instance/create-local-instance (unless
> they define all the ports in the system properties)?
>
> If so, then maybe we should try to fix
> http://java.net/jira/browse/GLASSFISH-15683 for 3.1.
>

Yes, that's what it looks like to me. ANY use of --systemproperties on
create-instance will apparently
cause the error, with the result that any code attempting to read the
admin ports in the new instance
will get the default values from the cluster config instead of the
server instance values. This may
well affect things other than IIOP FOLB, but of course I haven't tried
testing other features this way.
For example, I know that Server.isRunning fails for the same reason:
getting the wrong value for the
admin port from (I guess from a system property somewhere in the code).

Obviously this could also give quite a few nasty surprises to any
hapless user that attempts to
set some application-specific system property on a create-instance command.

It seems to me that there are a few reasonable choices for 3.1:

   1. Fix the bug (always the best option)
   2. Make sure that create-instance --system-properties actually does a
      separate create-system-properties command (I don't know if that is
      reasonable or not).
   3. Disable/remove the --system-properties option for create-instance
      commands.
   4. Release note this and hope that developers don't get a nasty surprise.

Obviously it's not my call as to whether to fix this or not. I'd
certainly lean in the direction
of either fixing the underlying problem or preventing it from happening
(any of options 1-3).

Ken.