Saturday, August 26, 2006

Jboss server running on multiple instances

*Note: This manual has been tested on the MS IIS server.
First and foremost, you need to get the slim down version of jboss. What i mean 'slim down' here is the server will only run relevant services and application and it'll reduce the server startup time tremendously. Next, follow the step by step instruction:

1. Create a port-bindings.xml inside your jboss folder. There's a sample of this xml in jboss folder/docs/examples/binding-manager. You can just copy the content in the file and paste it into your new xml.

2. Once you have the xml, next thing to do is define the server name and the port. By default, we will have one ports-default. Define your new server instance based on the default port. Make sure the jboss:service=Naming binding port has been set other than the default port 1099 and tomcat port binding is other than port 8080.

3. In jboss folder/server, duplicate the default server folder and rename it to the server name you prefer. Move to your new server folder/conf, open the jboss-service.xml. In the service binding portion, define server name based on the ports-new_server you have created in port-binding.xml and store url to file:../port-bindings.xml depends on where you put your xml.

4. Go to the server deploy folder, open the jbossweb-tomcat55.sar. In there, you will see a server.xml. The only thing you need to modify here is the jvmroute. The jvmroute should point to the IISRedirector worker name that created in the worker properties.

5. Before we proceed further, let us have a run through on the ISSRedirector. This tool is available to download in Apache website. At the first place, you need to have IIS installed in your system. After you install IIS and then the redirector, you need to configure the ISAPI filter to the Apache IIS Redirector. Next, create the different worker in worker properties. The most importance part to watch out is the port no. Default port is 1099. Your new worker should use port 1100 and the subsequent port. After that, go to the uri properties file to configure the instance name ties to the correspond worker. Exp, /ABC = testWorker, ABC refered to your war file name. Once done, restart the WWW service in windows service.

6. When you reach this stage, you are clear to go. Open MS-DOS console and go into the jboss bin folder, type "run -c server_name " and the server will be started. Do the same if you want to start another server. The command to start the default server would be "run -c default".

7. To make our life easier, we can download the javaservice from the web and create the server start/stop service in our window services. In this way, we can start and stop our server from the gui instead of command prompt. We will look into the javaservice in my next posting. Happy exploring!

1 comment:

Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!