geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <>
Subject Questions about o.a.g.kernel.deployment.service.ClassSpaceMetadata
Date Sun, 30 Nov 2003 13:57:42 GMT

Could anyone care to comment on 
o.a.g.kernel.deployment.service.ClassSpaceMetadata's (final) attributes 
- CREATE_* - in a form of javadoc?

Although the names are selfexplanatory, neither is their use.

org.apache.geronimo.kernel.deployment.task.CreateClassSpace's perform() 
does the following:

   if (!server.isRegistered(name)) {
     if (metadata.getCreate() == ClassSpaceMetadata.CREATE_NEVER) {
       throw new DeploymentException("No class space is registerd with 
name: objectName=" + metadata.getName());
     // other lines follow
   } else {
     if (metadata.getCreate() == ClassSpaceMetadata.CREATE_ALWAYS) {
       throw new DeploymentException("A class space is already 
registered with name: objectName=" + metadata.getName());

So, I'm reading it when a class space name is not registered *and* that 
class space's attribute is set to CREATE_ALWAYS DeploymentException is 
thrown. I wouldn't expect to have it thrown. I'd rather create yet 
another class space and register it in the MBeanServer. Also I don't 
understand the lines after the check of the name's registration. If the 
name is registered, why do we need to check if the metadata needs to be 
created or not?

Another note is about getUrls() method. Shouldn't the method return 
Collections.unmodifiableList? Why is the list allowed to be modified by 
external entities? 
buildClassSpace() confuses me even more wrt the use of the list. 
findPackedArchives() and findUnpackedArchives() add a url, but the names 
imply the opposite.

I have to be missing something obvious. The tests are the only rescue? 
Where can I find them?


View raw message