Having some problems with Jboss clustering and just wanted to see if i have missed anything importent.
Problem: Whenever a node startsup, it always pulls the deployed applications from the Coordinator node even if that application is already on the node that which just restarted. This is causing a huge delay for the node to startup as it pulls all the deployments and i have more than 50 Apps which are huge in size.
Cluster with 2 Node A and B.
1. Deploy X.war file on Node A
2. File pushed to Node B ( all good here )
3. restart Node A
4. Node A pulls the X.war from Node B (** This is not a desired behaviour as X.war already exists on the Node A and also timestamp ( last mod date ) on X.war is not changed, so this is not a new deployment.
Going throug the FarmService code i can see the bug, but am not sure if its really a bug or a design issue.
line 174: DeployedURL du = (DeployedURL)parentDUMap.get(depName);
parentDUMap is always empty on startup as the pull new deployment is called form the startService method, therefore all the farmed applications are getting pulled by the node that just started.
Does anyone has come across this issuse ?
protected void pullNewDeployments(HAPartition partition, HashMap farmed)
169 log.info("**** pullNewDeployments ****");
170 Iterator it = farmed.keySet().iterator();
171 while (it.hasNext())
173 String depName = (String)it.next();
174 DeployedURL du = (DeployedURL)parentDUMap.get(depName);
175 Date last = (Date)farmed.get(depName);
176 if (du != null)
178 Date theLast = new Date(du.getFile().lastModified());
179 if (!theLast.before(last))
185 String parentName = depName.substring(0, depName.indexOf('/'));
186 File destFile = new File(depName);
190 synchronized (remotelyDeployed)
192 remotelyDeployed.add (destFile.getName());
195 catch(ClusterFileTransferException e)
197 // log the exception and continue with the next deployment