dev@glassfish.java.net

Re: Api for doing domain.xml manipulation

From: <vince.kraemer_at_Sun.COM>
Date: Sat, 27 Aug 2005 09:42:20 -0700

----- Original Message -----
From: Kedar Mhaswade <kedar.mhaswade_at_Sun.COM>
Date: Friday, August 26, 2005 4:56 pm
Subject: Re: Api for doing domain.xml manipulation

> There is no public/exposed API that you could use to do it
> yourself. Of
> course, you could start from first principles of XML-parsing, but
> that
> is not that attractive. It is also possible to use the industry
> standard
> solutions to modify an XML document bound with a schema document.
> The
> down-side of this is you'd lose the strong validation that you'd
> otherwise have. The validation is complex as you would find from
> the dtd
> of the domain.xml.
>
> We are thinking of providing such a functionality in the glassfish
> platform itself, relaxing the need of writing a separate tool for
> reading/editing domain.xml. May I know the use cases that you have?

The use case is pretty simple. If there is an error in the domain.xml (or something as simple as a port conflict) that prevents the server from starting I want to fix it.

>
> Will a higher level API like AMX satisfy your requirement?

Doesn't AMX require that the server be started?....

The AMX API must be sitting on top of code that performs validation/etc... that writes to XML, right?

> This API and its implementation will allow you to change any
> attribute,
> create/delete elements etc. in the domain.xml.
>
> Separately from that, using a straightforward, schema2beans
> (Netbeans
> fame) approach is also possible, but not available at this time.
>
> Regards,
> Kedar
>
>