users@glassfish.java.net

Re: How to detect Glassfish at runtime?

From: <glassfish_at_javadesktop.org>
Date: Fri, 25 Jul 2008 18:51:17 PDT

This is not an easy problem to solve, in a modular system, I presume.

Since the original author of this question wants to know "web-container" version, what is really
needed is the version of web-container module. So, this can be best addressed by Module
interface in HK-2 module model (https://hk2.dev.java.net/nonav/hk2/apidocs/com/sun/enterprise
/module/ModuleDefinition.html has a getVersion() method).

Traditionally, we used to have a Version class named com.sun.appserv.server.util.Version
which could be loaded from lib/appserv-ext.jar and the version *of the entire server
installation* could be found out. I hear that that is changed to a Branding Service/Contract
implementation.

AMX has a way to determine server version, but that needs a running server.

In general, we need to think through this and guide our users, otherwise, they are going to
be confused.

Regards,
Kedar
[Message sent by forum member 'km' (km)]

http://forums.java.net/jive/thread.jspa?messageID=289506