I think changing definition of your attribute to:

protected static final PropertiesAttributeDefinition PROPERTIES = new PropertiesAttributeDefinition.Builder(
ModelDescriptionConstants.PROPERTIES, true)
    .setAllowExpression(true)
    .setAttributeMarshaller(AttributeMarshaller.PROPERTIES_MARSHALLER_UNWRAPPED)
    .setAttributeParser(AttributeParser.PROPERTIES_PARSER_UNWRAPPED)
   .build();

should do what you want.

This is only proper way to have unwrapped properties in xml representation.
What you ware using is old way of doing it and only works with "hand written" parsers.

Default behavior for this was not changed as it would break existing hand written parsers.

--
tomaz





On Wed, Jun 22, 2016 at 1:30 PM, Gytis Trikleris <gtrikler@redhat.com> wrote:
Hello,

I’m trying to add property attribute to the mongo subsystem in order to add custom parameters for the driver. I have looked through other subsystems and it seems that PropertiesAttributeDefinition is normally used for that. But I keep getting failures similar to this one http://pastebin.com/raw/6rHMdXRi. I might be missing something trivial, but so far couldn’t figure out what exactly. Maybe somebody has any tips on how to use PropertiesAttributeDefinition correctly?
The commit with current changes is here: https://github.com/gytis/jboss-as/commit/c89d569554b103536dd2bf255abae957799bcbd1. And the branch is here: https://github.com/gytis/jboss-as/tree/nosql-dev9-connection-properties-for-mongodb-no-resource.

Thanks,
Gytis

_______________________________________________
wildfly-dev mailing list
wildfly-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev