我有一个富 Internet 应用程序,它通过 Internet 在 SaaS 模式(云)中提供。该应用程序通过 Java Web Start 部署:用户单击指向 JNLP 文件的链接到提供程序站点 ( http://somesite.com/myapp/myapp.jnlp); 然后下载应用程序并在本地缓存(从客户端的 Java 控制面板我看到应用程序大约 40 MB)。我希望如果没有发生服务器端更改,客户端将使用缓存版本。发布新的服务器版本时可能会出现一个问题:所有客户端(数百个)可能同时下载新版本。为了防止这个问题,我想探索使用 Web 代理作为缓存的可能性:第一个客户端从 Internet 下载新版本,其他客户端下载缓存在 Web 代理上的版本。这可行吗?我有一些疑问,主要是因为从 Java 控制面板 --> Java 缓存查看器(Win XP 上的 Java 6)我可以在“应用程序视图”中看到 1 个应用程序(40 MB),当我切换时看到一些 JAR到“资源视图”,但是当我转到应该物理托管缓存的磁盘位置时,我会看到很多文件夹(大部分是空的)和 .idx 文件(没有 JAR 的痕迹)。这个想法是告诉 Web 代理(即 Forefront TMG)只缓存来自提供商站点的一组文件(哪些文件?哪些扩展名?)。我附加了带有缓存选项的 JNLP 文件的清理版本,但我想它们与我的问题无关,因为它们只处理客户端上的缓存选项(对吗?)
<jnlp spec="1.0+" codebase="http://somesite.com/myapp/" href="http://somesite.com/myapp/WebStart.jnlp">
<information>
<title>....</title>
<vendor>....</vendor>
<homepage href="http://somesite.com"/>
<description>....</description>
<icon href="http://....gif" kind="default"/>
<shortcut online="true" install="false">
<desktop/>
<menu submenu="...."/>
</shortcut>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always"/>
<resources>
<java initial-heap-size="20971520" max-heap-size="536870912" java-vm-args="-XX:MaxPermSize=128m" href="http://java.sun.com/products/autodl/j2se" version="1.6.0_11+"/>
<jar href="http://......jar" download="eager" main="false"/>
... some other JARs...
</resources>
<application-desc main-class="com.package.....">
<argument>-showSavePwd</argument>
<argument>-forcedHttpsLoginPort:443</argument>
<argument>-availableLanguages:en;fr;de;es;ja</argument>
<argument>-forceCountryByLanguage:false</argument>
</application-desc>
</jnlp>
谢谢