Example usage for org.apache.commons.vfs FileSystemManagerWrapper close

List of usage examples for org.apache.commons.vfs FileSystemManagerWrapper close

Introduction

In this page you can find the example usage for org.apache.commons.vfs FileSystemManagerWrapper close.

Prototype

public void close() 

Source Link

Usage

From source file:org.kalypso.simulation.grid.TestSimpleGridProcess.java

public void testGridProcess() throws Exception {
    final String processFactoryId = "org.kalypso.simulation.gridprocess";
    System.setProperty("GLOBUS_LOCATION", "d:/workspace3.4/org.globus.ws.core");
    final String sandboxRoot = "testRma";

    final FileSystemManagerWrapper manager = VFSUtilities.getNewManager();

    final String rmaName = "RMA10Sk_35";

    final IProcess process = KalypsoCommonsExtensions.createProcess(processFactoryId, sandboxRoot, rmaName);
    process.environment().put("OMP_NUM_THREADS", "4");

    final String sandboxDirectory = process.getSandboxDirectory();
    final FileObject workingDir = manager.resolveFile(sandboxDirectory);
    copyFileToWorking(manager, workingDir, rmaName);
    copyFileToWorking(manager, workingDir, "model.2d");
    copyFileToWorking(manager, workingDir, "control.r10");

    process.startProcess(System.out, System.err, null, null);

    final FileObject resultFile = workingDir.resolveFile("A0001.2d");
    if (!resultFile.exists())
        fail("Result was not created!");

    manager.close();
}