JBoss application server tutorials

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

JBoss farming service

 
What is the farming service ? this article explains about it, also it warns you that since JBoss AS 5 it's not supported any more !
The easiest way to deploy an application with JBoss AS 4.x and 3.x cluster was the farming service.

 

What is the farm service ?

That is hot-deploying the application archive file (e.g., the EAR, WAR or SAR file) in the all/farm/ directory of any of the cluster members, will cause the application to be 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.

It's even possible to fine-tune the farmign service by modifying the attributes of the farm-service.xml configuration file. This file is located in the deploy/deploy.last directory

 <mbean code="org.jboss.ha.framework.server.FarmMemberService"     
 name="jboss:service=FarmMember,partition=DefaultPartition">     
 ...      
 
 <depends optional-attribute-name="ClusterPartition" 
 proxy-type="attribute">
 jboss:service=${jboss.partition.name:DefaultPartition}
 </depends>     
 <attribute name="ScanPeriod">5000</attribute>      
 <attribute name="URLs">farm/</attribute>     
 ...
 </mbean> 

The key parameters are "ScanPeriod" which is the amount of time the Farming service scans for new deployments, and the "URL" which points to the directory where deployer watches for files to be deployed. This MBean will create this directory is if does not already exist. If a full URL is not provided, it is assumed that the value is a filesytem path relative to the configuration directory.

 
Since JBoss AS 5 it's deprecated
The AS 4 Farm Service is removed.  In the future, distributed deployments will eventually be handled by the AS 5 Profile Service, with the Profile Service (or JBoss ON) coordinating deployments across the cluster from a centralized repository. 
The Profile Service is the new JBoss Management system which is based on POJOs instead of the old JMX based administration which was based on editing XML files.

Unfortunately this replacement for farming is not ready available for AS 5.0.0.GA. The Farm Service's function of replicating deployment archives between file systems will not be maintained.

At the moment the easiest solution to deploy a JBoss application on JBoss AS 5 is creating a script which copies the file on all the "deploy" folder of your Nodes.

Important notice: in the release 5.1.0 of JBoss AS the farming Service is back !
Read more about it here:
<
Advertisement

JBoss farming service
Francesco Google+
Top Programming Sites
You are here Home