Skip to main content

How to set the port where the Notification Service sends events to?

  • September 2, 2014
  • 0 replies
  • 0 views

Product: OpenFusion Notification Service

Version: ALL 

 

Description:

How to set the port where the Notification Service sends events to?

Resolution:

1. To set a fix listen port of the Notification Service.

This can be done using the Administration Manager or the AdminMgrTool command line utility. The Administration Manager can be used as follows:

a) Start the Administration Manager

b) Go to the Notification Service and choose the CORBA Tag

c) Fill in the port number in the Server Port option. When the service starts it should be listening on this port.

You can also change the server port using the AdminMgrTool command line utility found in the bin directory of the distribution, as follows:

a) If the service has not been started the xml files need to be populated first using: adminMgrTool -p

b) To change the port number you would use the following command:

adminMgrTool -ap OpenFusion.localhost.NotificationService Port 14058

2. To set a fix ports used by suppliers for sending events to the service

The Notification Service will use the underlying ORB properties to set the ports that the suppliers use for to sending events to the Notification Service. This information relates to JacORB 2.1. If using a different ORB please check the documentation supplied with it. The port that suppliers use for sending events to the Notification Service can be controlled using the following jacorb.properties setting:

jacorb.net.socket_factory=org.jacorb.orb.factory.PortRangeSocketFactory

jacorb.net.socket_factory.port.min=min_portnumber

jacorb.net.socket_factory.port.max=max_portnumber

where max_portnumber and min_portnumber are the values of the port you wish to use. This supplies a range of ports that the supplier can use for sending events to the service.

The jacorb.net.socket_factory.port.min is the minimum port value in the range and the jacorb.net.socket_factory.port.max is the maximum port value in the range. If one of the ports in the range is already in use then the next one will be used.

It is advised to set the range to be a large value to make sure the supplier can get a port.

The jacorb.properties file is found in the classes directory of the OpenFusion distribution.

To pass these properties to the Notification Service you need to bring up the Administration Manager. Choose the Notification Service and go to the Java Tag. In the JVM Flag option pass in the following:

-Djacorb.net.socket_factory=org.jacorb.orb.factory.PortRangeSocketFactory

-Djacorb.net.socket_factory.port.min=14000

-Djacorb.net.socket_factory.port.max=14200

3. To set fix ports used by the Notification Service for sending events to the consumer.

The Notification Service will use the underlying ORB properties to fix the port that the Notification Service sends events to the consumer on. This information relates to JacORB 2.1. If using a different ORB please consult the documentation supplied with it.

To start the consumer running on a fixed port pass the following jacorb.property to the consumer on the command line:

-DOAPort=portnumber

where portnumber is the number of the port you want to use.


#KnowledgeDocs
#OpenFusion