You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "David J. M. Karlsen" <da...@davidkarlsen.com> on 2005/03/21 21:49:40 UTC
Problems with JBoss Unified Class Loading?
Hi!
I have a user which have problems using my hivemindbased libraries in a
JBoss environment. The same library/API works fine in a standalone JVM
(1.4.2_07 sun) or under IBM WebSphere (Sun 1.3.x JVM).
I have the hivemodule.xml in a file outside the classpath/appserver, and
load the configuration like this (at classloadtime, in a static block),
in a singleton class:
private static final Log log = LogFactory.....
private static Registry registry;
static {
RegistryBuilder regBuilder = new RegistryBuilder();
ClassResolver resolver = new DefaultClassResolver();
regBuilder.processModules( resolver );
URLResource urlresource = new URLResource(
System.getProperty("myapp.hivemind.configfile","file:/mypath/properties/hivemodule.xml"));
log.info("Config-URL for HiveMind: " + urlresource.toString());
regBuilder.processModule( resolver, urlresource );
registry = regBuilder.constructRegistry(Locale.getDefault());
log.info("Registry bootstrapped");
}
and later she obtains the services through a method on the same singleton, something like this:
public Object getService(Class clazz){
return registry.getService(clazz);
}
I have a EagerLoad contribution in the config-file, and the debug complains over my configfile contributing to an unknown hivemind.EagerLoad service. The log does not say anything about parsing the HiveMind internal hivemodule.xml configurationfiles.
This leads me to a conclusion that the hivemodule.xml inside hivemind-1.0.jar and hivemind-lib.jar does not get loaded in a JBoss Unified Class Loading environment (JBoss does some "nifty" classloading).
Is this a known problem - and if so, will it disappear with the 1.1 release?
Any clues will be greatly appreaciated.
Kind regards,
David
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org