Does anyone know how to programmatically obtain the server version number under JBossAS 5.1?
JBossAS 4.2 had org.jboss.Version
, with getMajor()
In the end I chose to decompile the Version
class from JBoss 4.2 to see what it was doing, and see if the result could be retrofitted into JBoss 5. The end result was to load the resource /org/jboss/version.properties
into a Properties
object, and then read out the version.major
and version.minor
properties from that. Beats me why they couldn't just leave the Version
class in there, but there you go.