-
Bug
-
Resolution: Done
-
Major
-
2.0.0.Alpha6
-
None
My server resource defines an "interceptors" attribute:
public static final ObjectTypeAttributeDefinition CLASS = ObjectTypeAttributeDefinition.Builder.of("class",
create("name", ModelType.STRING, false)
.setAllowExpression(false)
.build(),
create("module", ModelType.STRING, false)
.setAllowExpression(false)
.build())
.build();
public static final ObjectListAttributeDefinition INTERCEPTORS = ObjectListAttributeDefinition.Builder.of("interceptors", CLASS)
.setAllowNull(true)
.setAllowExpression(false)
.setMinSize(1)
.setMaxSize(Integer.MAX_VALUE)
.build();
The "interceptors" is a LIST of "class" attribute which is an OBJECT composed of a "name" and "module" attribute.
I'm not sure what is the corresponding XML format for this attribute.
Ideally, I'd like to have this XML format:
<server name="default" >
...
<interceptors>
<class name="org.bar.MyInterceptor"
module="org.bar" />
<class name="org.baz.MyOtherInterceptor"
module="org.baz" />
</interceptors>
...
</server>
This XML can not be parsed and I have not found which XML representation can be parsed given my INTERCEPTORS definition.
The XML parsing fails with:
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[23,27]
Message: WFLYCTL0377: Unexpected element '{urn:jboss:domain:test:1.0}interceptors' encountered. Valid elements are: 'buffer-cache'
at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:98)
at org.jboss.as.controller.PersistentResourceXMLDescription.parseChildren(PersistentResourceXMLDescription.java:270)
at org.jboss.as.controller.PersistentResourceXMLDescription.parse(PersistentResourceXMLDescription.java:166)
at org.jboss.as.controller.PersistentResourceXMLDescription.parseChildren(PersistentResourceXMLDescription.java:266)
at org.jboss.as.controller.PersistentResourceXMLDescription.parse(PersistentResourceXMLDescription.java:166)
at org.jboss.as.controller.PersistentResourceXMLParser.readElement(PersistentResourceXMLParser.java:41)
at org.jboss.as.controller.PersistentResourceXMLParser.readElement(PersistentResourceXMLParser.java:35)
Corresponding test case in wildly-core is in my branch at https://github.com/jmesnil/wildfly-core/tree/parse_ObjectListAttributeDefinition
- blocks
-
WFLY-4867 Improve Artemis interceptor support
-
- Closed
-