All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----com.sun.jaw.impl.agent.services.mlet.MLetSrv
|
+----com.sun.jaw.impl.agent.services.mlet.MLetCacheVersionSrv
MLetSrv class to provide caching and
version control. This is achieved by overriding the check
method of the MLetSrv class.
The check method is invoked to determine whether a
.jar file is to be downloaded across the network from the
server, or locally from the cache. It does this by comparing the value of
the VERSION attribute in the MLET tag with the
version number of the .jar file stored locally.
If the version in the cache is older than that specified in the
MLET tag, the .jar file is loaded
from the server. Otherwise, it is loaded from the cache. If the caching
directory does not exist on the system or the agent does not have the
permission to write to it, then the .jar files will be always
loaded from the server and versioning will not be carried out.
Information on the version numbers of cached .jar files is
stored in a file named VERSION in the cache directory. The m-let service
updates the version number of a .jar file with the value of the
VERSION attribute in the MLET tag each time it loads
the .jar file from the server.
The VERSION file is an ASCII file in which each line contains
the name of a .jar file and its version number. The version
number is a series of non-negative decimal integers each separated by a period from the one
that precedes it.
Example VERSION file:
firstfile.jar 1.0 secondfile.jar 3.0 thirdfile.jar 1.0.1 fourthfile.jar 2.1 ...
The directory in which cache files are stored by default depends on the operating environment:
| Environment | Directory |
|---|---|
| Solaris | /var/opt/SUNWconn/jaw/mletcache |
| Windows NT | installDir\SUNWconn\jaw\var\mletcache |
.jar file is to be downloaded across
the network from the server, or locally from the cache.
public MLetCacheVersionSrv()
public synchronized URL check(String version,
URL codebase,
String jarfile,
MLet mlet)
.jar file is to be downloaded across
the network from the server, or locally from the cache. The method does this by
comparing the value of the VERSION attribute in the MLET
tag with the version number of the .jar file stored locally.
If the version in the cache is older than that specified in the
MLET tag, the .jar file is loaded
from the server. Otherwise, it is loaded from the cache.
.jar file stored locally.
.jar file.
.jar file to be loaded.
MLet instance that represents the
MLET tag.
.jar file is to be loaded from.
public static String getClassVersion()
public String getCacheDirectory()
public void setCacheDirectory(String cache_dir)
All Packages Class Hierarchy This Package Previous Next Index