[jboss-jira] [JBoss JIRA] (WFCORE-1760) Extension initialization handling makes use of PersistentResourceDefinition overly difficult
Brian Stansberry (JIRA)
issues at jboss.org
Thu Sep 29 13:55:00 EDT 2016
[ https://issues.jboss.org/browse/WFCORE-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry resolved WFCORE-1760.
--------------------------------------
Fix Version/s: 3.0.0.Alpha9
Assignee: Tomaz Cerar
Resolution: Done
Tomaz solved this problem in a much much much simpler way with WFCORE-1831. :)
> Extension initialization handling makes use of PersistentResourceDefinition overly difficult
> --------------------------------------------------------------------------------------------
>
> Key: WFCORE-1760
> URL: https://issues.jboss.org/browse/WFCORE-1760
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Domain Management
> Reporter: Brian Stansberry
> Assignee: Tomaz Cerar
> Fix For: 3.0.0.Alpha9
>
>
> PersistentResourceXMLBuilder.build() requires a PersistentResourceDefinition as an input. This is a problem because the PersistentResourcXmlDefinition is needed to initialize parsers for Extension.initializeParsers(), which is called *before* Extension.initialize(). And Extension.initialize() is when the PersistentResourceDefinition would normally be constructed.
> An Extension implementation could overcome this by maintaining internal state. Construct the PersistentResourceDefinition in initializeParsers() and store it in an instance field for use in initialize(). Or vice versa. That gets messy though as now the Extension impl is needing to worry about the order in which the two methods are called and tracking whether both have been called so it can drop the cached object.
> A possible thing to do is the have the ExtensionContext and ExtensionParsingContext offer an attachment API, with the lifecycle of attachments documented as being scoped to a single overall extension initialization. That could work but isn't very elegant.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list