Java Reference
In-Depth Information
Standard solutions are difficult to employ here, for both technical reasons (given the peculiarity
of hardware connections) and economic reasons (the costs of third-party deployment tools
whenever usable in such a particular context).
We will illustrate a solution that will ensure full compatibility with the already-running old
Java software, using a well-known technique for dynamic class loading that is widely used in
commercial deployment systems. The only cost to pay, apart from development, is for redis-
tributing a J2SE-based new client version to all clients.
The adopted solution will show us several things:
•Typical trades-off when designing a custom deployment solution with the important pri-
ority of backward compatibility.
• The custom class loader mechanism at work. This technique is used (among the others)
in JNLP client implementations.
•How to ensure full compatibility of existing code while providing advanced deployment
features.
The Old System
For simplicity, we think of a basic, simple, pre-existing system, with a classic client-server
architecture. All clients communicate with the central server using socket connections on pro-
prietary hardware. This drastically cuts down the choices we have for third-party, inexpensive
solutions; and practically leaves us with the ad-hoc approach only.
In Listing 6.1, the client of the previous system is shown:
L ISTING 6.1 The OldBankClient Class
package com.marinilli.b2.c6.bank;
import java.io.*;
import java.net.*;
/**
* Chapter 6 - The old BankClient
*
* @author Mauro Marinilli
* @version 1.0
*/
public class OldBankClient {
Socket socket = null;
DataOutputStream out = null;
Search WWH ::




Custom Search