tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r1509725 - /tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/ServerListener.java
Date Fri, 02 Aug 2013 14:26:28 GMT
Author: jlmonteiro
Date: Fri Aug  2 14:26:28 2013
New Revision: 1509725

URL: http://svn.apache.org/r1509725
Log:
Adding TomEE version in ServerInfo

Modified:
    tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/ServerListener.java

Modified: tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/ServerListener.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/ServerListener.java?rev=1509725&r1=1509724&r2=1509725&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/ServerListener.java
(original)
+++ tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/ServerListener.java
Fri Aug  2 14:26:28 2013
@@ -25,6 +25,7 @@ import org.apache.catalina.util.ServerIn
 import org.apache.openejb.loader.IO;
 import org.apache.openejb.loader.ProvisioningUtil;
 import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.util.OpenEjbVersion;
 import org.apache.tomee.loader.TomcatHelper;
 
 import java.io.IOException;
@@ -142,7 +143,9 @@ public class ServerListener implements L
             acc = field.isAccessible();
             final int slash = value.indexOf('/');
             field.setAccessible(true);
-            field.set(null, value.substring(0, slash) + " (TomEE)" + value.substring(slash));
+            final String version = OpenEjbVersion.get().getVersion();
+            final String tomeeVersion = (Integer.parseInt("" + version.charAt(0)) - 3) +
version.substring(1, version.length());
+            field.set(null, value.substring(0, slash) + " (TomEE)" + value.substring(slash)
+ " (" + tomeeVersion + ")");
         } catch (Exception e) {
             // no-op
         } finally {



Mime
View raw message