[jboss-jira] [JBoss JIRA] Created: (JBXB-236) add optimized setParent override handler for non-global Elements in JBossXBBuilder

Alexey Loubyansky (JIRA) jira-events at lists.jboss.org
Thu Feb 11 04:42:10 EST 2010


add optimized setParent override handler for non-global Elements in JBossXBBuilder
----------------------------------------------------------------------------------

                 Key: JBXB-236
                 URL: https://jira.jboss.org/jira/browse/JBXB-236
             Project: JBoss XML Binding (JBossXB)
          Issue Type: Feature Request
            Reporter: Alexey Loubyansky
            Assignee: Alexey Loubyansky
             Fix For: JBossXB-2.0.2.GA


Current setParent logic is actually implemented as "addChild", i.e. in setParent the parent is first cast to BeanAdapter then the corresponding to the child's QName property is retrieved and then the child is actually added.
For global elements (schema components in general) this logic makes sense, since we don't know when the SchemaBinding is built what the parent will be. But for local elements we do know that and know the property at SchemaBinding initialization time. However, local elements can be of global types, that's why types' handlers shouldn't be optimized this way. But local elements can override their type handlers with optimized setParent().

This optimization can be enabled to disabled with a system property xb.builder.elementSetParentOverrideHandler or by invoking the following methods on JBossXBBuilder
   public static boolean isElementSetParentOverrideHandler()
   public static void setElementSetParentOverrideHandler(boolean elementSetParentHandler)

By default it's going to be enabled.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list