Application Server domains are logical or physical units created to help the administrator manage a system configuration. A domain is broken down into smaller units including instances and node agents. A server instance is a single Java Virtual Machine (JVM) that runs the Application Server on a single physical machine. Each domain has one or more instances. A domain must also have at least one associated node agent for the instance to function properly. Domains can be grouped together to create a cluster. Clusters allow the administrator to manage groups of hardware and software.
Domains are created using the create-domain command. The following example command creates a domain named mydomain. The administration server listens on port 1234 and the administrative user name is hanan. The command prompts for the administrative and master passwords.
$ asadmin create-domain --adminport 80 --adminuser hanan mydomain |
To start the Admin Console for mydomain domain, in a browser, enter the following URL:
http://hostname:80 |
For the preceding create-domain example, the domain’s log files, configuration files, and deployed applications now reside in the following directory:
domain-root-dir/mydomain
To create the domain’s directory in another location, specify the --domaindir option. For the full syntax of the command, type asadmin help create-domain.
Domains are deleted using the asadmin delete-domain command. Only the operating system user (or root) who can administer the domain can execute this command successfully. To delete a domain named mydomain, for example, type the following command:
$ asadmin delete-domain mydomain |
The domains created on a machine can be found using the asadmin list-domains command. To list the domains in the default domain-root-dir directory, type this command:
$ asadmin list-domains |
To list domains that were created in other directories, specify the --domaindir option.
Restarting the server is the same as restarting the domain. To restart the domain or server, stop and start the domain.