All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.cluster-javaee5.PortConfiguration.txt Maven / Gradle / Ivy

Date : 03/31/2005
Version : 1.2

This file shows a configuration of 4 JOnAS instances running on the same machine. The table below lists a possible configuration of all the ports used by the 4 JOnAS instances.
In the following configuration we will deploy the entity beans on node2 and node3. The Web application is deployed on node0 and node1.

			          __--- Node1 --- Node3 ---__
Apache with mod_jk ---__		   x  	      __--- DB
						--- Node0 --- Node2 ---

				    Web	       Ejb
				 Container  Container

Note :
- You have to activate the AJP Connector (server.xml) for node0 and node1 inorder to be able to communicate with the mod_jk module. Two different ports (for example 9009 and 9010) must be choosen. Configure the mod_jk to use the 2 instances. For further information please consult http://jonas.objectweb.org/current/doc/howto/Clustering.html in the section -Load balancing at web level with mod_jk-

- Please note that the database used to store the data of the entity beans has to be the same on both nodes where the ejb's are deployed. In this example we use the database HSQL mapped to the JNDI name jdbc_1. We will use the database started by node2, therefore we must change the port in the HSQL.properties file of node3. It has to be the same file as on node2. In this example, you have to start the node2 before the node3 because node2 starts automatically the database. But it would be preferable to install an independant database and use that one as jdbc_1 (change jonas.properties)

- Inorder to see when the different nodes are accessed, you have to start the instances with different names : for example -> jonas start -n node0

FILENAME		PROPERTY						NODE0	NODE1 NODE2	NODE3
--------		-------- 						-----	-----	-----	-----


jonas.properties
			jonas.service.db.port				9001	9002	9003	9004
			jonas.service.discovery.multicast.port	9080	9082	9083	9084

HSQL.properties
			datasource.url					9001	9002	9003	9003		#port 9003 : specifies unique database

server.xml
			




© 2015 - 2025 Weber Informatics LLC | Privacy Policy