Saturday, December 13, 2008

Change OC4J port number

Change OC4J port number

Many Oracle Application Server components and services use ports. As an administrator, it is important to know the port numbers used by these services, and to ensure that the same port number is not used by two services on your host.

Most port numbers are assigned during installation. Every component and service has an allotted port range, which is the set of port numbers Oracle Application Server attempts to use when assigning a port. Oracle Application Server starts with the lowest number in the range and performs the following checks:


You can change OC4J port ranges using the following steps:

1.Open the default-web-site.xml file:

ORACLE_HOME\j2ee\home\config\default-web-site.xml
or
OC4J_HOME\config\default-web-site.xml

2.Locate the element for the OC4J instance that contains the port range you want to change. For example, if you want to change a port number, locate this element:
web-site port="8888"

3.Within the OC4J instance element, there is a port element for each type of port.
For example:
web-site port="9000"

4.Modify the range parameter for the port you want to change, and then save the file.
5.Restart OC4J
%OC4J_HOME%\java -jar admin_client.jar deployer:oc4j:localhost oc4jadmin xxxxx -restart
(or)
1.Shutdown OC4J
%ORACLE_HOME%\bin\oc4j -shutdown -port 23791 -password xxxxxx

2.Startup OC4J
%ORACLE_HOME%\bin\oc4j -start

Now the port Change..

No comments: