[
https://issues.apache.org/jira/browse/AMQ-9200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17691574#comment-17691574
]
Jean-Baptiste Onofré commented on AMQ-9200:
-------------------------------------------
Some points:
# This behavior exists since the beginning of ActiveMQ
# In xmlbeans, the generation is automatic: it sets unbounded for maxOccurs as
soon as it seems a list, collection or array.
So, we have two options:
# short term, we can change the xsd after generation to set 1 for maxOccurs
instead of unbounded
# I can improve the XsdGenerator in xmlbeans to add a property doing the
behavior we want.
Anyway, for me, it's not super urgent as, again, it's like this for ages.
> Multiple plugins elements are allowed by config schema but are not supported
> ----------------------------------------------------------------------------
>
> Key: AMQ-9200
> URL: https://issues.apache.org/jira/browse/AMQ-9200
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Reporter: Yury Gubernatorov
> Assignee: Jean-Baptiste Onofré
> Priority: Blocker
> Fix For: 5.18.0, 5.17.4
>
>
> Configuration schema
> (http://activemq.apache.org/schema/core/activemq-core-5.17.2.xsd for
> instance) allows multiple "plugins" elements:
> <xs:element name='plugins' minOccurs='0' maxOccurs='unbounded'>
> But only the last element is taken into account.
> So if user by mistake ends up with multiple plugins elements in their config
> it can come as surprise to them that plugins were not configured properly.
> This can become critical for some users as, for example, authorization comes
> as a plugin and user does not know if it is working or not unless they
> perform a negative test.
> I recently saw real-life configs looking like this:
> <broker>
> ...
> <plugins>
> <authorizationPlugin>...</authorizationPlugin>
> <forcePersistencyModeBrokerPlugin persistenceFlag="true"/>
> </plugins>
> ...
> <plugins/>
> </broker>
> The broker would run, but authorization plugin will not work allowing anyone
> with the network access to connect without providing credentials. Persistency
> is not forced as well.
> We should set maxOccurs="1" on the plugins element probably.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)