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

 
GianMaria,
 
| 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.
 
Ok, thank you for looking at it at a deeper level, I was not aware of that fact.
 
| Similarly, the tail parameter seem to be properly managed.
 
But what is the expected effect when selecting this option in the server dialog? I expect to see the application trace log in the Eclipse Console View when I select this option, but I can only see the event logs as before I selected this option. Or do I misunderstand this feature?
 
Regards,
Dani
 
Gesendet: Mittwoch, 13. Januar 2016 um 23:13 Uhr
Von: Giamma <gm.romanato@xxxxxxxxx>
An: "Virgo Project" <virgo-dev@xxxxxxxxxxx>
Betreff: 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>
_______________________________________________ virgo-dev mailing list virgo-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/virgo-dev