[seam-commits] Seam SVN: r11881 - modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Dec 23 17:12:35 EST 2009


Author: dan.j.allen
Date: 2009-12-23 17:12:35 -0500 (Wed, 23 Dec 2009)
New Revision: 11881

Removed:
   modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/Placeholder.java
Modified:
   modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/EnvironmentBindingExtension.java
   modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/JndiBinder.java
Log:
Placeholder bean fix was a fallacy; turns out I was using javax.inject.Singleton
fix some logging


Modified: modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/EnvironmentBindingExtension.java
===================================================================
--- modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/EnvironmentBindingExtension.java	2009-12-23 21:48:36 UTC (rev 11880)
+++ modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/EnvironmentBindingExtension.java	2009-12-23 22:12:35 UTC (rev 11881)
@@ -35,7 +35,7 @@
  */
 public class EnvironmentBindingExtension implements Extension
 {
-   private Logger log = LoggerFactory.getLogger(getClass().getName());
+   private static Logger log = LoggerFactory.getLogger(EnvironmentBindingExtension.class);
 
    private Set<Bean> envBeans = new HashSet<Bean>();
    private BeanManager beanManager;
@@ -53,7 +53,7 @@
       {
          if (st.equals(EnvironmentBinding.class))
          {
-            log.debug("Found class annotated with EnvironmentBinding:  " + beanClass.getName());
+            log.debug("Found class annotated with @EnvironmentBinding:  " + beanClass.getName());
             envBeans.add(bean);
             break;
          }

Modified: modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/JndiBinder.java
===================================================================
--- modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/JndiBinder.java	2009-12-23 21:48:36 UTC (rev 11880)
+++ modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/JndiBinder.java	2009-12-23 22:12:35 UTC (rev 11881)
@@ -20,12 +20,12 @@
 import java.util.Set;
 
 import javax.annotation.PostConstruct;
+import javax.ejb.Singleton;
 import javax.ejb.Startup;
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.context.spi.Context;
 import javax.enterprise.inject.spi.Bean;
 import javax.inject.Inject;
-import javax.inject.Singleton;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
@@ -38,7 +38,7 @@
  */
 public @Singleton @Startup class JndiBinder
 {
-   private Logger log = LoggerFactory.getLogger(JndiBinder.class);
+   private static Logger log = LoggerFactory.getLogger(JndiBinder.class);
 
    @Inject
    private EnvironmentBindingExtension bindingExtension;
@@ -48,7 +48,7 @@
    {
       Set<Bean> envBeans = bindingExtension.getEnvBeans();
 
-      log.debug("Processing EnvironmentBinding Classes:  " + envBeans);
+      log.debug("Processing @EnvironmentBinding classes:  " + envBeans);
 
       Context appContext = bindingExtension.getBeanManager().getContext(ApplicationScoped.class);
       for (Bean bean : envBeans)
@@ -62,7 +62,7 @@
          {
             if (field.isAnnotationPresent(Bind.class))
             {
-               log.debug("Processing Binding field " + beanClass.getName() + "." + field.getName());
+               log.debug("Processing @Bind field " + beanClass.getName() + "." + field.getName());
 
                field.setAccessible(true);
 
@@ -96,13 +96,13 @@
       if (!overwrite) {
          try {
             ic.lookup(name);
-            log.debug("JNDI name " + name + " already bound and overwrite is disabled");
+            log.debug("Skipping binding; JNDI name " + name + " is already bound and overwrite is disabled");
             return;
          }
          catch (NamingException e) {
          }
       }
-      log.debug("Binding " + name + " to " + value);
+      log.debug("Binding " + value + " to JNDI name " + name);
       ic.rebind(name, value);
    }
 }

Deleted: modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/Placeholder.java
===================================================================
--- modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/Placeholder.java	2009-12-23 21:48:36 UTC (rev 11880)
+++ modules/envconfig/trunk/src/main/java/org/jboss/seam/envconfig/extension/Placeholder.java	2009-12-23 22:12:35 UTC (rev 11881)
@@ -1,28 +0,0 @@
-/*
- * Seam 3 Modules - http://seamframework.org
- * CDI portable extensions for Java EE and non-Java EE technologies
- *
- * JBoss, by Red Hat
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package org.jboss.seam.envconfig.extension;
-
-import javax.ejb.Stateless;
-
-/**
- * This is a temporary class that is present because GlassFish V3 doesn't seem
- * to recognize an EJB-JAR archive as valid if it only has a @Singleton bean.
- *
- * @author Dan Alen
- */
-public @Stateless class Placeholder {
-}



More information about the seam-commits mailing list