Hi,
I'm working on struts2 + qi4j plugin. One of the feature that we want
to support is for struts 2 to understand qi4j property and
associations.
IIUC, I would need to register my own PropertyAccessor for all objects.
When I tried to do this, by declaring:
<bean type="ognl.PropertyAccessor" name="java.lang.Object"
class="org.qi4j.library.struts2.internal.util.Qi4jPropertyAccessor"/>
This error occured:
Caused by: com.opensymphony.xwork2.inject.DependencyException:
Dependency mapping for [type=ognl.PropertyAccessor,
name='java.lang.Object'] already exists.
And if I tried to override both:
o ConfigurationManager#addContainerProvider
Make sure when container provider is an instance of
StrutsXmlConfigurationProvider, and sets
[ThrowExceptionOnDuplicateBean] property to [false]; and
o Configuration#reloadContainer and Configuration#createBootstrapContainer
Sets ContainerBuilder#setAllowDuplicates to [true]
to allow duplications, This would enable duplicate declarations for
any factory and aliases. Not just my [PropertyAccessor].
Is there a better way to do this? Ideally, I only want to allow
duplicate for [PropertyAccessor] declarations without creating my own
Qi4jFilterDispatcher, Configuration and ConfigurationManager.
Regards,
Edward Yakop
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]