Alert readers might have noticed that theautodeploy
directory is under adomains/domain1
subdirectory. GlassFish has a concept ofdomains. Domains allow a collection of related applications to be deployed together. Several domains can be started concurrently. GlassFish domains behave like individual GlassFish instances, a default domain called domain1
is created when installing GlassFish.
Additional domains can be created from the command line by issuing the following command:
asadmin create-domain domainname
The preceding command takes several parameters to specify ports where the domain will listen for several services (HTTP, Admin, JMS, IIOP, secure HTTP, and so on); type the following command in the command line to see its parameters:
asadmin create-domain --help
If we want several domains to execute concurrently on the same server, these ports must be chosen carefully since specifying the same ports for different services (or even the same service across domains...