Jar caching mechanism

Hi,
We have a web app consisting of different applets which are loaded from different servers. They are loaded and unloaded frequently. Some of the jar files are identical on all servers. Is there an easy way for these applets sharing the same jars so they don't get loaded separately for each applet but get loaded only once?
Any help greatly appreciated since we are having serious memory problems.
Regards
Peter

Not an option because of dependencies on the server side.
I guess I will have to write a new AppletClassLoader.
Any ideas?
Peter

Similar Messages

  • Possible to check in Java, if if a package is already in the jar-Cache?

    I have an applet, that has only one main.jar in the Cache-Archive parameter.
    Because I wanted to reduce the preload-Time, since 1.4.0 I use an index.list file, listing
    the rest of jar-Files needed for my applet. So the jar-Files will be only
    downloaded to the time, they are needed, if they aren't already in the jar-cache.
    The Problem: If the applet needs a new jar-File, that isn't in the jar-Cache, it needs
    time to download the package. But the user doesn't see that something happens.
    Is it possible to check with JAVA in the applet, if a package is already in the jar-Cache?
    If i know this, I'll be able to show the user that the applet is currently downloading a package.

    do u mean a file in the JAR?
    if yes, yes u can check that.
    check this,
        public ImageIcon loadImage(String location)
    java.net.URL url =  null;
    url = getClass().getResource(location);
    if (url == null) then ...
        } 

  • Hi, I developed a web application using HTML5-Offline Application Cache mechanism. Inspite of deleting the cache as mentioned in the above steps, Firefox still maintains a copy of the page in it's cache. Also, a serious bug is, even though we delete all

    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    Hi,
    I developed a web application using HTML5-Offline Application Cache mechanism. Inspite of deleting the cache as mentioned in the above steps, Firefox still maintains a copy of the page in it's cache. Also, a serious bug is, even though we delete all temp files used by Firefox, and open the previously cached page, it displays it correctly, but upon refreshing/reloading it again shows the previous version of the page maintained in the cache.
    == Troubleshooting information
    ==
    HTML5: Application Caching
    .style1 {
    font-family: Consolas;
    font-size: small;
    text-align: left;
    margin-left: 80px;
    function onCacheChecking(e)
    printOutput("CHECKINGContents of the manifest are being checked.", 0);
    function onCacheCached(e) {
    printOutput("CACHEDAll the resources mentioned in the manifest have been downloaded", 0);
    function onCacheNoUpdate(e)
    printOutput("NOUPDATEManifest file has not been changed. No updates took place.", 0);
    function onCacheUpdateReady(e)
    printOutput("UPDATEREADYChanges have been made to manifest file, and were downloaded.", 0);
    function onCacheError(e) {
    printOutput("ERRORAn error occured while trying to process manifest file.", 0);
    function onCacheObselete(e)
    printOutput("OBSOLETEEither the manifest file has been deleted or renamed at the source", 0);
    function onCacheDownloading(e) {
    printOutput("DOWNLOADINGDownloading resources into local cache.", 0);
    function onCacheProgress(e) {
    printOutput("PROGRESSDownload in process.", 0);
    function printOutput(statusMessages, howToTell)
    * Outputs information about an event with its description
    * @param statusMessages The message string to be displayed that describes the event
    * @param howToTell Specifies if the output is to be written onto document(0) or alert(1) or both(2)
    try {
    if (howToTell == 2) {
    document.getElementById("stat").innerHTML += statusMessages;
    window.alert(statusMessages);
    else if (howToTell == 0) {
    document.getElementById("stat").innerHTML += statusMessages;
    else if (howToTell == 1) {
    window.alert(statusMessages);
    catch (IOExceptionOutput) {
    window.alert(IOExceptionOutput);
    function initiateCaching()
    var ONLY_DOC = 0;
    var ONLY_ALERT = 1;
    var BOTH_DOC_ALERT = 2;
    try
    if (window.applicationCache)
    var appcache = window.applicationCache;
    printOutput("BROWSER COMPATIBILITYSUCCESS!! AppCache works on this browser.", 0);
    appcache.addEventListener('checking', onCacheChecking, false);
    appcache.addEventListener('cached', onCacheCached, false);
    appcache.addEventListener('noupdate', onCacheNoUpdate, false);
    appcache.addEventListener('downloading', onCacheDownloading, false);
    appcache.addEventListener('progress', onCacheProgress, false);
    appcache.addEventListener('updateready', onCacheUpdateReady, false);
    appcache.addEventListener('error', onCacheError, false);
    appcache.addEventListener('obsolete', onCacheObselete, false);
    else
    document.getElementById("stat").innerHTML = "Failure! I cant work.";
    catch (UnknownError)
    window.alert('Internet Explorer does not support Application Caching yet.\nPlease run me on Safari or Firefox browsers\n\n');
    stat.innerHTML = "Failure! I cant work.";
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729; .NET4.0E)
    == Plugins installed
    ==
    *-Shockwave Flash 10.0 r45
    *Default Plug-in
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
    *NPRuntime Script Plug-in Library for Java(TM) Deploy
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *Google Update
    *4.0.50524.0
    *Office Live Update v1.4
    *NPWLPG
    *Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
    *Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
    *Npdsplay dll
    *DRM Store Netscape Plugin
    *DRM Netscape Network Object
    Thanks & Regards,
    Kandarpa Chandrasekhar Omkar
    Software Engineer
    Wipro Technologies
    Bangalore.
    [email protected]
    [email protected]

    We have had this issue many, many times before including on the latest 3.6 rev. It appears that when the applicationCache has an update triggered by a new manifest file, the browser may still use only its local network cache to check for updates to the files in the manifest, instead of forcing an HTTP request and revalidating both the browser cache and the applicationCache versions of the cached file (seems there is more than one). I have to assume this is a browser bug, as one should not have to frig with server Cache-Control headers and such to get this to work as expected (and even then it still doesn't sometimes).
    The only thing that seems to fix the problem is setting network.http.use-cache to false (default is true) in about:config . This helps my case because we only ever run offline (applicationCache driven) apps in the affected browser (our managed mobile apps platform), but it will otherwise slow down your browser experience considerably.

  • 1.4.2_01 and 1.4.1_01 jar cache doesn't seem to be working

    I am having a hard time getting the .jar cache to work with the 1.4.2_01 and 1.4.1_01 plugins.
    Here is my applet:
    ====================================================================
    import java.applet.Applet;
    import java.awt.*;
    public class TestApplet extends Applet {
         public void init() {
    setLayout(new BorderLayout());
              setForeground(Color.blue);
              setBackground(Color.white);
         Label label = new Label();
    String resourcePath = "/" + this.getClass().getName().replace('.','/') + ".class";
    String source =this.getClass().getResource(resourcePath).toString();
    System.out.println(source);
    label.setText(source);
              add(label,BorderLayout.CENTER);
    ====================================================================
    You will need to compile this class and put it in a TestApplet.jar file in the same directory that the html file is in. Delete TestApplet.class just for good measure.
    And here is the html that loads it up:
    ====================================================================
    <HTML>
    <BODY>
    <APPLET CODE="TestApplet" NAME="TestApplet" WIDTH="750" HEIGHT="50" CODEBASE="." >
    <PARAM NAME="cache_archive" VALUE="TestApplet.jar">
    <PARAM NAME="cache_version" VALUE="1.1.1.2">
    <PARAM NAME="cache_option" VALUE="Plugin">
    </APPLET>
    </BODY>
    </HTML>
    ====================================================================
    Now, I hope that I'm missing something really stupid here, but when I run this with the 1.3 plugin, the applet clearly states that the class file is loaded from the cached .jar file. For example, it prints out that the class file was loaded from:
    jar:file:/C:/WINNT/Profiles/xxxx/java_plugin_AppletStore/1.3.1_09/jar/TestApplet.jar19890069901.1.1.22036068943678200358.jar!/TestApplet.class
    But when I run this code with the 1.4.2_01 or 1.4.1_01 plugin I get this:
    jar:http://localhost/TestApplet.jar!/TestApplet.class
    and my access log files show this file getting loaded over and over and over again. Using the cached_archive_ex param doesn't help either.
    This is a over simplified example of a problem that is forcing my huge applet to run at 1/3 to 1/4 the speed that it should because of class loader thrashing due to excessing jar file loading.
    Have I missed something obvious?
    Thanks
    Andy

    Hi,
    i don't know but i encountered the same caching problems when plugin version 1.4.2_01 is used.
    Facts:
    -> jar Size: 1MB
    -> Added Parameters:
    <PARAM NAME="cache_archive" VALUE="xxxx">
    <PARAM NAME="cache_version" VALUE="4.1.1.266">
    <PARAM NAME="cache_option" VALUE="Plugin">
    -> Cache is set to unlimited
    No matter if jar-File is already stored in the cache the parameter "Cache-Control: no-cache" is set in the HTTP-Header.
    I have not found anything preventing this yet.
    Cheers
    Thomas

  • How to build cache mechanism

    Hello all
    i have application that basically loading very big object that contains sub objects and
    doing dynamic lookup by name of the object and the method i like to invoke and then invoke it
    everything done ofcorce with reflection .
    now this application will be called handeret times per minute .
    some questions .
    first of all do i need caching mechanism? for saving the subobject that had bean called in some kind of vector in memory for example or if i use reflection , i dont need caching mechanism .
    second question is do i need threads here ? if i do , how i buid some kind of locks to this threads ?
    thanks

    I'd use the Flyweight pattern here. It sounds like you're retrieving a lot of data that's related to other data through some kind of index. A Data Transfer Object (DTO) is a Flyweight class that could hold all of the information required to retrieve the "sub-objects" as you call them, but not until they're needed. It's a little more detailed to make sure that the objects are available when you need them, but obviously the network bandwidth/latency issues are causing a severe performance impact. I'm using EJBs in this example, but it will apply to anything where large amounts of related data are used in the application.
    // EJB Entity bean
    public abstract class EJBEntity extends EJBObject {
        public abstract Integer getId();
        public abstract String getStringData();
        public abstract Collection getChildObjects(); // "heavyweight" data
    // Data Transfer Object
    public class EJBEntityDTO {
       private int id;
       private String stringData;
       private int[] childIds;
    // some application code
    id = ...
    EJBEntityDTO dto = transferEJBData(id);
    EJBEntityDTO childDTO = transferEJBData(dto.childIds[0]);
    ...It's definitely more work to do it this way, but it's the only way to avoid fetching the entire collection when you only need one child object.
    Brian

  • Error unable to create jar cache in /tmp directory!

    I using tomcat4.0.2,but when I start the tomcat from %catalina_home%/bin using startup.bat, in the startup console printing "error unable to create jar cache in /tmp directory: java.io.IOException: System cant find the direct", and tomcat can be started, no problem when I access my web application.
    Why it happened?
    But if I start tomcat from startup menu of the system instead of using startup.bat, no error is thrown.

    anyone know it? Please tell me.
    I was puzzled about it.
    TIA

  • What is the caching mechanism firefox 3.6 uses compared to what IE 6/7 and 8/9 use?

    I just need to know how firefox handles/takes care of/and does its work with cookies and cache, basically its caching mechanism. Also comparing it to IE versions 6/7 and 8/9 would help, for the sake of web development with respect to the two browsers (Detailed technical answer would help). Since web apps may sometimes work on firefox and sometimes not while it works in IE just fine.

    Hi Kellymarr,
    You can take a look at the release notes for each version to see what has been added or fixed:
    http://www.mozilla.org/en-US/firefox/4.0/releasenotes/
    Just change the version number in the url to see each major release.
    Hopefully this helps!

  • Suitable Caching Mechanism

    Apoplogies if this is the wrong newsgroup. My J2EE App runs on Weblogic 8.1 and uses Oracle 9. It involves processing at times up to 50000 database records at a go. The Application applies an algorithm to each database record and then writes it's results to an output table which has a one to one mapping with the input table i.e I will be inserting about 50000 records. In order to improve performance I want to use JDBC batch inserts, however each output record is produced by a MDB (Message Driven Bean) from a pool.I guess I need a sort of cacheing mechanism which holds the records from the MDBs and some business logic to apply the JDBC batch insert to a chunk of the cache. I will probably need a timed event to perform this "flushing" of the cache periodically. Anybody have experience of doing something similar or able to provide a more elegant solution to the problem?
    TIA

    Hi Sailendra,
    In this case you can make use of BPM object if I understood your question correctly.
    In the component Cataloge make a BPM object and under that create attribute/attributes/array. Then the value you want to save/store keep it in a bpm object attribue and pass the bpm object from one process layer to another/as per your requirement. ex: bpmobject.attribute1Name = "Bibhu";
    You can acccess those values in another process/activities by bpmobject.attributeName
    bpmobject is the object that you created and the instance variable is of type created bpmobject.
    attributeName is the attribute where you stored the value.
    Regards
    Bibhu

  • Information on Java JAR cacheing

    I'm just looking for an explanation of the jar caching procedure. I had a jar on a clients PC (behind a cahing proxy), and although I updated the jar on the web server, the browser kept on displaying the old jar, I had the client cache as well as proxy cache cleared, with no change. This was only occuring on the pc's behind the proxy.
    The only solution was to create a new jar name, and update the HTML to look for the completely new jar name.
    Any ideas on where the browser was loading the jar from, and how can it be cleared.
    Thanks for the input

    Once the JVM is started by a browser it is never stopped, until all browser windows are closed (and the browser process exits). The JVM is responsible for the loading and caching of jars. You need to clear the JVM's cache.
    Typing 'x' in the Java2 plugin's console window will do this. I'm not sure how other JVMs work.

  • Turning off jar cache causes classnotfound with signed jar files

    Hi,
    I have a problem with applet signed jars when the java cache is turned off.
    With the cache turned off, I get a class not found for the first class it attempts to use from the signed jar file from an applet.
    If I turn the jar caching on, all works perfectly with no other changes.
    Anyone have any ideas? This is java 6u16.
    Thanks

    jkc532 wrote:
    .. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? From your comprehensive investigation and report, it seems so to me.
    ..I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?Just after read the summary I was tired, so I have some understanding of the effort you have already invested in this (the 'wits' you have already spent). I think you should raise a bug report and seek Oracle's response.

  • I want to know the caching mechanism of Firefox

    Hi everyone,
    i want to know how exactly caching mechanism works in firefox? I know for the cached objects we have two info
    Expire date or Max-age, how we use them while deciding if the object should be served from cache or not

    You neither described the problem you actually had nor the version you had. There may be other solutions such as described in the following answer which also tells you how to go back to to any version
    https://support.mozilla.com/questions/840344
    You can make Firefox 4.0.1 and '''Firefox 5.0''' look like Firefox 3.6.17, see numbered items 1-10 in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 look like 3.6)]

  • JNDI as a caching mechanism

    Hi,
    We are building an application using stateless session beans to access some
    back end systems. The backend transaction is rather expensive with regards
    to execute time. To optimize response times we are looking at a caching
    strategy, we have identfied the following implementation alternatives :
    1. Create object cache implementations as statefull session beans, storing a
    reference to them in JNDI.
    2. Create object cache implementations as regular java objects and storing
    the entire object in JNDI.
    Which one of these alternatives we choose will rely on the performance of
    the WL JNDI, we are using the 5.1 server. If WL JNDI is capable of handling
    reasonable amounts of data there should be no reason to use the expensive
    statefull session beans.
    Q1 : Are there any method to calculate the amount and troughput of data that
    would be possible using alternative 2 ?
    Q2 : Are there any other mechanism we should consider ?
    Any help would be greatly appreciated
    Regards,
    Anders Mathisen

    Read-Only entity beans are the entity beans which never call ejbStore() and
    ejbLoad() is only called when timeout is expired (or never).
    If you want to cache data for the session only you can use HttpSession - in
    the cluster all requests are pinned to the server which originated the session
    until this server fails. To minimize replication overhead you can use transient
    fields or use the fact that replication happens only when session attribute is
    set() - you can associate a cache object with the session and lazy populate it
    later.
    Anders Mathisen <[email protected]> wrote:
    hi,
    thanks for the response, what do you mean by read-only entity beans ?
    Beans that are loaded with data manually (from eg. a stateless session
    bean), and just used as a dataholder ?
    I forgot to mention in the previous article that the caching mechanism here
    needs only be local to a single users session. That is a session will never
    use cached data from another session.
    Althoug even if we have the requirement above, some caching mechanism
    allowing for sharing of data could be handy here, this is not an absolute
    requirement.
    Anders M.
    Rob Woollen <[email protected]> skrev i
    meldingsnyheter:[email protected]...
    Stateful session beans should not normally be used as a cache. A
    stateful session bean instance is associated with a single user.
    I wouldn't use JNDI as a caching mechanism either.
    My suggestion would be Read-Only entity beans.
    -- Rob
    Anders Mathisen wrote:
    Hi,
    We are building an application using stateless session beans to access
    some
    back end systems. The backend transaction is rather expensive withregards
    to execute time. To optimize response times we are looking at a caching
    strategy, we have identfied the following implementation alternatives :
    1. Create object cache implementations as statefull session beans,storing a
    reference to them in JNDI.
    2. Create object cache implementations as regular java objects andstoring
    the entire object in JNDI.
    Which one of these alternatives we choose will rely on the performanceof
    the WL JNDI, we are using the 5.1 server. If WL JNDI is capable ofhandling
    reasonable amounts of data there should be no reason to use theexpensive
    statefull session beans.
    Q1 : Are there any method to calculate the amount and troughput of datathat
    would be possible using alternative 2 ?
    Q2 : Are there any other mechanism we should consider ?
    Any help would be greatly appreciated
    Regards,
    Anders Mathisen--
    Coming Soon: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnweblogic.com
    Dimitri

  • Are there internal caching mechanism

    I recognized in my tests, that the response time of the IMDB Cache getting faster after serveral execution of the same SQL Command.
    Are there internal request caching mechanism? What ist the name of these functions?

    The TimesTen database maintains a cache of prepared SQL statements which is known as the command cache. Whenever a statement is prepared we first check to see if the statement already exists in the cache and if so we will use the existing cached plan rather than do a full prepare. This is similar to soft versus hard parse in the Oracle database.
    There are some builtin procedures that allow you to examine the contents of this cache; look in the TimesTen Database reference guide at the builtins that start with ttSQLCmd...
    Chris

  • On Caching Mechanism

    Hello All,
    We have implemented a caching mechanism using UET table. It is working fine whenever database tables get updated.
    My Question is:
    If we are viewing a report on the Dashboard at the same if the database tables get updated, Is it compulsion to press the Refresh button on the Dashboard to reflect the changes?
    We are thinking that if we traverse other tabs or other dashboards and coming back to the report which we are viewing will reflect the changes because now it will issue the SQL to the database rather getting the data from Cache as it is purged by cache mechanism.
    Is our assumption is wrong because we unable to see the updated data?
    -Vency

    Hi mma,
    As you suggested, we have checked 'Bypass Oracle BI Presentation Services Cache' and any changes to database reflecting on to dashboards without pressing refresh button.
    But, doing so , BI Presentation Server issuing SQL everytime rather selecting it from Cache, as we disable it. So, it is taking time everytime viewing the Reports on the Dashboard.
    Do we have any mechanism to purge the Presentation Services Cache manually like we do for BI Server cache at the time of updating database tables?
    Thanks,
    -Vency

  • Caching mechanism in OBPM

    HI ,
    Does OBPM have any caching mechanism(build in API) to store data .I have some data to be used in one of the process.I can't not connect to the external DB because my OBPM don't have a direct connection to external DB.Only way is queue.Every Time I can't post request in queue to get this data.
    Please help me
    Thanks
    Sailendra

    Hi Sailendra,
    In this case you can make use of BPM object if I understood your question correctly.
    In the component Cataloge make a BPM object and under that create attribute/attributes/array. Then the value you want to save/store keep it in a bpm object attribue and pass the bpm object from one process layer to another/as per your requirement. ex: bpmobject.attribute1Name = "Bibhu";
    You can acccess those values in another process/activities by bpmobject.attributeName
    bpmobject is the object that you created and the instance variable is of type created bpmobject.
    attributeName is the attribute where you stored the value.
    Regards
    Bibhu

Maybe you are looking for

  • Install.app Creative Suite CS5 will not start up on Mac OS X 10.9.4

    After a clean unistall I already reinstalled CS4, now i am trying to install the upgrade for disk or downloaded version from the Adobe site for Creative Suite Design Standard CS 5. When I try to start up the install.app I get the message that Install

  • C# Integration Request from CRM on demand

    I am trying to query the CRM just to see what kind contacts it holds. But no matter what I do I keep on getting HTTP server error 500. Now I have read here that it usually means that I am using the wrong URL. However I am using the same URL I use to

  • My ipod is showing reset format f ,plugged into my computer ,the comp then says unable to reset format;help!

    ive tried to reset my ipod 120gb and its saying that format F needs to be reset ,but my laptop is saying its unable to do this.Anybody help!

  • MRP Planning and AV Check

    Hi, During MRP run for a FG will Availabilitycheck be carried out..?? I have a FG with MRP type ND(No Planning) and Availability check KP(No Check) with these settings if I run MRP I know that Material will not be considered for MRP run, but will Ava

  • My Ibooks will not open samples anymore

    my Ibooks will not longer open samples.  before it was not a problem. just started recently .  when i click on "sample", it says "downloading" but then when that process ends, I am not able to open the sample. I have the latest version of Ibooks.  I