User: schaefera
Date: 02/03/18 14:34:03
Modified: src/main/org/jboss/deployment/scanner
URLDeploymentScanner.java
Log:
Fixed the broken Farm Member Service. Now the Main Deployer is emitting JMX
notification when an object is deployed / undeployed and the Farm Member
Service is listening for.
Also the Farm Member Service is self-contained meaning that you only have
to adjust the farm-service.xml and deployed it (no further adjustments
necessary even the creation of the farm directory).
Also fixed a problem with URL Deployment Scanner which fails when a new
directory is added (through addURL()) during startup by another MBean
because list is changed without recreation of the iterator. Now the
iterator is replaced by a generated array which does not change when the
list changes.
Revision Changes Path
1.6 +19 -1
jboss-system/src/main/org/jboss/deployment/scanner/URLDeploymentScanner.java
Index: URLDeploymentScanner.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/scanner/URLDeploymentScanner.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- URLDeploymentScanner.java 16 Mar 2002 08:40:44 -0000 1.5
+++ URLDeploymentScanner.java 18 Mar 2002 22:34:03 -0000 1.6
@@ -38,7 +38,7 @@
* A URL-based deployment scanner. Supports local directory
* scanning for file-based urls.
*
- * @version <tt>$Revision: 1.5 $</tt>
+ * @version <tt>$Revision: 1.6 $</tt>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
*/
public class URLDeploymentScanner
@@ -351,6 +351,9 @@
}
synchronized (urlList) {
+ //AS Run into some problems when adding a new deployment
+ //AS directory through another MBean
+ /*
for (Iterator iter = urlList.iterator(); iter.hasNext();)
{
URL url = (URL)iter.next();
@@ -363,6 +366,21 @@
else {
// just deploy, not a file url and not yet deployed
deploy(new DeployedURL(url));
+ }
+ }
+ }
+ */
+ URL[] urls = (URL[]) urlList.toArray( new URL[] {} );
+ for( int i = 0; i < urls.length; i++ )
+ {
+ if (!isDeployed(urls[i])) {
+ if (urls[i].getProtocol().equals("file")) {
+ // it is a file url which gets special handling
+ scanDirectory(urls[i]);
+ }
+ else {
+ // just deploy, not a file url and not yet deployed
+ deploy(new DeployedURL(urls[i]));
}
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development