On Wed, Aug 3, 2016 at 2:02 PM, Stan Silvert <ssilvert(a)redhat.com> wrote:
On 8/3/2016 2:49 PM, Ken Wills wrote:
On Wed, Aug 3, 2016 at 8:53 AM, Stan Silvert <ssilvert(a)redhat.com> wrote:
> The Keycloak server is currently configured via a keycloak-server.json
> file. We are converting this to configuration through
> standalone.xml/domain.xml.
>
> To automatically upgrade, I need to read keycloak-server.json and write
> back to standalone.xml. I can easily add the operations to do this at
> parse time. The parser has this method:
>
> @Override
> public void readElement(final XMLExtendedStreamReader reader, final
> List<ModelNode> list) throws XMLStreamException
>
> So one way to do this is to parse keycloak-server.json at this time and
> add operations to the list.
>
> That puts everything into the management model. But nothing will be
> written to standalone.xml unless someone manually does a write operation
> from CLI.
>
>
Not sure if this is exactly what you're looking for, but subsystems /
extensions usually register an XMLElementWriter for themselves to handle
this, see for exmaple:
https://github.com/wildfly/wildfly/blob/9de9217e0106da10c7d05228bcf0559c8...
Ken
My problem is that the XMLElementWriter is never called during startup.
I would like it to be called after the management model is read from
standalone.xml but before deployments are handled.
Hmm. Not sure about that one, I"ll have a look.
PS: Sorry for replying only to you, I mean't to include the list too. [cc:
wildfly-dev added back.]