[seam-commits] Seam SVN: r12496 - in modules/faces/trunk/impl/src/main: resources/META-INF/services and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Apr 14 15:01:11 EDT 2010
Author: nickarls
Date: 2010-04-14 15:01:11 -0400 (Wed, 14 Apr 2010)
New Revision: 12496
Removed:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java
modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
Log:
Don't use statics.
Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java 2010-04-14 13:37:43 UTC (rev 12495)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerAware.java 2010-04-14 19:01:11 UTC (rev 12496)
@@ -45,7 +45,6 @@
beanManagerProviders.add(ServletContextBeanManagerProvider.DEFAULT);
beanManagerProviders.add(JndiBeanManagerProvider.DEFAULT);
beanManagerProviders.add(JndiBeanManagerProvider.JBOSS_HACK);
- beanManagerProviders.add(SingletonBeanManagerProvider.DEFAULT);
}
protected BeanManager getBeanManager()
Deleted: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java 2010-04-14 13:37:43 UTC (rev 12495)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/BeanManagerPickupExtension.java 2010-04-14 19:01:11 UTC (rev 12496)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This 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; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.faces.cdi;
-
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.Extension;
-
-/**
- * Singleton(ish) extension that observes the AfterBeanDiscovery event and stores the BeanManager for access
- * in places where injection is not available and JNDI or ServletContext access is not preferable.
- *
- * @author Nicklas Karlsson
- *
- */
-public class BeanManagerPickupExtension implements Extension
-{
- private static BeanManagerPickupExtension instance;
- private volatile BeanManager beanManager;
-
- public BeanManager getBeanManager()
- {
- return beanManager;
- }
-
- public static BeanManagerPickupExtension getInstance()
- {
- return instance;
- }
-
- public void pickupBeanManager(@Observes AfterBeanDiscovery e, BeanManager beanManager)
- {
- this.beanManager = beanManager;
- BeanManagerPickupExtension.instance = this;
- }
-}
Deleted: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java 2010-04-14 13:37:43 UTC (rev 12495)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/cdi/SingletonBeanManagerProvider.java 2010-04-14 19:01:11 UTC (rev 12496)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This 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; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.faces.cdi;
-
-import javax.enterprise.inject.spi.BeanManager;
-
-/**
- * A BeanManager provider for an extension provided singleton
- *
- * @author Nicklas Karlsson
- *
- */
-public class SingletonBeanManagerProvider implements BeanManagerProvider
-{
-
- public static final BeanManagerProvider DEFAULT = new SingletonBeanManagerProvider();
-
- @Override
- public BeanManager getBeanManager()
- {
- return BeanManagerPickupExtension.getInstance().getBeanManager();
- }
-
-}
Modified: modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
===================================================================
--- modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2010-04-14 13:37:43 UTC (rev 12495)
+++ modules/faces/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2010-04-14 19:01:11 UTC (rev 12496)
@@ -1,4 +1,3 @@
org.jboss.seam.faces.context.ViewScopedExtension
org.jboss.seam.faces.context.FlashScopedExtension
org.jboss.seam.faces.context.FacesAnnotationsAdapterExtension
-org.jboss.seam.faces.cdi.BeanManagerPickupExtension
More information about the seam-commits
mailing list