7.2 Using the Kalong Component 273
17 finally
18 {
19 if( iKalong.prepare() )
20 {
21 iKalong.commit();
22 } else
23 {
24 iKalong.rollback();
25 }
26 }
27
28 iKalong.setMirrorAgency();
In line 28 the current agency is defined to be a mirror agency from this
point on.
Release a Code Server or Mirror Agency
Now we can show an example of how to release a remote code server or
mirror agency by sending a header command. Releasing code servers is an
important task for freeing resources at the other agencies that currently hold
a copy of the agent’s code. Releasing mirror agencies is necessary for defining
a new mirror, as mentioned previously.
Following is an example of how to release a code server.
1 try
2{
3 URL codeServerToRelease = new URL(“tcp://tatjana.cs.uni-jena.de ...