Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] PDE2Virgo Plugin

Daniel,

I had a quick look at the Server Editor Startup section where -clean, tail and permsize can be configured.

The only changes I applied in the last year to the involed classes are:
1) reformat source code to match the server code-base formatting preferences
2) use NLS to externalize hardcoded strings

When you flag any of the options the selection is passed to the server runtime which stores the information in a property store provided by some WTP base class.

That code works fine. In fact, if I select clean, the next time I start the server the stage and the serviceability folders get deleted.
However, this is not done by really passing the -clean parameter to the server (as the UI claims) but it's rather done by the tooling that checks the user selection and if needed deletes such folders right before starting the server Java process. This is visible here:

 public void preStartup(IServerBehaviour serverBehaviour) {
        File serverHome = ServerUtils.getServer(serverBehaviour).getRuntimeBaseDirectory().toFile();
        File workFolder = new File(serverHome, "work");
        if (ServerUtils.getServer(serverBehaviour).shouldCleanStartup()) {
            PublishHelper.deleteDirectory(workFolder, new NullProgressMonitor());
            PublishHelper.deleteDirectory(new File(serverHome, "serviceability"), new NullProgressMonitor());

        }
        new File(workFolder, "tmp").mkdirs(); // Fix 464814
        createRepositoryConfiguration(serverBehaviour, getRepositoryConfigurationFileName());
    }

So the setting is indeed honored, even if the "-clean" parameter is not really passed to Virgo. This happens because "-clean" is implemented in the shell scripts, not in the Java code, and because the IDE launches Virgo as a Java program without using the shell scripts, it cannot pass the "-clean" parameter and has to do the cleaning by itself.

Similarly, the tail parameter seem to be properly managed.

--
Gian Maria Romanato
<gm.romanato (at) gmail (dot) com>

Back to the top