Author: nbelaevski
Date: 2010-07-12 11:57:37 -0400 (Mon, 12 Jul 2010)
New Revision: 17964
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/VersionBean.java
root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java
Log:
https://jira.jboss.org/browse/RF-8201
Modified: root/core/trunk/impl/src/main/java/org/richfaces/VersionBean.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/VersionBean.java 2010-07-12 15:37:03
UTC (rev 17963)
+++ root/core/trunk/impl/src/main/java/org/richfaces/VersionBean.java 2010-07-12 15:57:37
UTC (rev 17964)
@@ -189,7 +189,11 @@
@Override
public String toString() {
- return getVersion();
+ if (this.containsDataFromManifest()) {
+ return getImplementationTitle() + " by " +
getImplementationVendor() + ", version " + getVersion();
+ } else {
+ return getVersion();
+ }
}
}
@@ -217,11 +221,7 @@
@Override
public String toString() {
- if (VERSION.containsDataFromManifest()) {
- return getTitle() + " by " + getVendor() + ", version " +
VERSION.toString();
- } else {
- return VERSION.toString();
- }
+ return VERSION.toString();
}
}
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java
===================================================================
---
root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java 2010-07-12
15:37:03 UTC (rev 17963)
+++
root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java 2010-07-12
15:57:37 UTC (rev 17964)
@@ -31,11 +31,14 @@
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
-import org.richfaces.jsr330.Module;
+import org.richfaces.VersionBean;
import org.richfaces.jsr330.DependencyException;
import org.richfaces.jsr330.InjectorImpl;
+import org.richfaces.jsr330.Module;
import org.richfaces.jsr330.ServiceException;
import org.richfaces.jsr330.ServiceLoader;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author Nick Belaevski
@@ -43,6 +46,7 @@
*/
public class InitializationListener implements SystemEventListener {
+ private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
/* (non-Javadoc)
* @see javax.faces.event.SystemEventListener#isListenerForSource(java.lang.Object)
@@ -54,6 +58,13 @@
protected void onStart() {
DependencyInjector injector = createInjector();
ServiceTracker.setInjector(injector);
+
+ if (LOGGER.isInfoEnabled()) {
+ String versionString = VersionBean.VERSION.toString();
+ if (versionString != null && versionString.length() != 0) {
+ LOGGER.info(versionString);
+ }
+ }
}
protected DependencyInjector createInjector() {