开发者

Webstart application is very slow when server is down

What I have:

  • Tomcat server which contains jnlp file with all required libraries and which could be turned off for some reason
  • Very fat swing application which requires all securities permissions
  • JNLP file:

    <jnlp spec="1.0+" codebase="http://somehost:6020/webstart/DS/xxx/" href="DS.jnlp">
     <information>
     <title>DS WebStart</title>
     <vendor>DS</vendor>
     <homepage href="index.html"/>
     <offline-allowed/>
     <icon href="http://somehost:6020/DS_5.6.0.333/icon_32x32.gif"/>
     <icon kind="splash" href="http://somehost:6020/DS_5.6.0.333/Splash.jpg"/> 
    </information>
    
    <security>
     <all-permissions/>
    </security>
    
    <resources>
    
    <j2se version="1.6.0_12" max-heap-size="128m" href="http://java.sun.com/products/autodl/j2se"
        java-vm-args="-XX:MaxHeapFreeRatio=25 -XX:MinHeapFreeRatio=20 -Xss2M"/>
    
    
    
    <jar href="http://somehost:6020/DS_5.6.0.333/sds.jar" download="eager"/>
    <jar href="http://somehost:6020/DS_5.6.0.333/sresources.jar" download="eager"/>
    
    <jar href="http://somehost:6020/DS_5.6.0.333/scommons-logging.jar" download="eager"/>
    <jar href="http://somehost:6020/DS_5.6.0.333/slog4j.jar" download="eager"/>
    <jar href="http://somehost:6020/DS_5.6.0.333/stclib.jar" download="eager"/>
    <jar href="http://somehost:6020/DS_5.6.0.333/sconcurrent.jar" download="eager"/>
    <jar href="http://somehost:6020/DS_5.6.0.333/scon.jar" download="eager"/>
    <jar href="http://somehost:6020/DS_5.6.0.333/sDSLauncher-1.0.jar" download="eager"/
    <nativelib href="http://somehost:6020/DS_5.6.0.333/jdic-native.jar" download="eager" />
     </resources>
    
     <application-desc main-class="com.ds.app.Main" />
    </jnlp>
    

Client OS: Windows XP and Windows 7. JNLP file on clients machine always launched like this through shortcut: javaws.exe DS.jnlp

The problem: When tomcat is down application is launched form cache but is soooo sloooow it is impossible to work with it. Can't figure out what impact javaws has on the application when tomcat 开发者_StackOverflowis down? Please help me to fix this issue

Thanks, Andrey

Update 1: After playing around and testing on different systems I've noticed that application works perfectly on Windows XP. As it seems javaws is trying to check all those signed jars on the background while launching application instead of just reading it from cash. On windows XP same version of java doesn't do that at all. It just launches application.

Update 2: As it seems Windows 7 connection timeout is 10 times higher than Windows XPs timeout. Basically if I could somehow set some general connection timeout that could fix the problem.

Update 3: Changing tag didn't help at all. It still works the same.


This sounds like if you are running with <update check="timeout"> which is the default if no <update...> specified. This tries to update until a timeout is reached and if failed (Tomcat down), continues on background (continues failing). try to use <update check="always">.

For reference see the doc on <update ...> tag

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜