#SOF#
1. start/stop server
(asssume glassfish is installed to /usr/local/glassfish). The default domain created by the installer is ''domain1''
bash $ /usr/local/glassfish/bin/asadmin start-domain domain1
bash $ /usr/local/glassfish/bin/asadmin stop-domain domain1
2. JProfiler integration
create a copy of the asadmin script and enure that the jprofiler lib directory for the relevant architecture is added to LD_LIBRARY_PATH. E.g., if the architecture is linux-x86 and JProfiler is installed to /usr/local/jprofiler6, then:
bash $ cp /usr/local/glassfish/bin/asadmin /usr/local/glassfish/bin/asadmin_jprofiler.sh
then edit /usr/local/glassfish/bin/asadmin_jprofiler.sh and add the line
LD_LIBRARY_PATH=/home/jprofiler/jprofiler6/bin/linux-x86:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
next, edit the domain.xml for the relevant server domain. E.g., if integrating jprofiler to use ''domain1'', then edit
/usr/local/glassfish/domains/domain1/config/domain.xml
then locate the ''<java-config ...'' section and add the following:
<profiler enabled="true" name="JProfiler">
<jvm-options>-agentpath:/usr/local/jprofiler6/bin/linux-x86/libjprofilerti.so=port=8849,nowait,id=113,config=/home/foo/.jprofiler6/config.xml</jvm-options>
</profiler>
e.g., the results will look something like
<java-config ... >
<profiler enabled="true" name="JProfiler">
<jvm-options>-agentpath:/usr/local/jprofiler6/bin/linux-x86/libjprofilerti.so=port=8849,nowait,id=113,config=/home/foo/.jprofiler6/config.xml</jvm-options>
</profiler>
<jvm-options ...>
...
</java-config>
3. glassfish v2
installation (app bundle comes with ant, be sure to set ANT_HOME and chmod ant binaries as executable):
bash $ wget sun.com/downloads/glassfish-installer-v2.1.1-b31g-linux.jar
bash $ java -Xmx256M -jar glassfish-installer-v2.1.1-b31g-linux.jar
bash $ cd ./glassfish
bash $ ant -f setup.xml
*** NOTE: the default admin user is 'admin' and the default password is 'adminadmin' ***
These variables are defined in setup.xml
3.b. glassfish ports
Installer (for glassfish v2) reports:
create.domain:
[exec] Using port 4848 for Admin.
[exec] Using port 8080 for HTTP Instance.
[exec] Using port 7676 for JMS.
[exec] Using port 3700 for IIOP.
[exec] Using port 8181 for HTTP_SSL.
[exec] Using default port 3820 for IIOP_SSL.
[exec] Using default port 3920 for IIOP_MUTUALAUTH.
[exec] Using default port 8686 for JMX_ADMIN.
3.c start/stop (same as for v3)
The default domain created during installation is ''domain1''. The domain name can be passwd to start/stop command:
bash $ /usr/local/glassfish/bin/asadmin start-domain domain1
bash $ /usr/local/glassfish/bin/asadmin start-domain domain1
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs)] with its configuration and logs at: [/usr/local/glassfish-2.1.1/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 /__wstx-services ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://dogpaw:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
4. Security
The default admin username for the Glassfish admin console in both v2 and v3 is admin. However, the default password for v2 is adminadmin and for v3 is set during setup but is typically admin.
Each domain has a admin-keyfile which defines the admin username and admin password. This file is located in the domain config directory (e.g., for a domain called domain1, this is $GLASSFISH_HOME//domains/domain1/config/admin-key-file). The following key file content can be used to replace a key file where the password is not known. The attached text is default admin user (admin/adminadmin):
-%< snip here %< -- %< -- %<
admin;{SSHA}34IiUYCA727cQdmAAybxAnfgo3lws80EzCqSBg==;asadmin
# Domain User and Password - Do Not Delete Entry Above
-%< and snip here %< -- %< -- %<
#EOF#