How to Configure Multiple Domains in Oracle GlassFish Application Server

If we want several domains to execute concurrently on the same server, then ports must be chosen carefully, as specifying the same ports for different services or even the same service across domains will prevent one of the domains form working properly.

So to avoid port conflict you have to assign different port numbers in different domains for each purpose. The easy way of doing this is using portbase option in create-domain command. Given below is the create domain command with portbase option.


# asadmin create-domain --portbase [port number] domainname



The value of the --portbase parameter dictates the base port for the domain. Ports for different Services will be offsets of the given port number. The following table lists the ports assigned to all the different services:



Service
Port
Admin Portbase + 48    
Service Portbase + 80
Java Messaging System (JMS) Portbase + 76
Internet Inter-ORB Protocol (IIOP) Portbase + 37
Secure HTTP (HTTPS) Portbase + 81
Secure IIOP Portbase + 38
Mutual Authorization IIOP Portbase + 39
Java Management Extensions (JMX) Administation Portbase + 80           

Of course, care must be taken when choosing the value for --portbase, making sure that none of the assigned ports collide with any other domain.

Here is an example of create domain command with portbase option:

# asadmin create-domain --portbase 4896 domain2


Adminport should be between 1 and 65535. So choose a portbase value such that the resulting port number doesn't exceed 65535

Comments

Post a Comment

Popular posts from this blog

What is Oracle Integration Cloud Service - ICS?

How to Create Packages in Oracle Database using TOAD for Oracle

How to create a Simple Scheduler Job in Oracle Database using Toad