[wildfly-dev] Need write to standalone.xml after parsing

Ken Wills ken at zaptillion.net
Wed Aug 3 15:07:54 EDT 2016


On Wed, Aug 3, 2016 at 2:02 PM, Stan Silvert <ssilvert at 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 at 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/9de9217e0106da10c7d05228bcf0559c81b6042c/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/InfinispanExtension.java#L52
>
> 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.]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160803/aba35d07/attachment.html 


More information about the wildfly-dev mailing list