users@glassfish.java.net

Re: start glassfish programatically

From: <glassfish_at_javadesktop.org>
Date: Tue, 18 Dec 2007 18:16:47 PST

amdario,

Good thoughts. But those classes can't be directly used to "start" the server. We are in the process
of doing this better, but as of now, you should resort to either asadmin way, or asant way.

Regarding passwords, there are few things you can do:
- Take a look at: "asadmin login" or "asadmin create-domain --savelogin". The default "domain"
  that's created for you in GlassFish (when you do "ant -f setup.xml"), you automatically log into
  it using admin user = admin and admin password = "adminadmin". When such an try exists in
  a file called .asadminpass in your home folder, the start-domain process won't require user
  name and password, but it will be taken from this file. This file stores *encoded* user name and
  password. It is safe so to speak because the permissions on this file on *nix platforms are 0600
  which means it is readable only to you.

Please see: http://docs.sun.com/app/docs/doc/819-3662/6n5s9hn1l?a=view for details.

Regards,
Kedar
[Message sent by forum member 'km' (km)]

http://forums.java.net/jive/thread.jspa?messageID=250672