- Timestamp:
- 2011-06-26 09:30:14 (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/kauri-runtime/src/main/java/org/kauriproject/runtime/KauriRuntime.java
r1877 r1909 18 18 import java.io.IOException; 19 19 import java.io.InputStream; 20 import java.lang.reflect.Field; 20 21 import java.net.MalformedURLException; 21 22 import java.util.*; … … 43 44 import org.kauriproject.util.io.IOUtils; 44 45 import org.kauriproject.conf.Conf; 45 import org.restlet.Context;46 import org.restlet.engine.component.ChildContext;47 46 48 47 /** … … 306 305 307 306 // TODO temporarily disabled because FAM.stop() is slow 308 // See JCI jira patch: https://issues.apache.org/jira/browse/JCI-57 307 // See JCI jira patch: https://issues.apache.org/jira/browse/JCI-57 (the newer one in commons-io has the same problem) 309 308 // fam.stop(); 309 // Added the following workaround: 310 if (System.getSecurityManager() == null) { 311 try { 312 Field famRunningField = fam.getClass().getDeclaredField("running"); 313 famRunningField.setAccessible(true); 314 Field threadField = fam.getClass().getDeclaredField("thread"); 315 threadField.setAccessible(true); 316 Thread famThread = (Thread)threadField.get(fam); 317 famRunningField.setBoolean(fam, false); 318 famThread.interrupt(); 319 fam.stop(); 320 } catch (Exception e) { 321 infolog.error("Error stopping FilesystemAlterationMonitor", e); 322 } 323 } else { 324 infolog.warn("Unable to stop the FilesystemAlterationMonitor using workaround since a security manager is installed."); 325 } 310 326 311 327 // In case starting the runtime failed, modules might be null
Note: See TracChangeset
for help on using the changeset viewer.