... thing that you should do to ensure the consis-
tency of a transaction is testing. The Unit Testing and System Testing
patterns described in Patterns in Java, Volume 2 are useful in designing
appropriate ... in
Volume 2)
Ÿ
The Copy Mutable Parameters pattern (described in Volume 2)
Ÿ
The Copy on Write Proxy pattern, which is used as an example in the
description of...
... moveMe(m1,env2)
m2:MobileAgent
:Connection
1A.1: create(env2)
2A: readAck
5A: writeConfirm
:ObjectOutputStream
1A .2: writeObject(m1)
1A .2. 1: write
:ObjectInputStream
2B: m2:=readObject( )
2B.1: read
4A: ... way of doing things and Java s way of doing things.
Remote Method Invocation (RMI) is a Java- based Object Request
Broker implementation that is part of the core Java API. Because R...
... writing software for a new kind of smart food processor that turns
raw ingredients into cooked, ready-to-eat food by slicing, dicing, mixing,
boiling, baking, frying, and/or stirring the ingredients. ... SIX
:Client
p:ProtectionProxy
2b: doIt( )
:ServiceThread
2b .2: continueUsingTrustedThread()
{concurrency=guarded}
1:ServiceThread(p,s)
s:Service
2a.1.1:continueCall(s)
2a.1.1.1: doIt( )
The...
... object.
InputStream in = actualSocket.getInputStream();
int otherBufferSize
= new DataInputStream (in) .readInt();
BufferedInputStream bin;
bin = new BufferedInputStream (in) ;
actualIn = new DataInputStream(bin);
// ... connection.
26 6
■
CHAPTER SIX
RELATED PATTERNS
Singleton. The Singleton pattern (described in Volume 1) uses a
single instance of a class for an entire program. The...
... void
update(:Organization): void
protected Object instantiate(ResultSet rs) {
try {
long id = rs.getLong(1);
String name = rs.getString (2) ;
String cuisine = rs.getString (3) ;
// Create the <code>Restaurant</code> ... to
other objects. Updating the persisted version of such an object in a data-
base can involve the equivalent of updating multiple objects.
In the class di...