[jboss-as7-dev] deprecate/remove or change ServerEnvironment.getModulesDir() which returns a single File representing the AS7 Modules directory path....

Scott Marlow smarlow at redhat.com
Wed Jul 27 16:30:24 EDT 2011


I tried changing the testsuite/pom.xml to allow a hibernate3 test to 
supply its own jars in the hibernate3 module (otherwise would be an 
empty module), 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.

Earlier today on IRC, we discussed whether the modules directory should 
be returned from ServerEnvironment.  The concern being that the boot 
module loader might not be filesystem accessible (returning as a File 
instance could be wrong).  The other concern is that the module path can 
contain multiple paths (separated by native OS file separator).

The suggestion on IRC was for OSGi to use the server home directory 
instead (ServerEnvironment.getHomeDir()).

How can/should we solve this?  Change the AS7 OSGi integration code to 
stop using ServerEnvironment.getModulesDir()?  Can we remove the 
ServerEnvironment.getModulesDir() or should we deprecate it?  If we 
deprecate it, perhaps it should return File[] to represent the possible 
multiple module directories.  Does anyone know of any external caller 
into ServerEnvironment.getModulesDir()?

Scott


More information about the jboss-as7-dev mailing list