[jboss-jira] [JBoss JIRA] (AS7-4090) Opimize organization and management of the Infinispan subsystem
Richard Achmatowicz (JIRA)
jira-events at lists.jboss.org
Tue Mar 20 17:16:49 EDT 2012
[ https://issues.jboss.org/browse/AS7-4090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678151#comment-12678151 ]
Richard Achmatowicz commented on AS7-4090:
------------------------------------------
There was a general problem encountered when implementing performRuntime() and restoreServices() using the existing methods installRuntimeServices() and restoreServices().
The problem is that the portions of the model available when calling performRuntime() and recoverServices() are not the same - when we call recoverServices(), the cache container/cache portions of the model have already been removed, and we cannot navigate to them using Resource.Tools.readModel(context.readModel(<some address>)), as was required in the initial implementations of installRuntimeServices() and restoreServices(). The model instead needs to be obtained from the ModelNode model parameters passed to recoverServices().
Therefore, installRuntimeServices() had to be refactored so that we pass in the correct models according to the context we are executing in, as parameters, and we don't look them up based on navigation from within the method as before.
So, of:
{noformat}
installRuntimeServices(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler handler, List<ServiceController<ServiceController<?>> newControllers) {
...
// look up the models for container and cache
..
}
{noformat}
we instead do
{noformat}
// look up the models for container and cache
installRuntimeServices(OperationContext context, ModelNode operation, ModelNode containerModel, ModelNode cacheModel, ServiceVerificationHandler handler, List<ServiceController<ServiceController<?>> newControllers) {
...
}
{noformat}
> Opimize organization and management of the Infinispan subsystem
> ---------------------------------------------------------------
>
> Key: AS7-4090
> URL: https://issues.jboss.org/browse/AS7-4090
> Project: Application Server 7
> Issue Type: Task
> Components: Clustering
> Affects Versions: 7.1.0.Final
> Reporter: Richard Achmatowicz
> Assignee: Richard Achmatowicz
> Fix For: 7.1.2.Final
>
>
> There are a number of areas where the Infinispan subsystem is organizationally deficient:
> - does not make use of ResourceDefinitions to (i) simplify the generation of DescriptionProviders and (ii) localize the definition of AttributeDefinitions
> - handlers are in some cases written from scratch rather than subclassing helper handlers such as AbstractWriteAttributeHandler, AbstractAddStepHandler, AbstractRemoveStepHandler, etc.
> - collections of services are defined monolithically, rather than in distinct units which makes stopping/restarting them error prone (c.f. CacheContainerAdd, CacheAdd install three or four services each with complex processing - stopping and restarting this in another handler is next to impossible)
> - ServiceNames are not always easy to reconstruct
> These issues make maintenance of the subsystem hard. These matters can be helped by:
> - making use of ResourceDefinitions
> - defining for each service X a static method installX(context, operation, model) and removeX(context, operation, model) which can be made use of in installServices(context, operation, model) and removeServices(operation, context, model)
> - define the static method populate(), used to populate a model from an operation, which can be reused in populateModel(), creating describe operations, as well as other contexts
> - define a static method installServices(context, operation, model) which can be used in performRuntime(), and in contexts where all services for a resource need to be stopped and restarted; similarly define removeServices(context, operation, model)
> - make sure each ServiceName can be regenerated easily (c.f. regenerating JNDI names can involve model processing)
--
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