admin@glassfish.java.net

-Xrs option to servers and asadmin[.bat]

From: Bhakti Mehta <bhakti.mehta_at_oracle.com>
Date: Thu, 10 Mar 2011 13:44:48 -0800

Hi all,
I started noticing a wierd behaviour in my trunk workspace after march
4. As soon as I start the domain it says it is started but I cannot see
the process in jps nor can I invoke any commands after that.
I looked more and saw there was a commit to add -Xrs option to asadmin
which is needed for Platform services surviving loggoff. If I remove
this option in asadmin it works fine but otherwise I see the problem. I
am on a mac.
I tried the same zip on my hosted machine that worked fine.
So seems like this is a mac specific issue but I was wondering how no
one else saw this.

Please can you let me know if there is a workaround to this?
Regards,
Bhakti

Here is an example
/Users/bhakti/gftest/del10/glassfish3/glassfish/bin % ./asadmin
start-domain domain1
Waiting for domain1 to start .....
Successfully started the domain : domain1
domain Location:
/Users/bhakti/gftest/del10/glassfish3/glassfish/domains/domain1
Log File:
/Users/bhakti/gftest/del10/glassfish3/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.



/Users/bhakti/gftest/del10/glassfish3/glassfish/bin % ./asadmin deploy
Remote server does not listen for requests on [localhost:4848]. Is the
server up?
Unable to get remote commands.
Closest matching local command(s):
    help
Command deploy failed.






attached mail follows:



Project: glassfish
Repository: svn
Revision: 45384
Author: bnevins
Date: 2011-03-03 18:44:52 UTC
Link:

Log Message:
------------
Added -Xrs option to servers and asadmin[.bat]
This means all signals are ignored.
Without this, the server stops when the user logs out.

http://java.net/jira/browse/GLASSFISH-16140





Revisions:
----------
45384


Modified Paths:
---------------
trunk/v3/packager/nucleus-base/lib/templates/domain.xml
trunk/v3/packager/nucleus-base/bin/asadmin.bat
trunk/v3/packager/nucleus-base/bin/asadmin


Diffs:
------
Index: trunk/v3/packager/nucleus-base/lib/templates/domain.xml
===================================================================
--- trunk/v3/packager/nucleus-base/lib/templates/domain.xml (revision 45383)
+++ trunk/v3/packager/nucleus-base/lib/templates/domain.xml (revision 45384)
@@ -185,6 +185,7 @@
         <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
         <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
         <jvm-options>-Xmx512m</jvm-options>
+ <jvm-options>-Xrs</jvm-options>
         <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
         <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
         <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
@@ -370,6 +371,7 @@
              <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
              <jvm-options>-XX:NewRatio=2</jvm-options>
              <jvm-options>-Xmx512m</jvm-options>
+ <jvm-options>-Xrs</jvm-options>
              <!-- Configure post startup bundle list here. This is a comma separated list of bundle sybolic names.
                   The remote shell bundle has been disabled for cluster and remote instances. -->
              <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall</jvm-options>
Index: trunk/v3/packager/nucleus-base/bin/asadmin.bat
===================================================================
--- trunk/v3/packager/nucleus-base/bin/asadmin.bat (revision 45383)
+++ trunk/v3/packager/nucleus-base/bin/asadmin.bat (revision 45384)
@@ -54,4 +54,4 @@
 :UsePath
 set JAVA=java
 :run
-%JAVA% -jar "%~dp0..\modules\admin-cli.jar" %*
+%JAVA% -Xrs -jar "%~dp0..\modules\admin-cli.jar" %*
Index: trunk/v3/packager/nucleus-base/bin/asadmin
===================================================================
--- trunk/v3/packager/nucleus-base/bin/asadmin (revision 45383)
+++ trunk/v3/packager/nucleus-base/bin/asadmin (revision 45384)
@@ -51,4 +51,4 @@
 if [ ${AS_JAVA} ]; then
     JAVA=${AS_JAVA}/bin/java
 fi
-exec "$JAVA" -jar "$AS_INSTALL_LIB/admin-cli.jar" "$@"
+exec "$JAVA" -Xrs -jar "$AS_INSTALL_LIB/admin-cli.jar" "$@"