[seam-commits] Seam SVN: r10262 - in trunk/src/main/org/jboss/seam: servlet and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Apr 1 03:03:21 EDT 2009


Author: dan.j.allen
Date: 2009-04-01 03:03:21 -0400 (Wed, 01 Apr 2009)
New Revision: 10262

Modified:
   trunk/src/main/org/jboss/seam/Seam.java
   trunk/src/main/org/jboss/seam/servlet/SeamListener.java
Log:
put Seam version in designated application-scoped variable


Modified: trunk/src/main/org/jboss/seam/Seam.java
===================================================================
--- trunk/src/main/org/jboss/seam/Seam.java	2009-04-01 00:37:47 UTC (rev 10261)
+++ trunk/src/main/org/jboss/seam/Seam.java	2009-04-01 07:03:21 UTC (rev 10262)
@@ -41,6 +41,9 @@
    private static final Map<Class, EjbDescriptor> EJB_DESCRIPTOR_CACHE = new ConcurrentHashMap<Class, EjbDescriptor>();
    private static final Set<ClassLoader> CLASSLOADERS_LOADED = new HashSet<ClassLoader>(); 
 
+   // application-scoped property in which the Seam version is stored
+   public static final String VERSION = "org.jboss.seam.version";
+
    public static EjbDescriptor getEjbDescriptor(Class clazz)
    {
       EjbDescriptor info = EJB_DESCRIPTOR_CACHE.get(clazz);

Modified: trunk/src/main/org/jboss/seam/servlet/SeamListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/servlet/SeamListener.java	2009-04-01 00:37:47 UTC (rev 10261)
+++ trunk/src/main/org/jboss/seam/servlet/SeamListener.java	2009-04-01 07:03:21 UTC (rev 10262)
@@ -31,6 +31,7 @@
    public void contextInitialized(ServletContextEvent event) 
    {
       log.info( "Welcome to Seam " + Seam.getVersion() );
+      event.getServletContext().setAttribute( Seam.VERSION, Seam.getVersion() );
       ServletLifecycle.beginApplication( event.getServletContext() );
       new Initialization( event.getServletContext() ).create().init();
    }




More information about the seam-commits mailing list