How to turn off the scan for the war files in Jetty10

0

I am working with Jetty10 and by defalut, war scan is enabled and the scan interval is set to 1 second. It means Jetty scans the complete web apps directory every 1 sec. Please correct me if I am wrong. the below code is in the jetty\etc\jetty-deploy.XML

 <Set name="scanInterval"><Property name="jetty.deploy.scanInterval" default="1"/></Set>

I don't want that burden to my application and turning this scan off will reduce the overhead of jetty scanning complete web apps every 1 sec.

So, my question is how can we turn off this scan? do we need to set it to -1 or is there any approach to do this?

java jetty jetty-10
2021-11-24 06:42:22
1

1

The WebAppProvider uses a org.eclipse.jetty.util.Scanner, and the javadoc for Scanner.setScanInterval(int) says:

@param scanInterval pause between scans in seconds, or 0 for no scan after the initial scan.

So if don't want regular scans after the initial scan you can set the scanInterval to 0 by setting the Jetty property jetty.deploy.scanInterval=0 in your deploy.ini file.

2021-11-28 23:13:17

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................