users@glassfish.java.net

Re: asadmin changes in v2.1 effect return status of some commands?

From: Sankar Neelakandan <Sankar.Neelakandan_at_Sun.COM>
Date: Tue, 27 Jan 2009 13:32:45 -0800

Alex,
      I do get a correct exit code when creating domain using cli. In
your case do you get different exit codes in cli and in Process.execute
( ) ?. Could you please confirm ?.

bash-3.00# bin/asadmin create-domain --adminport 4848 domain123
Please enter the admin user name>admin
Please enter the admin password>
Please enter the admin password again>
Please enter the master password [Enter to accept the default]:>
Please enter the master password again [Enter to accept the default]:>
Using port 4848 for Admin.
Using default port 8080 for HTTP Instance.
Using default port 7676 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Using default port 8686 for JMX_ADMIN.
Domain being created with profile:enterprise, as specified by variable
AS_ADMIN_PROFILE in configuration file.
Security Store uses: NSS
Domain domain123 created.

bash-3.00# echo $?
0

-Sankar


Alex Sherwin wrote:
> We've got some custom Java classes that wrap the asadmin executable
> and are used to install and configure domains for our distributions in
> an distributable JAR.
>
> Previously, the only asadmin command that did not return normally was
> "start-domain", which was OK... we just slept for 30 seconds to ensure
> the domain started up before proceeding.
>
> However, now it appears that "create-domain" no longer returns with a
> normal exit status either. IE "p.waitFor();" where p is a Process
> Object never returns.
>
> Again, we can simply not wait for this command and sleep for X amount
> of time... but is there a specific reason why some asadmin commands
> simply do not return normally?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>