You are on page 1of 4

JBOSS Installation and Configuration

I. Installation of JBOSS
First we have to download the Jboss Application software from http://www.jboss.org/jbossas/downloads/ (here,I selected the stable version4.2.2.GA) And then it will redirtect in to the sourceforge.net site. There you will find the files jboss4.2.2.GA src.tar.gz (JBoss source compressed file) and jboss4.2.2.GA.zip (JBoss compiled compress file) used for running JBoss in BOSS. Follow one of these steps to install : 1) Download the zip file from the above mentioned link. Uncompress the zip to the directory D:\ProgramFiles\Jboss\*. Please use the directory name as jboss (not like jbossversion) 2) Now the directory D:\ProgramFiles\Jboss\* contains the following contents bin client copyright.txt docs jarversions.xml JBossORGEULA.txt lgpl.html lib readme.html server

II. Installation of java


Download the jdk version 5.0 or higher (i selected jdk 5.0 update 16 from the website http://java.sun.com/javase/downloads/index_jdk5.jsp ) and run it under the directory

III. Environment variable settings:


1) set the Jboss_Home--D:\ProgramFiles\Jboss4.2.2\jboss-4.2.2.GA 2) set the classpath--- D:\ProgramFiles\Jboss4.2.2\jboss4.2.2.GA\bin\run.jar

IV. Configuring Multiple Instances


Step 1: If we want to create multiple instances. First take the copy of all folder and rename it as Node1, Node2 etc. Step 2: After renaming it go to the particular instance (i.e.; Node1) D:\ProgramFiles\Jboss4.2.2\jboss4.2.2.GA\server\node1\conf\jbossservice.xml In that uncomment ----<! -- Service Binding --> <mbean code="org.jboss.services.binding.ServiceBindingManager" name="jboss.system: service=ServiceBindingManager"> <attribute name="ServerName">ports-01</attribute> <attribute name="StoreURL">$ {jboss.home.url}/docs/examples/binding-manager/samplebindings.xml</attribute> <attribute name="StoreFactoryClassName"> org.jboss.services.binding.XMLServicesStoreFactory </attribute> </mbean> Step 3: Go to sample-bindings.xml file which is located under D:\ProgramFiles\Jboss4.2.2\jboss4.2.2.GA\docs\examples\binding-manager\sample-bindings.xml A sample configuration for the binding service which defines different port configurations (ports-default, ports01, ports-02) for running multiple JBoss instances in parallel on the same machine. For running a second server instance you have to change the port bindings of that instance by specifying an alternative port binding configuration in the jbossservice.xml of the second server, e.g. <attribute name="ServerName">ports01</attribute>

Step 4: Like that create multiple instances. Goto command-line and start the Server instances (all, node1, node2etc) D:\ProgramFiles\Jboss4.2.2\jboss4.2.2.GA\bin>run -c node1 We can observe when the server is started in the command-line (Server is in Running State) 13:51:58,953 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080 13:51:58,984 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009 13:51:59,000 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 40s:359ms Step 5: Then all the server instances will be Cluster.If we want to Deploy an Application The easiest way to deploy an application into the cluster is to use the farming service. That is to hot-deploy the application archive file (e.g., the EAR, WAR or SAR file) in the all/farm/ directory of any of the cluster member and the application is automatically duplicated across all nodes in the same cluster. If node joins the cluster later, it will pull in all farm deployed applications in the cluster and deploy them locally at start-up time. If you delete the application from one of the running cluster server node's farm/ folder, the application will be undeployed locally and then removed from all other cluster server nodes farm folder (triggers undeployment.) You should manually delete the application from the farm folder of any server node not currently connected to the cluster. If the deployment is Successful on particular server we can observe the following lines in the command-line 14:47:02,859 INFO [TomcatDeployer] deploy, ctxPath=/Testapp, warUrl=.../tmp/deploy/tmp12221Testapp-exp.war/ 14:47:02,953 INFO [ClusterFileTransfer] Start push of file Testapp.war to cluster.

14:47:02,969 INFO [ClusterFileTransfer] Finished push of file Testapp.war to cluster. Step 6: The application url look like http://localhost:8080/Testapp

You might also like