dev@glassfish.java.net

Detecting what version of the server created a domain

From: vince kraemer <Vince.Kraemer_at_Sun.COM>
Date: Mon, 27 Nov 2006 09:45:11 -0800

Is there an API/method that will allow a java program with access to the
domain directory determine which version of the server created the domain?

This is would be used by the NetBeans plugin to verify that the
libraries, etc. associated with an installation can be used to
start/stop/control/communicate with a domain (that may not be running at
the moment).

It would be nice if the API/method would work across the following
versions of the app server created from the GlassFish project codebase:
V1, V1 U1, V2, Sun Java System Application Server 9.0, Sun Java System
Application Server 9.0 update 1 AND could also work with Sun Java System
Application Server 8.2.

The plugin had been using the following hack, which was invalidated
recently:
compare the doctype of the domain's domain.xml with the doctype that is
embedded in the template for the domain.xml (found in
$INSTROOT/lib/install/templates).

Thanks,
vbk