[英]Webstart application is very slow when server is down
What I have: 我有的:
JNLP file: JNLP文件:
<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 客户端操作系统:Windows XP和Windows7。客户端计算机上的JNLP文件始终通过快捷方式像这样启动: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. 问题:当tomcat关闭时,应用程序从缓存中启动,但是太慢了,无法使用它。 Can't figure out what impact javaws has on the application when tomcat is down?
无法确定当tomcat关闭时javaws对应用程序有什么影响? 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. 更新1:在不同的系统上进行测试之后,我注意到该应用程序可以在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.
似乎javaws试图在启动应用程序时在后台检查所有这些签名的jar,而不是仅仅从现金中读取它。 On windows XP same version of java doesn't do that at all.
在Windows XP上,相同版本的Java根本不执行该操作。 It just launches application.
它只是启动应用程序。
Update 2: As it seems Windows 7 connection timeout is 10 times higher than Windows XPs timeout. 更新2:似乎Windows 7连接超时比Windows XPs超时高10倍。 Basically if I could somehow set some general connection timeout that could fix the problem.
基本上,如果我能以某种方式设置一些常规连接超时可以解决该问题。
Update 3: Changing tag didn't help at all. 更新3:更改标签根本没有帮助。 It still works the same.
它仍然起作用。
This sounds like if you are running with <update check="timeout">
which is the default if no <update...>
specified. 这听起来像是您正在运行
<update check="timeout">
,如果未指定<update...>
,这是默认设置。 This tries to update until a timeout is reached and if failed (Tomcat down), continues on background (continues failing). 这将尝试更新,直到达到超时为止,并且如果失败(Tomcat关闭),则将在后台继续(继续失败)。 try to use
<update check="always">
. 尝试使用
<update check="always">
。
For reference see the doc on <update ...>
tag 作为参考,请参见
<update ...>
标记上的文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.