ByteArrayInputStream bais = new ByteArrayInputStream( externalizedContext );
ObjectInput oi = null;
CorrelationContext context = null;
try {
oi = new ObjectInputStream( bais );
context = (CorrelationContext) oi.readObject();
} catch ( IOException e ) {
throw new IllegalArgumentException( e );
} catch ( ClassNotFoundException e ) {
throw new IllegalArgumentException( e );
} finally {