yes, any xAR can be deployed: JAR, WAR, EAR, SAR, RAR, WSR, etc.
I think the author asked weather the deployment of one of those xAR's files on 1 machine of the cluster would deploy the application on ALL machines of the cluster.
(I think this was what he called "farming-feature")
By your reply I was not sure if you're saying that all those xAR files were suported in farming feature or if you're saying that you could deploy those files in Jboss-Jetty (period).
Sorry if this obvious and the problem is just my bad english.
IST - Portugal
As I understand it, and Sacha may correct me, it works like this :
You configure instances of JBoss on the same cluster partition to be masters or slaves (by deploying a particular service) - you need one master.
Anything you drop into deploy/ on the master will be copied to the slaves. Anything you remove from the master will be removed from the slaves.
The master deploy directory is the MODEL, you are the CONTROLLER, the slaves are the VIEWS.
As we are in the cluster-forum, my answer was implicitly based towards clustering. So, yes, all of these can be deployed *in a farm*.
BTW, if you have a distributed/shared filesystem, you can also mimic this behaviour by making each JBoss instance use a common "deploy" folder shared somewhere on the network.
If you use a shared filesystem you have a single point of failure.
If you cluster only for performance you can do that but if you want failover, too you should not do that.
How do you differentiate between the master and the slaves in the cluster?
There's nothing in the JBoss Clustering doc (20/06/2002) on p29-30.
Sure, but then it is up to you to use a HA-filesystem! It exists.
What is your concern? Most of the time, we don't need/use a master/slave concept in the clustering.
But for your question, JavaGroups can provide you with a master (election mechanism is handled by JavaGroups)
Actually, I got confused by the poster mentionning master/slave :)
My understanding is that (as per doc) you can drop any xAR file in the /deploy/farm directory on any of the nodes participating in a cluster and the xAR will automatically be deployed on all the other nodes of the cluster. Is that right?
If yes, then I have a 2 nodes cluster (W2K) using JBoss 3.0 + Tomcat 4.0.3 (final release) and if I start adding/removing xAR to the /deploy/farm directory the farming concept works fine and I can see the xAR being deployed on the other node although if an exception is taken (say you try to deploy the tomcat4-service.xml without the tomcat4-service.jar) then the only way for the farming to work correctly again (deploy/undeploy) is to shut down JBoss and restart.
I need to try a specific sequence, except if there's a known issue in this area.
What you write is correct.
Currently, farming must be improved to support some of these "exceptional" cases.
Features suggestion (real features, the one that *you* use) are welcome on SF.net/projects/jboss
Hmmm.. If the farming behaviour is to undeploy a app that you deployed in the master server... What happens if the master server fails?
I see two possible cenarios, and both seem somewhat bad:
1 - Slave's think that Master undeployed the app
2 - Slave's keep the app running but now it's impossible to undeploy it since there is no deploy/farm/app in the slave's filesystem
Maybe there is a different workaround to this that I'm not seeing?
Sorry for the confusion about master/slave - forget it.
I just ran two 'JBoss --configuration all' on two boxes and dropped an ear into server/all/farm on one - after a short delay it was deployed on the other. I removed it from the first and it was immediately removed from the other - BINGO !
Sacha - very nice ! - now some thoughts...
I'm working on a little testsuite that will throw HTTP requests at different nodes in a cluster. I figured that the deployment of the test webapp should be done over a farm to keep my config simple. I like to deploy using the JMX interface because it is synchronous - i.e. I know that my app has finished deploying when my request comes back.
I tried using the deploy() method on org.jboss.ha.framework.server.FarmMemberService MBean through the JMX console.It appears to return as soon as the deployable has been copied into .../farm/... - It would be nice to have a method which only returned when the deployable had been deployed on all nodes (or would it time out ? :-( )...
There does not appear to be an undeploy() method available via the console and the isDeployed() method barfs...:
HTTP ERROR: 500 Exception in MBean operation 'isDeployed(,java.lang.String)'
17:46:00,383 WARN [JBossWeb] WARNING: Servlet Exception for /jmx-console/HtmlAdaptor
MBeanException: Exception in MBean operation 'isDeployed(,java.lang.String)'
Cause: org.jboss.deployment.DeploymentException: Could not retrieve isDeployed attribute from local Deployer Service; - nested throwable: (ReflectionException: null
Cause: java.lang.NoSuchMethodException: Unable to locate method for: Deployed(,java.net.URL))
I'm running Branch_3_0.
Cool stuff though - you could have lots of fun with this.....