Developers guide
56
6.5.1 External libraries
The solution discussed previously must be further developed to account for the versioning of the
library files that the APT system uses. The upgrading of third party jar files must not compromise
the ability of older versions or the APT to use the original versions of these libraries.
A possible solution could be to simply package all the required jar files within the APT
deployment directory, such that each version of the APT has its own copy of the libraries. This will
work, although it is very inefficient. For example, suppose a trivial change is made to the apt.jar
file and deployed as a new version. Web Start clients will be forced to download the entire
application again, since it considers the library files to be different, consequently defeating the
purpose of using Web Start in the first place. Likewise, for the developer, deployment of the new
version will require uploading of all the library files to both the web server and mistral. Given that
the jar files alone have reached up to 2MB in size this could take some time.
A better solution is to store libraries together, and simple monitor the changes to this directory.
Historical uses of the jar files can be preserved as long as the following two rules are obeyed.
• No library file
i
is ever overwritten.
New libraries must simply be added to the lib module with a different file name. Thus
preserving the existing references in other versions of the APT. The APT configuration files must
be modified to now reference the new library.
• All usages or library files must be specifically referenced in configuration files.
Thus enabling alternate libraries to be referenced in the future under a different name. As
opposed to setting the java.ext.dirs
ii
system property.
When used in conjunction with Web Start, clients will only be required to download resources
that have changed. Also, if the naming convention shown in Figure 6-1 is used, the JARDiff
functionality ( only available in the JnlpDownloadServlet) will enable even faster download
times.
6.6 Uploading
Once the apt__V<version-key> dir has been created using the ant-prepare target the
application is ready for deployment. It must be copied to mcba5 and to mistral. Mcba5 is the
host used to subsequently deploy the Client applications using Web Start, and mistral is the live
server connected to the APT hardware. In the future it will be possible to run the server
application using a command line JNLP implementation, reducing this upload time. However, a
more fine grained level of control on the server side is preferred. A dependency on mistral’s
unreliable Internet connection must not prevent the operation of the telescope.
SecureCopy is used to perform the file transfer. Scp is an open source, secure file transfer utility
available on both windows, UNIX and Linux. Instructions on installing scp on windows are
included in Appendix C.1.1.
i
Any file in the /lib module
ii
All jar files in the java.ext.dirs directory are implicitly added to the CLASSPATH










