dev@glassfish.java.net

Re: Glassfish functions?

From: k0nsuli <k0nsuli_at_konsulaatti.com>
Date: Wed, 15 Nov 2006 12:03:49 +0200

Kohsuke Kawaguchi wrote:
>
> One of the issues is that on Windows I can get the exit code from
> asadmin. If I were to be able to invoke asadmin JVM process directly
> (or better yet GF process directly), instead of going through the
> script, then we could have avoided such a problem altogether.
I did some tests and managed to start the GF server without asadmin.bat.
I read and set system properties from the processLauncher.xml and after
that invoked the com.sun.enterprise.server.PELaunch.main directly. I
used the as9-server process element. The server started fine but it
didn't work properly because some of the system properties that the
server needs are in the domain.xml file. I am trying to find out what
information I should parse from the domain.xml and after that I think
that the server can be started directly using your own thread. I also
believe that you can stop the server using PELaunch. All this is a best
guess because the startup process is complex and it's hard to learn it
just using the source code. Any comments about this?

Kohsuke, if manage to get all this working I will gladly share the
source code. I don't know if this is exactly what you need, but maybe it
could help you with the Cargo project.
>
>
Perhaps somebody could help me with these problems:

* I noticed that there is a property called
com.sun.aas.promptForIdentity in processLauncher.xml which default value
is "true". I changed that to "false" and nothing happened, but when I
did not set it, no username or password was asked during the startup.
What is the purpose of that property and should work like that?

* For some reason I lose the System.out when the server starts. So, what
happens and how can I use the System.out?