|
RMI Configuration This article explains system wide RMI configuration for the Orion Application Server. It contains details about how to configure Remote Servers to communicate to and how to configure a Server to be accessible.
Introduction
Configuring Server to be accessible for RMI requests Configuring RMI Access to other Servers Configuring RMI-cluster services 1 Introduction The goal of this article is to explain how to configure RMI settings for the Orion Application Server. System wide RMI configuration is done through the Orion rmi.xml file. In this file you specify: remote servers to connect to the hostname/IP and port the RMI server binds to in order to allow remote servers to connect log and clustering settings (outside the scope of this article) The HTTP Clustering and Load Distribution article explains how to set up and configure clustering. 2 Configuring Server to be accessible for RMI requests In order for the Orion Application Server to be accessible by other Application Servers over RMI, the Server must be correctly configured for allowing remote Servers to connect. Please notice that this does not imply that this Server will be able to Connect to other Servers. This section involves the following steps: Remember to open any firewalls to accommodate the RMI configuration on your server. 2.1 Step 1: Making sure that rmi.xml is referenced Open up the server.xml on the Server to configure RMI for and make sure that the following line exists:
The rmi-config tag syntax can be found here. This tells the Server that the RMI configuration is put in its own file pointed out by the path attribute. The file server.xmlserver.xml is normally located in the /orion/config folder. Notice that the filename "rmi.xml" can be substituted with another filename if that better suits the system. This article assumes that the name used is "rmi.xml". 2.2 Step 2: Editing rmi.xml Open up the rmi.xml on the Server to configure RMI for and add (if it doesn't already exist) an entry like the following:
The rmi-server tag syntax can be found here. Replace host with the host name or ip of the address that the Server should listen for RMI on. If this attribute is not given, the Server will listens to all addresses on this machine. Replace port with the port to use for RMI. If this attribute is not given, the Server will listen to port 23791 by default. The log tag syntax can be found here Replace path with the full path (relative or absolute) that the Server will write the RMI log entries to. If you do not want to log RMI, remove the log section from rmi.xml. The file rmi.xml is normally located in the /orion/config folder. At a minimum, your rmi.xml should look like the following:
After these changes, the Server should be enabled for incoming RMI requests. Using a tag like <mail address="my@email.com" /> inside the <log> tag will make the Server send an email to the specified address containing the log entry. 3 Configuring RMI Access to other Servers This section describes the steps necessary for configuring the Orion Application Server to be able to connect to remote (point to point) RMI-servers. Please notice that this does not imply that other Servers will be able to Connect to this Server. This section involves the following steps: 3.1 Step 1: Making sure that rmi.xml is referenced Open up the server.xml on the Server to configure RMI for and make sure that the following line exists:
The rmi-config tag syntax can be found here This tells the Server that the RMI configuration is put in its own file pointed out by the path attribute. The file server.xml is normally located in the folder /orion/config/ The filename "rmi.xml" can be substituted with another filename if that better suits the system. This article assumes that the name used is "rmi.xml". 3.2 Step 2: Adding the remote Server to rmi.xml Open up the rmi.xml on the Server that should gain access to the remote Server and add an entry like the following:
The server tag syntax can be found here Replace host with the name/ip that the remote Server listens to for RMI requests. Replace username with a username of a valid principal on the remote Server. Replace port with the port that the remote Server listens to for RMI requests. Replace password with a password of a valid principal on the remote Server. After these changes, the Server should be able to send RMI requests to the remote Server. The file rmi.xmlrmi.xml is normally located in the folder /orion/config/ If the connection to Server A cannot be established you will see an java.net.ConnectException saying something like "Connection refused: connect". This probably means that the hostname or the port number given in rmi.xml on Server B is wrong. 4 Configuring RMI-cluster services This section describes the steps necessary for configuring the Orion Application Server to be able to participate in a cluster to share EJB and/or Application context state. This section involves the following steps: 4.1 Step 1: Making sure that rmi.xml is referenced Open up the server.xml on the Server to configure RMI for and make sure that the following line exists:
The rmi-config tag syntax can be found here This tells the Server that the RMI configuration is put in its own file pointed out by the path attribute. The file server.xml is normally located in the folder /orion/config/ The filename "rmi.xml" can be substituted with another filename if that better suits the system. This article assumes that the name used is "rmi.xml". 4.2 Step 2: Adding the cluster node to rmi.xml Open up the rmi.xml on the Server that should participate in a cluster and add an entry like the following:
Replace address with the multicast name/ip to use. The default is 230.0.0.1. All cluster nodes should use the same name/ip. Replace port with the multicast port to use. The default is 9127. All cluster nodes should use the same name/ip. Replace id with a number that will identify this Server within the RMI-cluster. The default number is a random seed based on the local machine IP. Replace name with a username (should not be an existing User). This value is used as a authorization token for cluster access and needs thus to be the same for all nodes of the RMI-cluster that should share state. Replace password with a username (should not belong to an existing User). This value is used as a authorization token for cluster access and needs thus to be the same for all nodes of the RMI-cluster that should share state. Copyright 2003 IronFlare AB |