Issue #1061 Documentation

Signed-off-by: WalkerWatch <ctwalker@gmail.com>
This commit is contained in:
WalkerWatch 2016-12-15 13:48:48 -05:00
parent b0c0706e8d
commit d6c7f99d85
2 changed files with 31 additions and 1 deletions

View File

@ -23,4 +23,5 @@ include::troubleshooting-zip-exceptions.adoc[]
include::troubleshooting-locked-files.adoc[]
include::preventing-memory-leaks.adoc[]
include::slow-deployment.adoc[]
include::security-reports.adoc[]
include::security-reports.adoc[]
include::watchservice.adoc[]

View File

@ -0,0 +1,29 @@
// ========================================================================
// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
// ========================================================================
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
[[watchservice]]
=== Java WatchService
The JVM link:https://docs.oracle.com/javase/7/docs/api/java/nio/file/WatchService.html[WatchService] is in place to monitor objects, like a directory, for changes and update it's contents.
This service is useful for features like link:#hot-deployment[Hot Deployment].
When a change is made the system will wait to post the update and pause to see if there are any other changes.
While some operating systems such as Windows have a native value for this quiet time, not all do, notably OSX.
At the core this is a limitation of the JVM's FileSystem-specific implementation, but one that has been raised to the link:https://bugs.openjdk.java.net/browse/JDK-7133447[attention of the project.]
==== Remedy
To help offset the delay in systems like OSX, Jetty defaults the value for non-native implementations to a link:{GITBROWSEURL}/jetty-util/src/main/java/org/eclipse/jetty/util/PathWatcher.java#L1431[time of 5000ms.]
Using values lower than 5000ms is not recommended and has shown to frequently fail.