Each GlassFish domain can be created in one o the ollow-ing three profles. Each profle has its own characteristics,and thereore, its own benefts and drawbacks. You should consider that when you have no replication,you have the best possible perormance provided by theapplication server, and using any kind o replication either inmemory or HADB degrades the perormance.
letsyou determine your domain profle during domain creation.Here is a detailed profles comparison:Some common administration tasks that you may encounterin perorming your daily jobs are categorized as ollows:GlassFish provides web-based administration console andCLI or perorming administrative tasks. Supporting bothCLI and web-based console will let administrators withdierent tastes manage their GlassFish installation rom theiravorite channel. For example, a veteran administrator maywrite some scripts or perorming daily jobs while anotheradministrator may preer to use web-based console to managethe application server. In this recard I will use CLI path as it iseasier and saves time.
Deploying and undeploying an application:
To deploy anapplication independently rom its type (WAR, EAR, RAR,etc.), the ollowing command will do the job. The commandhas many options which are omitted to show the commonuse case. Application server should be running to executethe command.
--contextroot samplecontext --upload=true --dbvendorname derby --createtables=true /home/ masoud/customer-cmp-ear.ear
Following are some additional commands related to domainmanagement:
GlassFish Administration Channel, continued
JMX (Java Management eXtension) / AMX (ApplicationServer Management eXtension):
This channel is mostlypreerred by developers who need to interact with theGlassFish administration core by code. These APIs allowyou to extend monitoring and management acilities o theGlassFish application server. In order to connect to the JMXadministration console, you can use any JMX console likeJDK's JConsole or MC4J, and then connect to the GlassFishserver using
and its administration credentials. Theport may dier based on your selected port number duringdomain creation.JConsole is a part o the JDK (Java Development Kit). Youcan run it by issuing the
command in your operat-ing system command line interace.MC4J is a JMX management console built on top o Net-Beans RCP. It is highly modular and easy to use. MC4J canbe ound athttp://www.mc4j.org.
If you would like to change the default 60 minutestime out of the web-based administration consoleto something smaller or bigger, you can use thefollowing command in
Suitable or developers who develop and test applications; embeddedJMS implementation; no clustering; heart-beat support
Can join a cluster, support heartbeat, has both embedded and local JMSimplementation and can also support in-memory session replication.
This domain is comprised o all the Cluster profle eatures, in additionto utilizing NSS or security store, replication using HADB, and enabledplatorm security manager by deault
Lists all available domains. You can pass
in orderto list domains that are not in the deault domains directory
Veriy the domain.xml fle to check its consistency. You mayissue this command ater you edit the
manually. Ittakes domain name as its required operand
TaskCommandDescriptionTo createa domain
create-domain --adminuser admin --adminport 4848--instanceport 8080 --prolecluster --domainpropertiesdomain.jmxPort=8686:http.ssl. port=8181 domain8
Although the command gives you muchmore control, the ones mentioned areenough.
To start adomain
you can seedetailed output about what applicationserver is doing and spot any possibleproblem it may encounter.
To stop adomain
It will stop the
; you will need toinclude domain name i you have morethan one domain in the domains directory.
To deletea domain
It will delete the given domain(
To backupa domain
This command will create a backup roma domain named domain8. The domainis in the deault domains directory o GlassFish. Otherwise you will needto pass
, which points toa parent directory o the designateddomain. Backups will reside inside adirectory named backups, which is insidethe domain8 directory.
restore-domain --lename / opt/dev/apps/Glasssh_2_ur2/ domains/domain8/backups/ sjsas_backup_v00001.zipdomain8
As you can see, we pass the completepath o the backup fle in order to allowthe asadmin to process and restore thegiven domain based on its content.
HTTP Access Log