Skip to main content

System cache? has this ever worked or is it a bug?

9 replies [Last post]
herpgps
Offline
Joined: 2003-06-11

I have tried to use system cache as a solution for deploying our client on a citrix server, but have noticed the following

if I import our client into system cache from a dos prompt this works fine. As long as the jnlp file contains offline allowed tag.

BUT

if I uninstall my client and remove the offline allowed tag from the jnlp file, then the following happens.

I can import into system cache as usual but each time I make a simple change to the jnlp file on the server, for example add a new argument tag, then when the application is started and does an update, the application also appears in the user cache?,

So WHATS happening here I did an enterprise lock down through the deployment.properties file and I import into system cache, the first time with -import -system from the cmd line, shouldent everything stay within the system cache.....? Is this not a bug

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
andyherrick
Offline
Joined: 2005-04-17

The real point here is that if a user runs a system cached application, and finds an update, that update will go in the user cache.
The model here is that when the user runs (not in system mode) he may not have privilige to write to the system cache. So the system cache will only be written to when javaws is run in system mode.

That being said, in the case specified, only the jnlp file is written into the users cache. This shows up as an "application" in the users cache, but all of it's resources still only exist in the system cache.

Any other user that runs will also re-download the updated jnlp file. To update the system cache so that users will not get the update, javaws must be run in system mode (with either -import or not).

/Andy

herpgps
Offline
Joined: 2003-06-11

Hi Andy,
>>The model here is that when the user runs (not in system mode) he may not have privilige to write to the system cache. So the system cache will only be written to when javaws is run in system mode

But the person who deployed the application into the users system cache did have permission, the ADMIN , therefore all updates to the application should be updated in the same place, system cache.

>>That being said, in the case specified, only the jnlp file is written into the users cache. This shows up as an "application" in the users cache, but all of it's resources still only exist in the system cache.

So if I understand you correctly, you are saying that all updated resources are pulled into the system cache, and only the updated jnlp file is pulled into the user cache?

andyherrick
Offline
Joined: 2005-04-17

The cache viewer shows the cached jnlp files as "Applications".
If a user updates a resource (a jar, jnlp file or other resource) the updated version will be put in his cache. (running in normal mode nothing is modified in the system cache).
So, in the case you describe, after updating just the jnlp file, the jnlp file will be in the user cache, even though all the jar and other resources are loaded from the system cache.

/Andy

andyherrick
Offline
Joined: 2005-04-17

It is only the updated resources (in this case, just the jnlp file) that are put in the user cache.
A JNLP file shows as a "application" in the Java SE 5.0 Cache Viewer, but if you look at the size, only the jnlp file is there (if thats all that has been updated).
The user cannot update the system cache, so any updates that occur on the web after the application is imported into the system cache will need to be downloaded into the users cache.

herpgps
Offline
Joined: 2003-06-11

Andy, thanks for confirming this, but can you take this up for review with the web start team, because what has been deployed into system cache should also be updated in the system cache, or at least have an option to keep an update in the system cache, we have a lot of customers that use citrix terminal servers on Windows 2003 server, our java client has to be updated manualy because of the update being pushed into the user cache, we found that using system cache reduced the user profile foot print overhead

What supprises me most is that this breaks the whole idea behind being deployed web centric, if I deploy to a specific cache then it should remain there, even if it was updated on the server, that was the reason it was imported into the system cache in the first place.

On a final note if the admin importing into system cache wishes not to update system cache when an update is avaliable, then add an option when importing to block updates or allow updates to the systen cache, during import

evickroy
Offline
Joined: 2004-07-23

Just curious, but do you have all of your libraries specified in your main JNLP file? I believe you need to reference your libraries in the System cache as an extended resource. That way they have their own JNLP file and won't be updated unless their JNLP file indicates an update. Create a separate JNLP file and reference it like so in your main JNLP file:
[code]

...

...

[/code]

Then your System cached libraries shouldn't be pulled down when you just change a property in the main JNLP file.

Hope this helps.
Erik

herpgps
Offline
Joined: 2003-06-11

I have now tried using extension but this has no effect still the same result except that the second .jnlp when changed is now placed in the user cache, this should stay in the system cache, I think I'll report this as a bug

As an added twist, if you use -uninstall on your first .jnlp file then you cannot uninstall your second .jnlp from the system cache, my last test was done on a windows professional box with SE 5.0 update 7

Message was edited by: herpgps

evickroy
Offline
Joined: 2004-07-23

When you say the extensions have no effect, are saying that the 2nd jar represented by the 2nd JNLP file is being downloaded when the only thing you modified was the 1st JNLP?

There are two things being discussed here as I understood them:
1) You have 2 jar files. You don't want the 2nd jar file to be downloaded if all you change is a parameter within the JNLP file.
2) Your jar file that you "pinned" in the System cache only updates to the User cache if an update is detected.

#1 should be solved by using extensions or versioned jar files. By default, Webstart checks the timestamp of the jar files to determine if they have changed. If you automate your deployment and rebuild your jar files, then their timestamps will always be different. Using version based updates is a little more involved to set up, but gives better control of what gets updated. You can find links to more information on version based downloads at [1].

#2 isn't a bug IMO. There isn't a lot of documentation on the intentions or use of "pinning" to the System cache, so I could be completely wrong here. My understanding of using the System cache is to allow system administrators to "pin" certain libraries into the System cache so that multiple applications/users could share the libraries. If one user was allowed to update the "shared" library, it has the potential to break applications for other users. I'm guessing that this is why it is intended for an administrator to "pin" it in the System cache. I believe this is also why it is updated into the User cache, when you run it and it detects a new version. You got the new version and it didn't affect any other users. Like I said, there isn't a lot of documentation on this, so this is just my guess.

Erik

[1] https://deployment.dev.java.net/

herpgps
Offline
Joined: 2003-06-11

Ok first things first more detail, I have an enterprise client which is deployed within the customers intranet from an IBM i5 we have been deploying updates to our customers servers for years with javaws since 1.0.1 to PC's, which is broken up into multiple jar files, 15+ lazy, native, via a single .jnlp file ect.. ect.. and this has worked great within the enterpise within a PC based farm.

My first post was that we have the last year and a half been deploying our client via java web start out to our customers citrix servers instead of PC's. The PC's do not need to install java they use a citrix client. This has also worked great but we found that we got a better performance by using the web start system cache because of reducing transport over head of multiple user cache on the citrix server.

So my question was but worded in another way:

I have one .jnlp file with many jar resources, which can be individually updated, either a change can be made to the .jnlp file or a jar file may be added or updated, thus a new entry would be made in the .jnlp file, but being web centric it would update its self. So time stamping here works on both the .jnlp file and the .jar files.
So these updates should be updated within the system cache, not the user cache, as I imported and set up the server to use only the system cache.

Currently the only way to solve this problem is to manually -uninstall and then -import .jnlp from the cmd line

Message was edited by: herpgps