java веб-запуск запроса файла JAR несколько раз - PullRequest
0 голосов
/ 29 января 2020

Я использую icedtea jav aws (версия: icedtea-web 1.6.2 (1.6.2-3ubuntu1)) для распространения моего java приложения.

Мой файл jnlp выглядит следующим образом:

<jnlp spec="1.0+" codebase="/">  
    <information>  
            <title>My Application</title>  
        <vendor>Software Studio</vendor>      
        <offline-allowed/>  
    </information>
    <resources>
        <!-- Application Resources -->
        <jar href="MyApplication-1.0.jar"></jar>
    </resources>
    <application-desc main-class="com.myapp.application.Application">
        <!-- Application Arguments -->
    </application-desc>
    <security>
        <all-permissions/>
    </security>    
</jnlp>

Файл jnlp приложения и файл ресурса MyApplication-1.0.jar размещены на веб-сервере apache. Я заметил в журналах доступа, что некоторые клиенты запрашивают файл JAR несколько раз за короткий промежуток времени. Ниже приведен фрагмент содержимого моего apache файла access_log, показывающий эту проблему:

172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:48:24 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:48:30 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:48:36 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:48:43 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:48:49 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:48:55 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:01 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:07 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:13 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:20 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:26 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:33 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:39 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:45 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:51 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:49:57 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:50:03 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:50:10 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:50:16 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:50:22 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:50:28 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:50:34 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:50:42 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"
172.3.95.128 (85.58.55.24) - - [03/Jan/2020:12:50:46 +0000] "GET /MyApplication-1.0.jar HTTP/1.1" 200 20308737 "-" "Java/1.8.0_222"

Клиенты запускают приложение, выполняя команду jav aws, передавая URL-адрес jnlp в качестве параметра.

javaws -headless https://myapplication.com/MyApplication.jnlp

Что может быть причиной такого поведения?

...