Home JBoss AS JBoss farming service
12 | 03 | 2010
JBoss 5 AS Book
"JBoss AS 5 development" reviews
Please share your feedback/review with other readers!
Banner
Dashboard
Advertise with Us
Banner
RSS Feed
Login
Sign here for the NewsLetter.



Poll
What book could be in your wish list next XMas ?
 
JBoss admin resources
Banner
JBoss howto

How can you solve deployment errors caused by large war/jar/ear files ?

jboss recipe of the day ...
Read More

How do you configure your .war to be deployed after your EJB ?

jboss recipe of the day ...
Read More

How do I configure a Queue/Topic to work in a cluster?

JBoss recipe of the day ...
Read More
JBoss farming service
Written by Mark S.   
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:
http://www.mastertheboss.com/en/jboss-server/221-jboss-farming-service-is-back.html


JBoss.org Search
Custom Search
Comments
Search
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."