[jboss-jira] [JBoss JIRA] (AS7-3590) Deprecate OperationContext.getRootResource(); provide variant to get a read only view of an addressed branch of the Resource tree

Emanuel Muckenhuber (JIRA) jira-events at lists.jboss.org
Fri Feb 10 09:27:48 EST 2012


    [ https://issues.jboss.org/browse/AS7-3590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665643#comment-12665643 ] 

Emanuel Muckenhuber commented on AS7-3590:
------------------------------------------

Perhaps we should also add an option to the operationContext.readResource(...) to do non-recursive reads as well.  At least it could be useful for the read-resource operation.
                
> Deprecate OperationContext.getRootResource(); provide variant to get a read only view of an addressed branch of the Resource tree
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AS7-3590
>                 URL: https://issues.jboss.org/browse/AS7-3590
>             Project: Application Server 7
>          Issue Type: Task
>          Components: Domain Management
>            Reporter: Brian Stansberry
>            Assignee: Brian Stansberry
>            Priority: Critical
>             Fix For: 7.1.1.Final
>
>
> OperationContext.getRootResource() is very expensive as it clones the entire model in order to provide a defensive copy that callers can't use to mutate parent resources.
> In almost all cases the caller then navigates to a lower level of the tree to read. The OperationContext should provide a method to do this for them, restricting the cost of defending against writes to the portion of the tree the caller actually cares about.

--
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