[jboss-jira] [JBoss JIRA] (WFLY-166) Clearing server environment in bootstrap breaks embedded server restart

Jason Greene (JIRA) jira-events at lists.jboss.org
Thu Jul 18 01:12:03 EDT 2013


     [ https://issues.jboss.org/browse/WFLY-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Greene updated WFLY-166:
------------------------------

    Fix Version/s: 8.0.0.Beta1
                       (was: 8.0.0.Alpha3)

    
> Clearing server environment in bootstrap breaks embedded server restart
> -----------------------------------------------------------------------
>
>                 Key: WFLY-166
>                 URL: https://issues.jboss.org/browse/WFLY-166
>             Project: WildFly
>          Issue Type: Bug
>          Components: Server
>            Reporter: Thomas Diesler
>            Assignee: Bartosz Baranowski
>             Fix For: 8.0.0.Beta1
>
>
> Recursively deleting tmp directories as part of Bootstrap.bootstrap() prevents multiple embedded server restarts. I believe it has to do with how directories are crated as part of static VFS initialisation.
> TempFileProvider has this static code
> {code}
>     static {
>         String configTmpDir = System.getProperty(JBOSS_TMP_DIR_PROPERTY);
>         if (configTmpDir == null)
>             configTmpDir = System.getProperty(JVM_TMP_DIR_PROPERTY);
>         try {
>             TMP_ROOT = new File(configTmpDir, "vfs");
>             TMP_ROOT.mkdirs();
>         }
>         catch (Exception e) {
>             throw new RuntimeException("Can't set up temp file provider", e);
>         }
>     }
> {code}
> which creates the vfs directory only once that [this patch|https://github.com/jbossas/jboss-as/commit/ad3e878098] removes. As a consequence on server restart with jboss-vfs on the boot classpath hte vfs directory is missing an no tmp file can be created.
> Generally, the server should only remove state on shutdown that it creates itself on startup/run. Alternatively, jboss-vfs should support a start/stop lifecycle in the TempFileProvider and possibly in other entities that also use static initialisers.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list