Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4518461

EOU: Applets and Jar -caching

XMLWordPrintable

    • 1.4
    • generic
    • generic



      Name: ddT132432 Date: 10/23/2001


      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

      Problem;
      jar-files are checked for updates only when the JVM initializes (i.e. a browser
      restart)
      I have an applet, using 4-5 signed .jar files located on the web-server. The
      JVM downloads updated jar files on the server when the user initializes the
      JVM, skipping the ones not changed and already downloaded.

      What I want to do is a way to tell the JVM that it should check for new jar
      files whenever a user browses a html page containing an applet, not requiring
      the user to restart his browser to be able to catch up on updated code.
      (Or shift-clicking reload or something, the user shouldn't be asked to
      do anything!)

      I'm willing to sacrifice overhead reloading the JVM into the browser, if this is
      possible somehow with java-code, without restarting the browser. To bad
      System.exit() also kills the browser... a System.reload() would be nice...

      There exists some possibilities already, but those are not good enough;

      * Using ClassLoader to manually check and download updated .jar's
        This is pretty muchy to implement in a big project, if you cannot provide
        an easy way for me to auto-reload every class contained in the jar, and
        possibly new ones.

      * Restart browser, or shift-clicking.
        The user shouldn't be responcible to reload new .jars, the user should be
        able to have a long lived browser session and still have the benefits of
        new code.

      * PARAM=cache_version.
        Haven't tried this yet, but this requires the developer to modify all
        dependent html/applet pages using the jar whenever new code is introduced,
        which is not a good sollution for a big and complicated site.
        And by the way, the JVM already knows at initialization which .jars are
        updated and which are not, why can't the developer utilize this runtime?

      Having a good solution for this will also ease the development/testing process
      significantly, just having Forte/Ant publish only the changed jars to the web-
      server, instant testing in the browser (without requiring a restart of the
      browser, which is error prone in the case the developer forgets to restart the
      browser/JVM to get the changed code)

      I hope you can provide a good sollution to this in the near future.

      By the way, Forte for Java rules!
      (Review ID: 134275)
      ======================================================================

            djayaramsunw Devananda Jayaraman (Inactive)
            ddressersunw Daniel Dresser (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: