struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasper Rosenberg (JIRA)" <j...@apache.org>
Subject [jira] Commented: (WW-1814) Default TypeConverters always created with default ObjectFactory
Date Wed, 14 Mar 2007 17:47:51 GMT

    [ https://issues.apache.org/struts/browse/WW-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40559
] 

Jasper Rosenberg commented on WW-1814:
--------------------------------------

Whoops, I see the primary issue was already solved here: WW-1754

It would still be a good idea to reverse the order of the OgnlValueStack and XWorkConverter
static injections though.

> Default TypeConverters always created with default ObjectFactory
> ----------------------------------------------------------------
>
>                 Key: WW-1814
>                 URL: https://issues.apache.org/struts/browse/WW-1814
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.0.6
>            Reporter: Jasper Rosenberg
>
> XWorkConverter uses ObjectFactory.getObjectFactory() when loading default TypeConvertors
in its constructor.  However, currently in struts-default.xml, the ObjectFactory has its static
injections after the XWorkConverter does, so when the XWorkConverter is constructed, it ends
up using the default ObjectFactory (as set in DefaultConfiguration.reload()).
> The fix is easy, just move:
>     <bean class="com.opensymphony.xwork2.ObjectFactory" static="true" />
> to be the first static injection.
> Also, while you are there, 
>     <bean class="com.opensymphony.xwork2.util.XWorkConverter" static="true" />
> should also be moved to be before 
>     <bean class="com.opensymphony.xwork2.util.OgnlValueStack" static="true" />
> This is because XWorkMapPropertyAccessor staticly creates an instance of XWorkMapPropertyAccessor
which in turn staticlly gets an instance of the XWorkConverter.  (Necessary until the XWork
2 issue is resolved: http://jira.opensymphony.com/browse/XW-492)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message