You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2003/11/16 01:52:22 UTC
cvs commit: incubator-geronimo/modules/core/src/conf boot-service.xml
djencks 2003/11/15 16:52:22
Modified: modules/kernel/src/java/org/apache/geronimo/kernel/deployment/scanner
DeploymentScanner.java
modules/core/src/conf boot-service.xml
Log:
Go back to constructor args.
Revision Changes Path
1.3 +4 -70 incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/scanner/DeploymentScanner.java
Index: DeploymentScanner.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/scanner/DeploymentScanner.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DeploymentScanner.java 14 Nov 2003 16:27:34 -0000 1.2
+++ DeploymentScanner.java 16 Nov 2003 00:52:22 -0000 1.3
@@ -107,12 +107,6 @@
mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ScanInterval",
true, true,
"Milliseconds between deployment scans"));
- mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("RecursiveURLs",
- false, true,
- "Array of URLs to scan recursively"));
- mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("NonRecursiveURLs",
- false, true,
- "Array of URLs to scan non-recursively"));
mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("WatchedURLs",
true, false,
"Set of scanned URLs, without recursive information"));
@@ -140,73 +134,29 @@
this.deploymentController = deploymentController;
}
- /**
- * @jmx:managed-constructor
- */
public DeploymentScanner() {
}
- /**
- * @jmx:managed-constructor
- */
- public DeploymentScanner(final URL[] urls, final boolean recurse) {
- addURLs(urls, recurse);
- }
-
- private void addURLs(final URL[] urls, final boolean recurse) {
+ public DeploymentScanner(final URL[] urls, final long scanInterval) {
for (int i = 0; i < urls.length; i++) {
- addURL(urls[i], recurse);
+ addURL(urls[i], true);
}
+ setScanInterval(scanInterval);
}
- /**
- * @jmx:managed-attribute
- */
public synchronized long getScanInterval() {
return scanInterval;
}
- /**
- * @jmx:managed-attribute
- */
public synchronized void setScanInterval(long scanInterval) {
this.scanInterval = scanInterval;
}
- public void setRecursiveURLs(URL[] urls) {
- if (urls != null) {
- addURLs(urls, true);
- }
- }
-
-
- public void setNonRecursiveURLs(URL[] urls) {
- if (urls != null) {
- addURLs(urls, false);
- }
- }
-
- /**
- * @jmx:managed-attribute
- */
public synchronized Set getWatchedURLs() {
return Collections.unmodifiableSet(new HashSet(scanners.keySet()));
}
- /**
- * @jmx:managed-operation
- */
- public void addURL(String url, boolean recurse) throws MalformedURLException {
- //
- // TODO: remove these evil string adapters, let the JMX interface deal with this
- //
- addURL(new URL(url), recurse);
- }
-
- /**
- * @jmx:managed-operation
- */
public synchronized void addURL(URL url, boolean recurse) {
if (!scanners.containsKey(url)) {
log.debug("Watching URL: " + url);
@@ -226,19 +176,6 @@
}
}
- /**
- * @jmx:managed-operation
- */
- public void removeURL(String url) throws MalformedURLException {
- //
- // TODO: remove these evil string adapters, let the JMX interface deal with this
- //
- removeURL(new URL(url));
- }
-
- /**
- * @jmx:managed-operation
- */
public synchronized void removeURL(URL url) {
scanners.remove(url);
}
@@ -288,9 +225,6 @@
public void doFail() {
}
- /**
- * @jmx:managed-operation
- */
public void scanNow() {
boolean logTrace = log.isTraceEnabled();
1.21 +5 -3 incubator-geronimo/modules/core/src/conf/boot-service.xml
Index: boot-service.xml
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/conf/boot-service.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- boot-service.xml 14 Nov 2003 16:27:34 -0000 1.20
+++ boot-service.xml 16 Nov 2003 00:52:22 -0000 1.21
@@ -23,8 +23,10 @@
<mbean descriptor="org.apache.geronimo.kernel.deployment.scanner.DeploymentScanner"
name="geronimo.deployment:role=DeploymentScanner">
- <attribute name="RecursiveURLs">${geronimo.home}/deploy/,</attribute>
- <attribute name="ScanInterval">5000</attribute>
+ <constructor>
+ <arg type="java.net.URL[]">${geronimo.home}/deploy/,</arg>
+ <arg type="long">5000</arg>
+ </constructor>
</mbean>
<mbean code="org.apache.geronimo.deployment.app.ApplicationDeployer"