For a feature I am working on I need to accurately predict the major version of webcontainer my webapp is running on.
We have code where we try to load a webcontainer specific class and based on that decide the webcontainer type.
For glassfish v2 I can use the class: /com/sun/appserv/ClassLoaderUtil.class
However for V3 this class was not available to the webapp and we used:
/com/sun/enterprise/glassfish/bootstrap/ASMainHK2.class
But soon after TP2 builds, this class is also not available. Is there a reliable way to detect glassfish at runtime from the webapp?
_raju
[Message sent by forum member 'uppalapati' (uppalapati)]
http://forums.java.net/jive/thread.jspa?messageID=289461