9.1Changes
Coming Soon
The following table shows timing results of New code versus Old code. Quick refers to the quick-startup option. Six trials were done and an average calculated. The data was generated on a Solaris 10 system with this command:
The following table is from data collected from a Windows XP desktop system (1 GB RAM)
Background
Starting and Stopping Server InstancesRef: http://wikis.sun.com/download/attachments/211392120/admin-fs.html#pl The one-pager simplifies the process of starting and stopping servers. This article goes into a bit more depth. A Process View of Starting (non-native)
The startup procedure is quite complex. It is extremely difficult to debug because of the extra JVM in the middle. The startserv script is potentially confusing to a user and is vulnerable if edited. For V2, the middle JVM will be eliminated. The instance JVM will be started directly by asadmin or by other running Java programs.
1. Take over Middle VM responsibilities 2. Modify startserv script
ShutdownThis is a ripe area for improvement. The stopping of instances is far too complex. The starting code is super-complex and needs to be because the instance has to run in an elaborately configured JVM environment. E.g. special JVM options have to be parsed from domain.xml and used to start the instance-JVM. Stopping the instance, conversely, should be much simpler since its job is to shutdown running objects. It is not neccessary and a waste of time and resources to build intricately configured JVMs to stop an instance. This is a classic example of questionable code reuse. The super-complex starting code was reused to stop instances. Here is an example of how this approach can bite: https://github.com/javaee/glassfish/issues/949. We propose simplifying stop and undoing the common code between start and stop. VM Creation command issued by Startserv scriptNote that all system properties are passed through to the final AS JVM except:
"C:\jdk\bin\java" -cp "c:\ee\lib\appserv-rt.jar";"c:\ee\lib\appserv-admin.jar";"c:\ee\lib\javaee.jar" *** -DCATALINA_OPTS="" %% -Dcom.sun.aas.configRoot="c:/ee/config" -Dcom.sun.aas.installRoot="c:\ee" -Dcom.sun.aas.instanceName="server" -Dcom.sun.aas.instanceRoot="C:\ee\domains\domain1" *** -Dcom.sun.aas.launcherReturn="return" -Dcom.sun.aas.processLauncher="SE" *** -Dcom.sun.aas.processName="as9-server" -Dcom.sun.aas.promptForIdentity="true" -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Ddomain.name="domain1" -Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager -DJAVA_HOME="C:\jdk" com.sun.enterprise.tools.launcher.ProcessLauncher start debug verbose VM Creation command issued by ProcessLauncher
C:/jdk\bin\java -client -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009 -Xmx512m -XX:NewRatio=2 -Dcom.sun.aas.classloader.appserverChainJars.ee= -Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,dbschema.jar,j2ee-svc.jar -Dcom.sun.aas.classloader.optionalOverrideableChain.ee= -Dcom.sun.aas.classloader.optionalOverrideableChain=webservices-rt.jar,webservices-tools.jar,appserv-ws.jar,commons-logging.jar,commons-launcher.jar -Dcom.sun.aas.classloader.serverClassPath.ee=c:/ee/hadb/4.5.0-9/lib/hadbjdbc4.jar,c:/ee/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,c:/ee/hadb/4.5.0-9/lib/dbstate.jar,c:/ee/hadb/4.5.0-9/lib/hadbm.jar,c:/ee/hadb/4.5.0-9/lib/hadbmgt.jar,c:/ee/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar -Dcom.sun.aas.classloader.serverClassPath=c:/ee/lib/install/applications/jmsra/imqjmsra.jar,c:/ee/imq/lib/jaxm-api.jar,c:/ee/imq/lib/fscontext.jar,c:/ee/imq/lib/imqbroker.jar,c:/ee/imq/lib/imqjmx.jar,c:/ee/lib/ant/lib/ant.jar,c:/ee/lib/SUNWjdmk/5.1/lib/jdmkrt.jar -Dcom.sun.aas.classloader.sharedChainJars.ee=appserv-se.jar,appserv-ee.jar,c:/ee/hadb/4.5.0-9/lib/dbstate.jar,c:/ee/hadb/4.5.0-9/lib/hadbjdbc4.jar,jgroups-all.jar,c:/ee/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar -Dcom.sun.aas.classloader.sharedChainJars=javaee.jar,C:/jdk/lib/tools.jar,install/applications/jmsra/imqjmsra.jar,commons-launcher.jar,c:/ee/imq/lib/jaxm-api.jar,c:/ee/imq/lib/fscontext.jar,c:/ee/imq/lib/imqbroker.jar,c:/ee/imq/lib/imqjmx.jar,c:/ee/imq/lib/imqxm.jar,c:/ee/lib/ant/lib/ant.jar,webservices-rt.jar,webservices-tools.jar,appserv-ws.jar,mail.jar,jsf-api.jar,jsf-impl.jar,appserv-jstl.jar,appserv-env.jar,jmxremote_optional.jar,c:/ee/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,commons-logging.jar,activation.jar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar -Dcom.sun.aas.ClassPathPrefix=c:/ee/lib/webservices-rt.jar;c:/ee/lib/webservices-tools.jar -Dcom.sun.aas.ClassPathSuffix= -Dcom.sun.aas.configName=server-config -Dcom.sun.aas.configRoot=c:/ee/config -Dcom.sun.aas.defaultLogFile=C:/ee/domains/domain1/logs/server.log -Dcom.sun.aas.domainName=domain1 -Dcom.sun.aas.installRoot=c:/ee -Dcom.sun.aas.instanceName=server -Dcom.sun.aas.instanceRoot=C:/ee/domains/domain1 -Dcom.sun.aas.jdwpOptions=transport=dt_socket,server=y,suspend=n,address=9009 -Dcom.sun.aas.processLauncher=SE -Dcom.sun.aas.promptForIdentity=true -Dcom.sun.aas.ServerClassPath= -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Dcom.sun.enterprise.overrideablejavaxpackages=javax.xml.bind,javax.help,javax.portlet -Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar -Dcom.sun.enterprise.taglisteners=jsf-impl.jar -Dcom.sun.enterprise.websvc.useJAXWSRearch=true -Ddomain.name=domain1 -Djava.endorsed.dirs=c:/ee/lib/endorsed -Djava.ext.dirs=C:/jdk/jre/lib/ext;C:/ee/domains/domain1/lib/ext;c:/ee/javadb/lib -Djava.library.path=c:\ee\lib;c:\ee\lib;C:\jdk\bin;.;C:\WINDOWS\system32;C:\WINDOWS;c:\ee\lib;c:\ee\bin;c:\jdk\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\bin;c:\bnbin;C:\DEV\MKS\bin;C:\DEV\MKS\bin\x11;C:\DEV\MKS\mksnt;c:\apps\cvs\bin;c:\batch;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:\Apps\Executive Software\Diskeeper;c:\ee\bin;C:\dev\vc6\common\Tools\WinNT;C:\dev\vc6\common\MSDev98\Bin;C:\dev\vc6\common\Tools;C:\dev\vc6\VC98\bin;c:\dev\maven\bin;C:\Apps\Executive Software\Diskeeper;c:\dev\ant\bin;c:\temp\ee\bin -Djava.security.auth.login.config=C:/ee/domains/domain1/config/login.conf -Djava.security.policy=C:/ee/domains/domain1/config/server.policy -Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager -Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder -Djavax.net.ssl.keyStore=C:/ee/domains/domain1/config/keystore.jks -Djavax.net.ssl.trustStore=C:/ee/domains/domain1/config/cacerts.jks -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -Djmx.invoke.getters=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -cp ;c:/ee/lib/appserv-launch.jar com.sun.enterprise.server.PELaunch start debug Time to start PE domain on my feeble HP system (Windows) via CLI 10.9, 14.4, 14.4, 10.3, 13.8,15.0,15.3,14.4,15.3,14.6,9.9 Time to start PE domain on my feeble HP system (Windows) via new improved startserv script 6.0, 5.8, 5.9, 5.9, 5.8, 5.9, 5.9, 5.8, 5.8, 5.9, 5.9
Before
C:\jws\glassfish\admin\servermgmt>asadmin start-domain Starting Domain domain1, please wait. Log redirected to c:\ee\domains\domain1\logs\server.log. Domain domain1 is ready to receive client requests. Additional services are being started in background. Domain [domain1] is running [Sun Java System Application Server Platform Edition 9.1 (build )] with its configuration and logs at: [c:\ee\do mains]. Admin Console is available at [http://localhost:4848]. Use the same port [4848] for "asadmin" commands. User web applications are available at these URLs: [http://localhost:8080 https://localhost:8181 ]. Following web-contexts are available: [/web1 /asadmin ]. Standard JMX Clients (like JConsole) can connect to JMXServiceURL: [service:jmx:rmi:///jndi/rmi://hp:8686/jmxrmi] for domain management purposes. Domain listens on at least following ports for connections: [8080 8181 4848 3700 3820 3920 8686 ]. Time to start domain: 15.8 seconds. The following table shows timing results of New code versus Old code. Quick refers to the quick-startup option. Six trials were done and an average calculated. The data was generated on a Solaris 10 system with this command:
The following table is from data collected from a Windows XP desktop system (1 GB RAM)
|
C:\jws\glassfish\admin\servermgmt>asadmin start-domain Starting Domain domain1, please wait. Log redirected to c:\ee\domains\domain1\logs\server.log. Domain domain1 is ready to receive client requests. Additional services are being started in background. Domain [domain1] is running [Sun Java System Application Server Platform Edition 9.1 (build )] with its configuration and logs at: [c:\ee\domains]. Admin Console is available at [http://localhost:4848]. Use the same port [4848] for "asadmin" commands. User web applications are available at these URLs: [http://localhost:8080 https://localhost:8181 ]. Following web-contexts are available: [/web1 /asadmin ]. Standard JMX Clients (like JConsole) can connect to JMXServiceURL: [service:jmx:rmi:///jndi/rmi://hp:8686/jmxrmi] for domain management purposes. Domain listens on at least following ports for connections: [8080 8181 4848 3700 3820 3920 8686 ]. Time to start domain: 15.8 seconds.
C:\jws\glassfish\admin\servermgmt>cli start-domain Starting Domain domain1, please wait. Log redirected to c:\ee\domains\domain1\logs\server.log. Domain domain1 is ready to receive client requests. Additional services are being started in background. Domain [domain1] is running [Sun Java System Application Server Platform Edition 9.1 (build )] with its configuration and logs at: [c:\ee\domains]. Admin Console is available at [http://localhost:4848]. Use the same port [4848] for "asadmin" commands. User web applications are available at these URLs: [http://localhost:8080 https://localhost:8181 ]. Following web-contexts are available: [/web1 /asadmin ]. Standard JMX Clients (like JConsole) can connect to JMXServiceURL: [service:jmx:rmi:///jndi/rmi://hp:8686/jmxrmi] for domain management purposes. Domain listens on at least following ports for connections: [8080 8181 4848 3700 3820 3920 8686 ]. Time to start domain: 1.5 seconds.
C:\jws\glassfish\admin\servermgmt>cli start-domain Starting Domain domain1, please wait. Log redirected to c:\ee\domains\domain1\logs\server.log. Domain domain1 is ready to receive client requests. Additional services are being started in background. Domain [domain1] is running [Sun Java System Application Server Platform Edition 9.1 (build )] with its configuration and logs at: [c:\ee\d mains]. Admin Console is available at [http://localhost:4848]. Use the same port [4848] for "asadmin" commands. User web applications are available at these URLs: [http://localhost:8080 https://localhost:8181 ]. Following web-contexts are available: [/web1 /asadmin ]. Standard JMX Clients (like JConsole) can connect to JMXServiceURL: [service:jmx:rmi:///jndi/rmi://hp:8686/jmxrmi] for domain management purposes. Domain listens on at least following ports for connections: [8080 8181 4848 3700 3820 3920 8686 ]. Time to start domain: 1.5 seconds.