This discussion is archived
3 Replies Latest reply: Jul 30, 2012 8:21 AM by 854422 RSS

Apps have JNLP, Splash JPGs, & jars checked for updates twice on server

854422 Newbie
Currently Being Moderated
I have multiple JWS applications on a server with request logging turned on. One of the apps was taking 8 secs to start from a icon click, when nothing has changed. There is a 4 second delay between the first set of requests and the second. 4 seconds does not seem bad, but doing it twice is. There is no load on the server with 100MBS port & (0.080s latency) from the client.

000.000.000.000 - - [27/Jul/2012:10:25:38 -0500] "GET /my_jnlp.jnlp HTTP/1.1" 304 0
000.000.000.000 - - [27/Jul/2012:10:25:38 -0500] "GET /my_jar.jar HTTP/1.1" 304 0
000.000.000.000 - - [27/Jul/2012:10:25:39 -0500] "GET /my_splash.jpg HTTP/1.1" 304 0

000.000.000.000 - - [27/Jul/2012:10:25:42 -0500] "GET /my_jnlp.jnlp HTTP/1.1" 304 0
000.000.000.000 - - [27/Jul/2012:10:25:42 -0500] "GET /my_jar.jar HTTP/1.1" 304 0
000.000.000.000 - - [27/Jul/2012:10:25:42 -0500] "GET /my_splash.jpg HTTP/1.1" 304 0

Another smaller app, no splash, only checks once. I do not think this always happened, but do not know exactly when it started doing this. Any ideas on what it might be?

FYI, both jnlps look pretty similar, and both are <update check="timeout" policy="always"/>

Thanks!
  • 1. Re: Apps have JNLP, Splash JPGs, & jars checked for updates twice on server
    854422 Newbie
    Currently Being Moderated
    Having both a single checker and a double checker, it was only a matter of either getting one of them to switch.

    I found that if there are any -Dxxxxx values in the java-vm-args attribute, e.g. -Dswing.grayrect.color=Transparent, then it checks twice. Using 1.7.0_05 on Windows.
  • 2. Re: Apps have JNLP, Splash JPGs, & jars checked for updates twice on server
    817264 Journeyer
    Currently Being Moderated
    Only certain list of properties can be used by untrusted applications (http://docs.oracle.com/javase/tutorial/deployment/doingMoreWithRIA/properties.html).

    Anything outside the list means application need to be validated before property is set. And to set the system property or pass new JVM option JVM need to be restarted (as webstart engine does not know whether property can be changed in runtime).

    I suspect this is what happening in your case - application essentially starts twice.

    Please post full JNLP file and provide details on whether your app is signed, includes signed JNLP file and how do you launch it (using command line with full URL? local copy of JNLP file? click in the browser?).
  • 3. Re: Apps have JNLP, Splash JPGs, & jars checked for updates twice on server
    854422 Newbie
    Currently Being Moderated
    Here is the full structure of the jnlp, with the specifics of the files / url / main changed.

    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://www.myhost:8080/" href="my-jnlp.jnlp">

    <information>
    <title>My title</title>
    <vendor>Me</vendor>
    <homepage href="index.html"/>
    <description kind="tooltip">Main application ...</description>
    <icon href="images_128.jpg" width="128" height="128" size="12235" kind="splash"/>
    <icon href="images_64.jpg" width="64" height="64" size="4499"/>
    <icon href="images_32.jpg" width="32" height="32" size="1955"/>
    <shortcut online="true">
    <desktop/>
    </shortcut>
    </information>

    <security>
    <all-permissions/>
    </security>

    <update check="timeout" policy="always"/>

    <resources>
    <j2se
    version="1.7+"
    java-vm-args="-Xmx200m -XX:+UseConcMarkSweepGC -Dswing.grayrect.color=Transparent -Djava2d.speedofpainting=UNIMAGINABLE"
    />
    <jar href="my-jar.jar" main="true" size="2000000" />
    </resources>

    <resources os="Mac">
    <j2se
    version="1.6+"
    java-vm-args="-Xmx200m -XX:+UseConcMarkSweepGC -Dswing.grayrect.color=Transparent -Dapple.awt.graphics.UseQuartz=true"
    />
    </resources>

    <application-desc main-class="Main">
    </application-desc>

    </jnlp>


    For the Java 1.7 resources, I just removed the 2 swing properties. I am not even sure the speedofpainting one is in production. Only saw it on a blog.

    I also tried this after the removal on 1.7.0_06 b16 on OS X. There is still doing the double check. b16 will not upgrade due to a change in b18. Was going to wait around to see the next release fixed, but will go to b20 manually if needed.

    Edited by: user3055980 on Jul 30, 2012 11:20 AM
    All tests except the last on 1.7.0_06 b16 were on Window 7

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points