[jboss-jira] [JBoss JIRA] (AS7-1412) ServerEnvironment accepts invalid or non-existent directory configurations

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Wed Feb 22 10:49:37 EST 2012


    [ https://issues.jboss.org/browse/AS7-1412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670006#comment-12670006 ] 

Brian Stansberry commented on AS7-1412:
---------------------------------------

This is unfortunately probably a case by case thing, since there are a variety of flavors of wrongness.

The home dir: if it doesn't exist or isn't a dir, fail.

The modules dir: See the javadoc related to this sysprop/getter -- this is a meaningless thing. So, we should only fail if the user sets the sysprop and it doesn't exist. Since setting the prop indicates the user had some intent that has gone wrong. We shouldn't fail just because there's no "modules" dir under the home dir.

The configuration dir must exist and must be a directory (although we need to be careful in ServerEnvironment in a managed domain, where the configuration dir does not need to exist.)

The bundles dir is IMO like the modules dir. If people don't use OSGi and decide to delete that dir, we shouldn't fail here. OSGi can check it and fail there. But we should fail if they set the system property and the dir doesn't exist, as that implies intent.

The data/ and tmp/ dirs we should probably check for the existence of the file. If it exists, fail if it isn't a directory. Otherwise, try and create it and fail if we can't. We know later on we are going to try and create these, so might as well do it now.

The log dir is more like modules/bundles, since whether the dir is needed depends on the logging config.


                
> ServerEnvironment accepts invalid or non-existent directory configurations
> --------------------------------------------------------------------------
>
>                 Key: AS7-1412
>                 URL: https://issues.jboss.org/browse/AS7-1412
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Server
>            Reporter: Thomas Diesler
>            Assignee: Kabir Khan
>             Fix For: 7.1.1.Final
>
>
> I tried changing the testsuite/pom.xml to allow tests to override certain AS7 modules, by adding a "testsuite" modules entry to the module.path.  It looks like OSGI gets confused by multiple entries in the module path.
> module.path = /home/smarlow/work/as7/testsuite/compat/target/jbossas:/home/smarlow/work/as7/testsuite/compat/../../build/target/jboss-as-7.1.0.Alpha1-SNAPSHOT/modules
> server.log http://pastie.org/2278519 that shows what looks like an OSGI error.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list