// Set-up the first Node.
ctx1 = new ProtocolContext();
ctx1.init("Node1");
ctx1.start();
node1 = new NodeImpl(nodeInfo1, ctx1.tp, ctx1.cp, ctx1.factoryTransport());
GFileManager localManager =
new LocalGFileManager(fileSystem, root, lockManager);
GFileManagerProxy proxy =
new GFileManagerProxy(node1, localManager);
node1.doStart();
proxy.doStart();
localManager.doStart();
// Set-up the second ServerNode.
ctx2 = new ProtocolContext();
ctx2.init("Node2");
ctx2.start();
node2 = new NodeImpl(nodeInfo2, ctx2.tp, ctx2.cp, ctx2.factoryTransport());
EndPointProxyInfo proxyInfo =
new EndPointProxyInfo(fileSystem,
new Class[] {GFileManager.class},
new NodeInfo[] {nodeInfo1});
fileManager = (GFileManager) node2.factoryEndPointProxy(proxyInfo);