geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gianny DAMOUR" <>
Subject Re: Questions about o.a.g.kernel.deployment.service.ClassSpaceMetadata
Date Sun, 30 Nov 2003 14:43:21 GMT

Jacek Laskowski wrote:
>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 
I think that one should understand it like this:
If the ClassSpace to be created or updated is not registered and if it 
should never be created, then there is an issue and one throws an exception.

For instance, suppose that one configures a service S1, which uses the 
ClassSpace A. One implements a service, S2, which needs to share the same 
ClassSpace than S1. To do so, one configures for S2 a ClassSpace, which 
re-uses the ClassSpace A. More accurately, one sets its name to A and in 
order to avoid typographic errors - a possible usage of this "create" 
attribute - one also sets its "create" attribute to "false".

>Another note is about getUrls() method. Shouldn't the method return 
>Collections.unmodifiableList? Why is the list allowed to be modified by 
>external entities?
As you can see, there is no method to add a URL to a ClassSpaceMetaData. 
External entities add URLs to a ClassSpaceMetaData by retrieving the 
modifiable URL list and adding to it some URLs. Have a look to 


Hotmail : un compte GRATUIT qui vous suit partout et tout le temps !

View raw message