Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 10:58:57 -0400 (Thu, 08 Oct 2009)
New Revision: 3904
Added:
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/exisiting/
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/impl/
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/AbstractBeanUtilsTest.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/RegisterBeansObserver.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/
extensions/trunk/bean-utils/src/test/java/org/jboss/weld/
extensions/trunk/bean-utils/src/test/java/org/jboss/weld/beanutils/
extensions/trunk/logger/src/main/java/org/jboss/weld/
extensions/trunk/logger/src/main/java/org/jboss/weld/log/
extensions/trunk/logger/src/test/java/org/jboss/weld/
extensions/trunk/logger/src/test/java/org/jboss/weld/test/
extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WeldApplicationFactory.java
Removed:
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/exisiting/
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/impl/
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/spi/
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/AbstractBeanUtilsTest.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/RegisterBeansObserver.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/
extensions/trunk/bean-utils/src/test/java/org/jboss/webbeans/beanutils/
extensions/trunk/logger/src/main/java/org/jboss/webbeans/log/
extensions/trunk/logger/src/test/java/org/jboss/webbeans/test/log/
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WebBeansApplicationFactory.java
Modified:
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/exisiting/ExistingBeanDescriberImpl.java
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/exisiting/ExistingSimpleBean.java
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/impl/BeansImpl.java
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/BeanType.java
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/Beans.java
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/ExistingBeanDescriber.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ABean.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/Bean.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/Custom.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomBean.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomDefaultConstructorReceiver.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomDefaultFieldReceiver.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultBean.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultConstructorReceiver.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultFieldReceiver.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultMethodProducerWithInjection.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ExisitingBeanDescriberTest.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/FieldProducer.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/MethodProducer.java
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ProducerBean.java
extensions/trunk/logger/src/main/java/org/jboss/weld/log/Logger.java
extensions/trunk/logger/src/main/java/org/jboss/weld/log/LoggerProducer.java
extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/Finch.java
extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/LoggerInjectionTest.java
extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/Sparrow.java
extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/TestAppender.java
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/ShutdownManager.java
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/StartMain.java
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEBeanDeploymentArchive.java
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEWeldDeployment.java
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEWeldDiscovery.java
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/events/ContainerInitialized.java
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/events/Shutdown.java
extensions/trunk/se/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/Listener.java
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/deployment/AbstractScanner.java
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/deployment/WebAppBeanDeploymentArchive.java
extensions/trunk/servlet/int/src/main/resources/META-INF/faces-config.xml
extensions/trunk/servlet/support/pom.xml
extensions/trunk/servlet/support/src/main/java/org/jboss/weld/environment/tomcat/JspInitialization.java
extensions/trunk/servlet/support/src/main/java/org/jboss/weld/environment/tomcat/WeldLifecycleListener.java
extensions/trunk/servlet/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties
extensions/trunk/servlet/tests/src/test/java/org/jboss/weld/environment/servlet/discovery/ServletWeldDiscoveryTest.java
extensions/trunk/servlet/tests/unit-tests.xml
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldApplication.java
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldMetaData.java
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldRequestCycle.java
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldWebRequestCycleProcessor.java
Log:
name refactoring, fix compiler errors
Copied: extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/exisiting (from
rev 3901,
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/exisiting)
Modified:
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/exisiting/ExistingBeanDescriberImpl.java
===================================================================
---
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/exisiting/ExistingBeanDescriberImpl.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/exisiting/ExistingBeanDescriberImpl.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,27 +19,27 @@
* 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.webbeans.beanutils.exisiting;
+package org.jboss.weld.beanutils.exisiting;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.bean.AbstractClassBean;
-import org.jboss.webbeans.bean.NewSimpleBean;
-import org.jboss.webbeans.bean.ProducerFieldBean;
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.beanutils.impl.BeansImpl;
-import org.jboss.webbeans.beanutils.spi.Beans;
-import org.jboss.webbeans.beanutils.spi.ExistingBeanDescriber;
-import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
-import org.jboss.webbeans.introspector.WBClass;
-import org.jboss.webbeans.introspector.WBField;
-import org.jboss.webbeans.introspector.WBMethod;
-import org.jboss.webbeans.introspector.jlr.WBClassImpl;
-import org.jboss.webbeans.resources.ClassTransformer;
+import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.bean.AbstractClassBean;
+import org.jboss.weld.bean.NewManagedBean;
+import org.jboss.weld.bean.ProducerField;
+import org.jboss.weld.bean.ProducerMethod;
+import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldField;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.introspector.jlr.WeldClassImpl;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.beanutils.impl.BeansImpl;
+import org.jboss.weld.beanutils.spi.Beans;
+import org.jboss.weld.beanutils.spi.ExistingBeanDescriber;
/**
*
@@ -66,9 +66,9 @@
if (beanManager instanceof BeanManagerImpl == false)
throw new IllegalArgumentException("BeanManager is not an instance of
BeanManagerImpl");
- WBClass<T> clazz = type instanceof WBClass ?
- (WBClass<T>)type :
- WBClassImpl.of(type,
((BeanManagerImpl)beanManager).getServices().get(ClassTransformer.class));
+ WeldClass<T> clazz = type instanceof WeldClass ?
+ (WeldClass<T>)type :
+ WeldClassImpl.of(type,
((BeanManagerImpl)beanManager).getServices().get(ClassTransformer.class));
BeansImpl<T> beans = new BeansImpl<T>();
@@ -76,20 +76,21 @@
beans.setMainBean(bean);
beans.setNewBean(createNewBean(clazz, env, (BeanManagerImpl)beanManager));
- for (WBMethod<?, ?> method :
clazz.getDeclaredWBAnnotatedMethods(Produces.class))
+ for (WeldMethod<?, ?> method :
clazz.getDeclaredAnnotatedWeldMethods(Produces.class))
{
- beans.addMethodProducerBean(createProducerMethodBean(bean, env,
(BeanManagerImpl)beanManager, (WBMethod<T, ?>)method));
+ beans.addMethodProducerBean(createProducerMethodBean(bean, env,
(BeanManagerImpl)beanManager, (WeldMethod<T, ?>)method));
}
- for (WBField<?, ?> field :
clazz.getDeclaredAnnotatedWBFields(Produces.class))
+ for (WeldField<?, ?> field :
clazz.getDeclaredAnnotatedWeldFields(Produces.class))
{
- beans.addFieldProducerBean(createProducerFieldBean(bean, env,
(BeanManagerImpl)beanManager, (WBField<T, ?>)field));
+ beans.addFieldProducerBean(createProducerFieldBean(bean, env,
(BeanManagerImpl)beanManager, (WeldField<T, ?>)field));
}
return beans;
}
- private static <T> Bean<T> createSimpleBean(WBClass<T> clazz,
BeanDeployerEnvironment env, BeanManagerImpl beanManager, T instance)
+ private static <T> Bean<T> createSimpleBean(WeldClass<T> clazz,
+ BeanDeployerEnvironment env, BeanManagerImpl beanManager, T instance)
{
ExistingSimpleBean<T> bean = ExistingSimpleBean.of(clazz, beanManager,
instance);
@@ -98,18 +99,20 @@
return bean;
}
- private static <T> Bean<T> createNewBean(WBClass<T> clazz,
BeanDeployerEnvironment env, BeanManagerImpl beanManager)
+ private static <T> Bean<T> createNewBean(WeldClass<T> clazz,
+ BeanDeployerEnvironment env, BeanManagerImpl beanManager)
{
- NewSimpleBean<T> bean = NewSimpleBean.of(clazz, beanManager);
+ NewManagedBean<T> bean = NewManagedBean.of(clazz, beanManager);
//TODO How to get BeanDeployerEnvironment?
bean.initialize(env);
return bean;
}
- private static <T> Bean<T>
createProducerMethodBean(AbstractClassBean<T> declaringBean,
BeanDeployerEnvironment env, BeanManagerImpl beanManager, WBMethod<T, ?> method)
+ private static <T> Bean<T>
createProducerMethodBean(AbstractClassBean<T> declaringBean,
+ BeanDeployerEnvironment env, BeanManagerImpl beanManager, WeldMethod<T, ?>
method)
{
- ProducerMethodBean<T> bean = ProducerMethodBean.of(method, declaringBean,
beanManager);
+ ProducerMethod<T> bean = ProducerMethod.of(method, declaringBean,
beanManager);
//TODO How to get BeanDeployerEnvironment?
bean.initialize(env);
@@ -117,9 +120,10 @@
}
- private static <T> Bean<T>
createProducerFieldBean(AbstractClassBean<T> declaringBean, BeanDeployerEnvironment
env, BeanManagerImpl beanManager, WBField<T, ?> field)
+ private static <T> Bean<T>
createProducerFieldBean(AbstractClassBean<T> declaringBean,
+ BeanDeployerEnvironment env, BeanManagerImpl beanManager, WeldField<T, ?>
field)
{
- ProducerFieldBean<T> bean = ProducerFieldBean.of(field, declaringBean,
beanManager);
+ ProducerField<T> bean = ProducerField.of(field, declaringBean, beanManager);
//TODO How to get BeanDeployerEnvironment?
bean.initialize(env);
Modified:
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/exisiting/ExistingSimpleBean.java
===================================================================
---
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/exisiting/ExistingSimpleBean.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/exisiting/ExistingSimpleBean.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,13 +19,13 @@
* 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.webbeans.beanutils.exisiting;
+package org.jboss.weld.beanutils.exisiting;
import javax.enterprise.context.spi.CreationalContext;
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.introspector.WBClass;
+import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.bean.ManagedBean;
+import org.jboss.weld.introspector.WeldClass;
/**
* used to create a bean implementation for an existing instance
@@ -33,7 +33,7 @@
* @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public class ExistingSimpleBean<T> extends SimpleBean<T>
+public class ExistingSimpleBean<T> extends ManagedBean<T>
{
T instance;
@@ -47,9 +47,9 @@
* @param instance the existing instance
* @return A Web Bean
*/
- protected ExistingSimpleBean(WBClass<T> type, BeanManagerImpl manager, T
instance)
+ protected ExistingSimpleBean(WeldClass<T> type, BeanManagerImpl manager, T
instance)
{
- super(type, manager);
+ super(type, null, manager);
this.instance = instance;
}
@@ -61,7 +61,7 @@
* @param manager the current manager
* @return A Web Bean
*/
- public static <T> ExistingSimpleBean<T> of(WBClass<T> clazz,
BeanManagerImpl manager, T instance)
+ public static <T> ExistingSimpleBean<T> of(WeldClass<T> clazz,
BeanManagerImpl manager, T instance)
{
return new ExistingSimpleBean<T>(clazz, manager, instance);
}
Copied: extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/impl (from rev
3901, extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/impl)
Modified:
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/impl/BeansImpl.java
===================================================================
---
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/impl/BeansImpl.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/impl/BeansImpl.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,14 +19,14 @@
* 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.webbeans.beanutils.impl;
+package org.jboss.weld.beanutils.impl;
import java.util.HashSet;
import java.util.Set;
import javax.enterprise.inject.spi.Bean;
-import org.jboss.webbeans.beanutils.spi.Beans;
+import org.jboss.weld.beanutils.spi.Beans;
/**
*
Copied: extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi (from rev
3901, extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/spi)
Modified:
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/BeanType.java
===================================================================
---
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/spi/BeanType.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/BeanType.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.webbeans.beanutils.spi;
+package org.jboss.weld.beanutils.spi;
/**
* Enum to look up beans in the map returned by BeanDescriber.getBeans()
Modified:
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/Beans.java
===================================================================
---
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/spi/Beans.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/Beans.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.webbeans.beanutils.spi;
+package org.jboss.weld.beanutils.spi;
import java.util.Set;
Modified:
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/ExistingBeanDescriber.java
===================================================================
---
extensions/trunk/bean-utils/src/main/java/org/jboss/webbeans/beanutils/spi/ExistingBeanDescriber.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/main/java/org/jboss/weld/beanutils/spi/ExistingBeanDescriber.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,13 +19,13 @@
* 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.webbeans.beanutils.spi;
+package org.jboss.weld.beanutils.spi;
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.BeanManager;
-import org.jboss.webbeans.beanutils.exisiting.ExistingBeanDescriberImpl;
-import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
+import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
+import org.jboss.weld.beanutils.exisiting.ExistingBeanDescriberImpl;
/**
* Utilities to create beans that take an existing instance
Deleted:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/AbstractBeanUtilsTest.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/AbstractBeanUtilsTest.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/AbstractBeanUtilsTest.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1,128 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.test.webbeans.beanutils;
-
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.Map;
-
-import javax.enterprise.inject.spi.BeanManager;
-
-import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
-import org.jboss.webbeans.bootstrap.BeanDeployment;
-import org.jboss.webbeans.bootstrap.WebBeansBootstrap;
-import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
-import org.jboss.webbeans.mock.MockEELifecycle;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public abstract class AbstractBeanUtilsTest
-{
- /**
- * Contains the web beans deployment
- */
- MockEELifecycle lifecycle;
-
- boolean deployedWebBeans;
-
- /**
- * Initialises the lifecycle with the classes to deploy once deployWebBeans() is
called
- *
- * @param classes the classes to deploy
- */
- protected void initialiseEnvironment(Class<?>...classes)
- {
- lifecycle = new MockEELifecycle();
- lifecycle.getDeployment().getArchive().setBeanClasses(Arrays.asList(classes));
- lifecycle.initialize();
- }
-
- /**
- * Deploys classes as web beans and sets {@link #lifecycle} to point to the created
lifecycle
- *
- * @throws Exception if an error occured
- */
- protected void deployWebBeans() throws Exception
- {
- if (lifecycle == null)
- throw new IllegalStateException("Lifecycle needs to be initialised by
calling initialiseEnvironment()");
- lifecycle.beginApplication();
- lifecycle.beginSession();
- lifecycle.beginRequest();
- deployedWebBeans = true;
- }
-
-
- /**
- * Undeploys the webbeans deployed if {@link #lifecycle} is set
- */
- protected void undeployWebBeans() throws Exception
- {
- lifecycle = null;
- if (lifecycle != null)
- {
- if (deployedWebBeans)
- {
- lifecycle.endRequest();
- lifecycle.endSession();
- lifecycle.endApplication();
- }
- lifecycle = null;
- }
- }
-
-
- /**
- * Gets the current bean manager used.
- *
- * @return the bean manager
- */
- protected BeanManager getCurrentManager() throws Exception
- {
- if (lifecycle == null)
- throw new IllegalStateException("Lifecycle needs to be initialised by
calling initialiseEnvironment()");
- return
lifecycle.getBootstrap().getManager(lifecycle.getDeployment().getArchive());
- }
-
- protected BeanDeployerEnvironment getBeanDeployerEnvironment() throws Exception
- {
- if (lifecycle == null)
- throw new IllegalStateException("Lifecycle needs to be initialised by
calling initialiseEnvironment()");
-
- WebBeansBootstrap bootstrap = lifecycle.getBootstrap();
-
- //TODO: Hack
- Field field =
WebBeansBootstrap.class.getDeclaredField("beanDeployments");
- field.setAccessible(true);
- Map<BeanDeploymentArchive, BeanDeployment> deployments =
(Map<BeanDeploymentArchive, BeanDeployment>)field.get(bootstrap);
-
- assert deployments != null;
- assert deployments.size() == 1;
- BeanDeployment deployment = deployments.entrySet().iterator().next().getValue();
-
- return deployment.getBeanDeployer().getEnvironment();
-
- }
-}
Deleted:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/RegisterBeansObserver.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/RegisterBeansObserver.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/RegisterBeansObserver.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1,63 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.test.webbeans.beanutils;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.Extension;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.webbeans.beanutils.spi.Beans;
-
-/**
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-@Artifact
-public class RegisterBeansObserver implements Extension
-{
- static List<Beans<?>> beans = new ArrayList<Beans<?>>();
-
- public static void clear()
- {
- beans.clear();
- }
-
- public static void addBeans(Beans<?> beans)
- {
- RegisterBeansObserver.beans.add(beans);
- }
-
- public void observe(@Observes AfterBeanDiscovery afterBeanDiscovery)
- {
- for (Beans<?> beans : RegisterBeansObserver.beans)
- {
- for(Bean<?> bean : beans.getAllBeans())
- afterBeanDiscovery.addBean(bean);
- }
- }
-}
Copied:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/AbstractBeanUtilsTest.java
(from rev 3901,
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/AbstractBeanUtilsTest.java)
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/AbstractBeanUtilsTest.java
(rev 0)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/AbstractBeanUtilsTest.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -0,0 +1,128 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.test.weld.beanutils;
+
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.Map;
+
+import javax.enterprise.inject.spi.BeanManager;
+
+import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
+import org.jboss.weld.bootstrap.BeanDeployment;
+import org.jboss.weld.bootstrap.WeldBootstrap;
+import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.weld.mock.MockEELifecycle;
+
+/**
+ *
+ * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AbstractBeanUtilsTest
+{
+ /**
+ * Contains the web beans deployment
+ */
+ MockEELifecycle lifecycle;
+
+ boolean deployedWebBeans;
+
+ /**
+ * Initialises the lifecycle with the classes to deploy once deployWebBeans() is
called
+ *
+ * @param classes the classes to deploy
+ */
+ protected void initialiseEnvironment(Class<?>...classes)
+ {
+ lifecycle = new MockEELifecycle();
+ lifecycle.getDeployment().getArchive().setBeanClasses(Arrays.asList(classes));
+ lifecycle.initialize();
+ }
+
+ /**
+ * Deploys classes as web beans and sets {@link #lifecycle} to point to the created
lifecycle
+ *
+ * @throws Exception if an error occured
+ */
+ protected void deployWebBeans() throws Exception
+ {
+ if (lifecycle == null)
+ throw new IllegalStateException("Lifecycle needs to be initialised by
calling initialiseEnvironment()");
+ lifecycle.beginApplication();
+ lifecycle.beginSession();
+ lifecycle.beginRequest();
+ deployedWebBeans = true;
+ }
+
+
+ /**
+ * Undeploys the webbeans deployed if {@link #lifecycle} is set
+ */
+ protected void undeployWebBeans() throws Exception
+ {
+ lifecycle = null;
+ if (lifecycle != null)
+ {
+ if (deployedWebBeans)
+ {
+ lifecycle.endRequest();
+ lifecycle.endSession();
+ lifecycle.endApplication();
+ }
+ lifecycle = null;
+ }
+ }
+
+
+ /**
+ * Gets the current bean manager used.
+ *
+ * @return the bean manager
+ */
+ protected BeanManager getCurrentManager() throws Exception
+ {
+ if (lifecycle == null)
+ throw new IllegalStateException("Lifecycle needs to be initialised by
calling initialiseEnvironment()");
+ return
lifecycle.getBootstrap().getManager(lifecycle.getDeployment().getArchive());
+ }
+
+ protected BeanDeployerEnvironment getBeanDeployerEnvironment() throws Exception
+ {
+ if (lifecycle == null)
+ throw new IllegalStateException("Lifecycle needs to be initialised by
calling initialiseEnvironment()");
+
+ WeldBootstrap bootstrap = lifecycle.getBootstrap();
+
+ //TODO: Hack
+ Field field = WeldBootstrap.class.getDeclaredField("beanDeployments");
+ field.setAccessible(true);
+ Map<BeanDeploymentArchive, BeanDeployment> deployments =
(Map<BeanDeploymentArchive, BeanDeployment>)field.get(bootstrap);
+
+ assert deployments != null;
+ assert deployments.size() == 1;
+ BeanDeployment deployment = deployments.entrySet().iterator().next().getValue();
+
+ return deployment.getBeanDeployer().getEnvironment();
+
+ }
+}
Copied:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/RegisterBeansObserver.java
(from rev 3901,
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/RegisterBeansObserver.java)
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/RegisterBeansObserver.java
(rev 0)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/RegisterBeansObserver.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.test.weld.beanutils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.Extension;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.beanutils.spi.Beans;
+
+/**
+ *
+ * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+@Artifact
+public class RegisterBeansObserver implements Extension
+{
+ static List<Beans<?>> beans = new ArrayList<Beans<?>>();
+
+ public static void clear()
+ {
+ beans.clear();
+ }
+
+ public static void addBeans(Beans<?> beans)
+ {
+ RegisterBeansObserver.beans.add(beans);
+ }
+
+ public void observe(@Observes AfterBeanDiscovery afterBeanDiscovery)
+ {
+ for (Beans<?> beans : RegisterBeansObserver.beans)
+ {
+ for(Bean<?> bean : beans.getAllBeans())
+ afterBeanDiscovery.addBean(bean);
+ }
+ }
+}
Copied: extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing
(from rev 3901,
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing)
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ABean.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/ABean.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ABean.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
/**
*
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/Bean.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/Bean.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/Bean.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
/**
*
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/Custom.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/Custom.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/Custom.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomBean.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/CustomBean.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomBean.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
/**
*
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomDefaultConstructorReceiver.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/CustomDefaultConstructorReceiver.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomDefaultConstructorReceiver.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import javax.enterprise.inject.Default;
import javax.inject.Inject;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomDefaultFieldReceiver.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/CustomDefaultFieldReceiver.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/CustomDefaultFieldReceiver.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import javax.enterprise.inject.Default;
import javax.inject.Inject;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultBean.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/DefaultBean.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultBean.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import javax.enterprise.inject.Default;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultConstructorReceiver.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/DefaultConstructorReceiver.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultConstructorReceiver.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import javax.enterprise.inject.Default;
import javax.inject.Inject;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultFieldReceiver.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/DefaultFieldReceiver.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultFieldReceiver.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import javax.enterprise.inject.Default;
import javax.inject.Inject;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultMethodProducerWithInjection.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/DefaultMethodProducerWithInjection.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/DefaultMethodProducerWithInjection.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import javax.enterprise.inject.Default;
import javax.enterprise.inject.Produces;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ExisitingBeanDescriberTest.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/ExisitingBeanDescriberTest.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ExisitingBeanDescriberTest.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import java.util.Set;
@@ -27,10 +27,10 @@
import javax.enterprise.inject.spi.AnnotatedType;
import javax.enterprise.inject.spi.Bean;
-import org.jboss.test.webbeans.beanutils.AbstractBeanUtilsTest;
-import org.jboss.test.webbeans.beanutils.RegisterBeansObserver;
-import org.jboss.webbeans.beanutils.spi.Beans;
-import org.jboss.webbeans.beanutils.spi.ExistingBeanDescriber;
+import org.jboss.test.weld.beanutils.AbstractBeanUtilsTest;
+import org.jboss.test.weld.beanutils.RegisterBeansObserver;
+import org.jboss.weld.beanutils.spi.Beans;
+import org.jboss.weld.beanutils.spi.ExistingBeanDescriber;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/FieldProducer.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/FieldProducer.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/FieldProducer.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import javax.enterprise.inject.Default;
import javax.enterprise.inject.Produces;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/MethodProducer.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/MethodProducer.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/MethodProducer.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
import javax.enterprise.inject.Default;
import javax.enterprise.inject.Produces;
Modified:
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ProducerBean.java
===================================================================
---
extensions/trunk/bean-utils/src/test/java/org/jboss/test/webbeans/beanutils/existing/ProducerBean.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/bean-utils/src/test/java/org/jboss/test/weld/beanutils/existing/ProducerBean.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -19,7 +19,7 @@
* 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.test.webbeans.beanutils.existing;
+package org.jboss.test.weld.beanutils.existing;
/**
*
Copied: extensions/trunk/bean-utils/src/test/java/org/jboss/weld/beanutils (from rev 3901,
extensions/trunk/bean-utils/src/test/java/org/jboss/webbeans/beanutils)
Copied: extensions/trunk/logger/src/main/java/org/jboss/weld/log (from rev 3901,
extensions/trunk/logger/src/main/java/org/jboss/webbeans/log)
Modified: extensions/trunk/logger/src/main/java/org/jboss/weld/log/Logger.java
===================================================================
--- extensions/trunk/logger/src/main/java/org/jboss/webbeans/log/Logger.java 2009-10-08
10:48:12 UTC (rev 3901)
+++ extensions/trunk/logger/src/main/java/org/jboss/weld/log/Logger.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.log;
+package org.jboss.weld.log;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
Modified: extensions/trunk/logger/src/main/java/org/jboss/weld/log/LoggerProducer.java
===================================================================
---
extensions/trunk/logger/src/main/java/org/jboss/webbeans/log/LoggerProducer.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/logger/src/main/java/org/jboss/weld/log/LoggerProducer.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.jboss.webbeans.log;
+package org.jboss.weld.log;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
Copied: extensions/trunk/logger/src/test/java/org/jboss/weld/test/log (from rev 3901,
extensions/trunk/logger/src/test/java/org/jboss/webbeans/test/log)
Modified: extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/Finch.java
===================================================================
---
extensions/trunk/logger/src/test/java/org/jboss/webbeans/test/log/Finch.java 2009-10-08
10:48:12 UTC (rev 3901)
+++ extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/Finch.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.test.log;
+package org.jboss.weld.test.log;
import javax.inject.Inject;
-import org.jboss.webbeans.log.Log;
-import org.jboss.webbeans.log.Logger;
+import org.jboss.weld.log.Log;
+import org.jboss.weld.log.Logger;
public class Finch
{
Modified:
extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/LoggerInjectionTest.java
===================================================================
---
extensions/trunk/logger/src/test/java/org/jboss/webbeans/test/log/LoggerInjectionTest.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/LoggerInjectionTest.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.jboss.webbeans.test.log;
+package org.jboss.weld.test.log;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.Classes;
-import org.jboss.webbeans.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -29,7 +29,7 @@
*/
@Artifact
@Classes(packages = { "org.jboss.webbeans.log",
"org.jboss.webbeans.test.log" })
-public class LoggerInjectionTest extends AbstractWebBeansTest
+public class LoggerInjectionTest extends AbstractWeldTest
{
@Test
public void testBasicLogInjection()
Modified: extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/Sparrow.java
===================================================================
---
extensions/trunk/logger/src/test/java/org/jboss/webbeans/test/log/Sparrow.java 2009-10-08
10:48:12 UTC (rev 3901)
+++ extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/Sparrow.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1,9 +1,9 @@
-package org.jboss.webbeans.test.log;
+package org.jboss.weld.test.log;
import javax.inject.Inject;
-import org.jboss.webbeans.log.Log;
-import org.jboss.webbeans.log.Logger;
+import org.jboss.weld.log.Log;
+import org.jboss.weld.log.Logger;
class Sparrow
{
Modified: extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/TestAppender.java
===================================================================
---
extensions/trunk/logger/src/test/java/org/jboss/webbeans/test/log/TestAppender.java 2009-10-08
10:48:12 UTC (rev 3901)
+++
extensions/trunk/logger/src/test/java/org/jboss/weld/test/log/TestAppender.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.test.log;
+package org.jboss.weld.test.log;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.varia.NullAppender;
Modified:
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/ShutdownManager.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/ShutdownManager.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/ShutdownManager.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -65,7 +65,7 @@
}
/**
- * Shutdown WebBeans SE gracefully (call this as an alternative to firing the
+ * Shutdown Weld SE gracefully (call this as an alternative to firing the
* "@Shutdown Manager" event.
*/
public void shutdown()
Modified: extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/StartMain.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/StartMain.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/StartMain.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -31,8 +31,8 @@
/**
* This is the main class that should always be called from the command line for
- * a WebBEans SE app. Something like: <code>
- * java -jar MyApp.jar org.jboss.webbeans.environment.se.StarMain arguments
+ * a Weld SE app. Something like: <code>
+ * java -jar MyApp.jar org.jboss.weld.environment.se.StarMain arguments
* </code>
*
* @author Peter Royle
@@ -41,7 +41,7 @@
public class StartMain
{
- private static final String BOOTSTRAP_IMPL_CLASS_NAME =
"org.jboss.webbeans.bootstrap.WebBeansBootstrap";
+ private static final String BOOTSTRAP_IMPL_CLASS_NAME =
"org.jboss.weld.bootstrap.WeldBootstrap";
private final Bootstrap bootstrap;
private final BeanStore applicationBeanStore;
public static String[] PARAMETERS;
@@ -56,7 +56,7 @@
}
catch (Exception e)
{
- throw new IllegalStateException("Error loading Web Beans bootstrap, check
that Web Beans is on the classpath", e);
+ throw new IllegalStateException("Error loading Weld bootstrap, check that
Weld is on the classpath", e);
}
this.applicationBeanStore = new ConcurrentHashMapBeanStore();
}
Modified:
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEBeanDeploymentArchive.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEBeanDeploymentArchive.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEBeanDeploymentArchive.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -28,7 +28,7 @@
/**
* A Java SE implementation of BeanDeploymentArchive. It is essentially an
- * adaptor from the SEWebBeanDiscovery to the BeanDeploymentArchive interface.
+ * adaptor from the SEWeldDiscovery to the BeanDeploymentArchive interface.
* It returns, in a single logical archive, all Bean classes and beans.xml
* descriptors. It always returns an empty collection of EJBs.
*
@@ -69,7 +69,7 @@
*/
public Collection<URL> getBeansXml()
{
- return wbDiscovery.discoverWebBeansXml();
+ return wbDiscovery.discoverWeldXml();
}
/**
Modified:
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEWeldDeployment.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEWeldDeployment.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEWeldDeployment.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -23,7 +23,7 @@
import org.jboss.weld.bootstrap.spi.Deployment;
/**
- * WebBeans Deployment for Java SE environment.
+ * Weld Deployment for Java SE environment.
*
* @author Peter Royle
*/
Modified:
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEWeldDiscovery.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEWeldDiscovery.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/discovery/SEWeldDiscovery.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -25,8 +25,8 @@
import org.jboss.weld.environment.se.util.Reflections;
/**
- * The means by which Web Beans are discovered on the classpath. This will only
- * discover simple web beans - there is no EJB/Servlet/JPA integration.
+ * The means by which beans are discovered on the classpath. This will only
+ * discover simple beans - there is no EJB/Servlet/JPA integration.
*
* @author Peter Royle
* @author Pete Muir
@@ -45,12 +45,12 @@
scan();
}
- public Iterable<Class<?>> discoverWebBeanClasses()
+ public Iterable<Class<?>> discoverWeldClasses()
{
return Collections.unmodifiableSet(wbClasses);
}
- public Collection<URL> discoverWebBeansXml()
+ public Collection<URL> discoverWeldXml()
{
return Collections.unmodifiableSet(wbUrls);
}
Modified:
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/events/ContainerInitialized.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/events/ContainerInitialized.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/events/ContainerInitialized.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -17,7 +17,7 @@
package org.jboss.weld.environment.se.events;
/**
- * The event that is fired when the WebBeans CDI container is initialized and
+ * The event that is fired when the Weld CDI container is initialized and
* ready for applications to take control, which it may do by observing this
* event.
*
Modified:
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/events/Shutdown.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/events/Shutdown.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/se/src/main/java/org/jboss/weld/environment/se/events/Shutdown.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -24,7 +24,7 @@
/**
- * Fired by webbeans SE before shutting down. Applications and modules should
+ * Fired by weld SE before shutting down. Applications and modules should
* release resources cleanly in response to this event.
*
* @author Peter Royle
Modified:
extensions/trunk/se/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension
===================================================================
---
extensions/trunk/se/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/se/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1 +1 @@
-org.jboss.webbeans.environment.se.test.beans.ObserverTestBean
+org.jboss.weld.environment.se.test.beans.ObserverTestBean
Modified:
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/Listener.java
===================================================================
---
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/Listener.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/Listener.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -43,17 +43,16 @@
* @author Pete Muir
*/
public class Listener extends ForwardingServletListener
-{
-
+{
private static final Log log = Logging.getLog(Listener.class);
- private static final String BOOTSTRAP_IMPL_CLASS_NAME =
"org.jboss.webbeans.bootstrap.WebBeansBootstrap";
- private static final String WEB_BEANS_LISTENER_CLASS_NAME =
"org.jboss.webbeans.servlet.WebBeansListener";
+ private static final String BOOTSTRAP_IMPL_CLASS_NAME =
"org.jboss.weld.bootstrap.WeldBootstrap";
+ private static final String WELD_LISTENER_CLASS_NAME =
"org.jboss.weld.servlet.WeldListener";
private static final String APPLICATION_BEAN_STORE_ATTRIBUTE_NAME =
Listener.class.getName() + ".applicationBeanStore";
- private static final String EXPRESSION_FACTORY_NAME =
"org.jboss.webbeans.el.ExpressionFactory";
+ private static final String EXPRESSION_FACTORY_NAME =
"org.jboss.weld.el.ExpressionFactory";
private final transient Bootstrap bootstrap;
- private final transient ServletListener webBeansListener;
+ private final transient ServletListener weldListener;
private WeldManager manager;
public Listener()
@@ -64,15 +63,15 @@
}
catch (IllegalArgumentException e)
{
- throw new IllegalStateException("Error loading Web Beans bootstrap, check
that Web Beans is on the classpath", e);
+ throw new IllegalStateException("Error loading Weld bootstrap, check that
Weld is on the classpath", e);
}
try
{
- webBeansListener = Reflections.newInstance(WEB_BEANS_LISTENER_CLASS_NAME);
+ weldListener = Reflections.newInstance(WELD_LISTENER_CLASS_NAME);
}
catch (IllegalArgumentException e)
{
- throw new IllegalStateException("Error loading Web Beans listener, check
that Web Beans is on the classpath", e);
+ throw new IllegalStateException("Error loading Weld listener, check that
Weld is on the classpath", e);
}
}
@@ -94,7 +93,8 @@
ServletDeployment deployment = new ServletDeployment(sce.getServletContext());
try
{
-
deployment.getWebAppBeanDeploymentArchive().getServices().add(ResourceInjectionServices.class,
new ServletResourceInjectionServices() {});
+ deployment.getWebAppBeanDeploymentArchive().getServices().add(
+ ResourceInjectionServices.class, new ServletResourceInjectionServices()
{});
}
catch (NoClassDefFoundError e)
{
@@ -102,7 +102,8 @@
log.warn("@Resource injection not available in simple beans");
}
- deployment.getServices().add(ServletServices.class, new
ServletServicesImpl(deployment.getWebAppBeanDeploymentArchive()));
+ deployment.getServices().add(ServletServices.class,
+ new ServletServicesImpl(deployment.getWebAppBeanDeploymentArchive()));
bootstrap.startContainer(Environments.SERVLET, deployment,
applicationBeanStore).startInitialization();
manager = bootstrap.getManager(deployment.getWebAppBeanDeploymentArchive());
@@ -144,10 +145,12 @@
jspApplicationContext.addELResolver(manager.getELResolver());
// Register ELContextListener with JSP
-
jspApplicationContext.addELContextListener(Reflections.<ELContextListener>newInstance("org.jboss.webbeans.el.WebBeansELContextListener"));
+
jspApplicationContext.addELContextListener(Reflections.<ELContextListener>
+ newInstance("org.jboss.weld.el.WeldELContextListener"));
// Push the wrapped expression factory into the servlet context so that Tomcat
or Jetty can hook it in using a container code
- sce.getServletContext().setAttribute(EXPRESSION_FACTORY_NAME,
manager.wrapExpressionFactory(jspApplicationContext.getExpressionFactory()));
+ sce.getServletContext().setAttribute(EXPRESSION_FACTORY_NAME,
+
manager.wrapExpressionFactory(jspApplicationContext.getExpressionFactory()));
}
bootstrap.deployBeans().validateBeans().endInitialization();
@@ -159,7 +162,7 @@
@Override
protected ServletListener delegate()
{
- return webBeansListener;
+ return weldListener;
}
}
Modified:
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/deployment/AbstractScanner.java
===================================================================
---
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/deployment/AbstractScanner.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/deployment/AbstractScanner.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -62,7 +62,7 @@
}
else if (name.equals(WebAppBeanDeploymentArchive.META_INF_BEANS_XML))
{
- webAppBeanDeploymentArchive.getWbUrls().add(url);
+ webAppBeanDeploymentArchive.getWeldUrls().add(url);
}
}
Modified:
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/deployment/WebAppBeanDeploymentArchive.java
===================================================================
---
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/deployment/WebAppBeanDeploymentArchive.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/deployment/WebAppBeanDeploymentArchive.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -59,17 +59,17 @@
scan(servletContext);
}
- public Iterable<Class<?>> discoverWebBeanClasses()
+ public Iterable<Class<?>> discoverWeldClasses()
{
return Collections.unmodifiableSet(classes);
}
- public Iterable<URL> discoverWebBeansXml()
+ public Iterable<URL> discoverWeldXml()
{
return Collections.unmodifiableSet(beansXml);
}
- public Set<URL> getWbUrls()
+ public Set<URL> getWeldUrls()
{
return beansXml;
}
@@ -83,7 +83,7 @@
URL beans = servletContext.getResource(WEB_INF_BEANS_XML);
if (beans != null)
{
- beansXml.add(beans); // this is consistent with how the JBoss
webbeans.deployer works
+ beansXml.add(beans); // this is consistent with how the JBoss weld.deployer
works
File webInfClasses = Servlets.getRealFile(servletContext, WEB_INF_CLASSES);
if (webInfClasses != null)
{
Deleted:
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WebBeansApplicationFactory.java
===================================================================
---
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WebBeansApplicationFactory.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WebBeansApplicationFactory.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.environment.servlet.jsf;
-
-import javax.faces.application.Application;
-import javax.faces.application.ApplicationFactory;
-
-
-/**
- * @author pmuir
- *
- */
-public class WebBeansApplicationFactory extends ForwardingApplicationFactory
-{
-
- private final ApplicationFactory applicationFactory;
-
- private Application application;
-
- public WebBeansApplicationFactory(ApplicationFactory applicationFactory)
- {
- this.applicationFactory = applicationFactory;
- }
-
- @Override
- protected ApplicationFactory delegate()
- {
- return applicationFactory;
- }
-
- @Override
- public Application getApplication()
- {
- if (application == null)
- {
- application = new WeldApplication(delegate().getApplication());
- }
- return application;
- }
-
-}
Copied:
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WeldApplicationFactory.java
(from rev 3902,
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WebBeansApplicationFactory.java)
===================================================================
---
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WeldApplicationFactory.java
(rev 0)
+++
extensions/trunk/servlet/int/src/main/java/org/jboss/weld/environment/servlet/jsf/WeldApplicationFactory.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.environment.servlet.jsf;
+
+import javax.faces.application.Application;
+import javax.faces.application.ApplicationFactory;
+
+
+/**
+ * @author pmuir
+ *
+ */
+public class WeldApplicationFactory extends ForwardingApplicationFactory
+{
+
+ private final ApplicationFactory applicationFactory;
+
+ private Application application;
+
+ public WeldApplicationFactory(ApplicationFactory applicationFactory)
+ {
+ this.applicationFactory = applicationFactory;
+ }
+
+ @Override
+ protected ApplicationFactory delegate()
+ {
+ return applicationFactory;
+ }
+
+ @Override
+ public Application getApplication()
+ {
+ if (application == null)
+ {
+ application = new WeldApplication(delegate().getApplication());
+ }
+ return application;
+ }
+
+}
Modified: extensions/trunk/servlet/int/src/main/resources/META-INF/faces-config.xml
===================================================================
--- extensions/trunk/servlet/int/src/main/resources/META-INF/faces-config.xml 2009-10-08
14:22:10 UTC (rev 3903)
+++ extensions/trunk/servlet/int/src/main/resources/META-INF/faces-config.xml 2009-10-08
14:58:57 UTC (rev 3904)
@@ -5,15 +5,15 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<factory>
-
<application-factory>org.jboss.webbeans.environment.servlet.jsf.WebBeansApplicationFactory</application-factory>
+
<application-factory>org.jboss.weld.environment.servlet.jsf.WeldApplicationFactory</application-factory>
</factory>
<application>
-
<view-handler>org.jboss.webbeans.jsf.ConversationAwareViewHandler</view-handler>
+
<view-handler>org.jboss.weld.jsf.ConversationAwareViewHandler</view-handler>
</application>
<lifecycle>
-
<phase-listener>org.jboss.webbeans.jsf.WebBeansPhaseListener</phase-listener>
+ <phase-listener>org.jboss.weld.jsf.WeldPhaseListener</phase-listener>
</lifecycle>
</faces-config>
Modified: extensions/trunk/servlet/support/pom.xml
===================================================================
--- extensions/trunk/servlet/support/pom.xml 2009-10-08 14:22:10 UTC (rev 3903)
+++ extensions/trunk/servlet/support/pom.xml 2009-10-08 14:58:57 UTC (rev 3904)
@@ -11,7 +11,7 @@
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Weld Servlet Integration: Tomcat Support</name>
- <
url>http://www.seamframework.org/WebBeans</url>
+ <
url>http://www.seamframework.org/Weld</url>
<dependencies>
<dependency>
Modified:
extensions/trunk/servlet/support/src/main/java/org/jboss/weld/environment/tomcat/JspInitialization.java
===================================================================
---
extensions/trunk/servlet/support/src/main/java/org/jboss/weld/environment/tomcat/JspInitialization.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/servlet/support/src/main/java/org/jboss/weld/environment/tomcat/JspInitialization.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -22,18 +22,15 @@
*/
package org.jboss.weld.environment.tomcat;
-import javax.el.ELContextListener;
-import javax.el.ELResolver;
import javax.el.ExpressionFactory;
import javax.servlet.ServletContext;
import javax.servlet.jsp.JspApplicationContext;
import javax.servlet.jsp.JspFactory;
import org.apache.jasper.runtime.JspApplicationContextImpl;
-import org.jboss.weld.environment.tomcat.util.Reflections;
/**
- * The Web Beans JSP initialization listener
+ * The Weld JSP initialization listener
*
*
* @author Pete Muir
@@ -42,14 +39,14 @@
public class JspInitialization
{
- private static final String EXPRESSION_FACTORY_NAME =
"org.jboss.webbeans.el.ExpressionFactory";
+ private static final String EXPRESSION_FACTORY_NAME =
"org.jboss.weld.el.ExpressionFactory";
- private static class WebBeansJspApplicationContextImpl extends
ForwardingJspApplicationContextImpl
+ private static class WeldJspApplicationContextImpl extends
ForwardingJspApplicationContextImpl
{
private final JspApplicationContextImpl delegate;
private final ExpressionFactory expressionFactory;
- public WebBeansJspApplicationContextImpl(JspApplicationContextImpl delegate,
ExpressionFactory expressionFactory)
+ public WeldJspApplicationContextImpl(JspApplicationContextImpl delegate,
ExpressionFactory expressionFactory)
{
this.delegate = delegate;
this.expressionFactory = expressionFactory;
@@ -78,7 +75,7 @@
{
ExpressionFactory expressionFactory = (ExpressionFactory)
context.getAttribute(EXPRESSION_FACTORY_NAME);
// Hack into JBoss Web/Catalina to replace the ExpressionFactory
- JspApplicationContextImpl wrappedJspApplicationContextImpl = new
WebBeansJspApplicationContextImpl(JspApplicationContextImpl.getInstance(context),
expressionFactory);
+ JspApplicationContextImpl wrappedJspApplicationContextImpl = new
WeldJspApplicationContextImpl(JspApplicationContextImpl.getInstance(context),
expressionFactory);
context.setAttribute(JspApplicationContextImpl.class.getName(),
wrappedJspApplicationContextImpl);
}
// otherwise something went wrong starting WB, so don't register with JSP
Modified:
extensions/trunk/servlet/support/src/main/java/org/jboss/weld/environment/tomcat/WeldLifecycleListener.java
===================================================================
---
extensions/trunk/servlet/support/src/main/java/org/jboss/weld/environment/tomcat/WeldLifecycleListener.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/servlet/support/src/main/java/org/jboss/weld/environment/tomcat/WeldLifecycleListener.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -69,7 +69,7 @@
{
if (processor == null)
{
- Object o =
servletContext.getAttribute("org.jboss.webbeans.environment.tomcat.WebBeansAnnotationProcessor");
+ Object o =
servletContext.getAttribute("org.jboss.weld.environment.tomcat.WeldAnnotationProcessor");
if (o instanceof AnnotationProcessor)
{
processor = (AnnotationProcessor) o;
Modified:
extensions/trunk/servlet/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties
===================================================================
---
extensions/trunk/servlet/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/servlet/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08
14:58:57 UTC (rev 3904)
@@ -1,7 +1,7 @@
# Configuration for running incontainer tests from your IDE
-# Alter the path webbeans accordingly (relative from the tck/impl dir)
+# Alter the path weld accordingly (relative from the tck/impl dir)
org.jboss.testharness.standalone=false
org.jboss.testharness.container.extraConfigurationDir=../
org.jboss.testharness.container.forceRestart=false
org.jboss.testharness.libraryDirectory=target/dependency/lib
-org.jboss.testharness.runIntegrationTests=true
\ No newline at end of file
+org.jboss.testharness.runIntegrationTests=true
Modified:
extensions/trunk/servlet/tests/src/test/java/org/jboss/weld/environment/servlet/discovery/ServletWeldDiscoveryTest.java
===================================================================
---
extensions/trunk/servlet/tests/src/test/java/org/jboss/weld/environment/servlet/discovery/ServletWeldDiscoveryTest.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/servlet/tests/src/test/java/org/jboss/weld/environment/servlet/discovery/ServletWeldDiscoveryTest.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -33,7 +33,7 @@
{
};
- Set<URL> beansXmls = discovery.getWbUrls();
+ Set<URL> beansXmls = discovery.getWeldUrls();
assert beansXmls.size() >= 1 : "Expecting to find at least one
META-INF/beans.xml resource on the test classpath";
for (URL beansXml : beansXmls)
{
Modified: extensions/trunk/servlet/tests/unit-tests.xml
===================================================================
--- extensions/trunk/servlet/tests/unit-tests.xml 2009-10-08 14:22:10 UTC (rev 3903)
+++ extensions/trunk/servlet/tests/unit-tests.xml 2009-10-08 14:58:57 UTC (rev 3904)
@@ -1,8 +1,8 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<suite name="Web Beans Tomcat Integration" verbose="1" >
+<suite name="Weld Tomcat Integration" verbose="1" >
- <test name="Web Beans Tomcat Integration">
+ <test name="Weld Tomcat Integration">
<method-selectors>
<method-selector>
<selector-class
name="org.jboss.testharness.impl.testng.DisableIntegrationTestsMethodSelector"
/>
@@ -16,10 +16,10 @@
<exclude name="stub" />
<exclude name="broken" />
</run>
- </groups>
+
</groups>"tests/src/test/debug-resources/META-INF/jboss-test-harness.properties"
<packages>
- <package name="org.jboss.webbeans.test.tomcat.examples" />
- <package name="org.jboss.webbeans.test.tomcat.lookup" />
+ <package name="org.jboss.weld.test.tomcat.examples" />
+ <package name="org.jboss.weld.test.tomcat.lookup" />
</packages>
</test>
Modified:
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldApplication.java
===================================================================
---
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldApplication.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldApplication.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -22,9 +22,9 @@
* JSR-299 conversation scopes with Wicket page metadata. If you have your own
* WebApplication subclass, and can't subclass this class, you just need to do
* the three things that this class does, i.e. register the
- * WebBeansComponentInstantiationListener, and override the two methods below to
+ * WeldComponentInstantiationListener, and override the two methods below to
* return the RequestCycle and IRequestCycleProcessor subclasses specific to
- * WebBeans, or your subclasses of those classes.
+ * Weld, or your subclasses of those classes.
*
* @author cpopetz
*
@@ -64,7 +64,7 @@
/**
* Add our component instantiation listener
*
- * @see WebBeansComponentInstantiationListener
+ * @see WeldComponentInstantiationListener
*/
protected void internalInit()
{
@@ -74,7 +74,7 @@
/**
- * Override to return our WebBeans-specific request cycle processor
+ * Override to return our Weld-specific request cycle processor
*
* @see WeldWebRequestCycleProcessor
*/
@@ -85,7 +85,7 @@
}
/**
- * Override to return our WebBeans-specific request cycle
+ * Override to return our Weld-specific request cycle
*
* @see WeldRequestCycle
*/
Modified: extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldMetaData.java
===================================================================
---
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldMetaData.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldMetaData.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -3,7 +3,7 @@
import org.apache.wicket.MetaDataKey;
/**
- * Public storage for the metadata key used by the WebBeans integration to store
+ * Public storage for the metadata key used by the Weld integration to store
* conversation ids in wicket page metadata.
*
* @author cpopetz
Modified:
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldRequestCycle.java
===================================================================
---
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldRequestCycle.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldRequestCycle.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -25,7 +25,7 @@
import org.jboss.weld.servlet.ConversationBeanStore;
/**
- * WebBeansRequestCycle is a subclass of the standard wicket WebRequestCycle
+ * WeldRequestCycle is a subclass of the standard wicket WebRequestCycle
* which:
* <ul>
* <li>restores long-running conversations specified in wicket page metadata
Modified:
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldWebRequestCycleProcessor.java
===================================================================
---
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldWebRequestCycleProcessor.java 2009-10-08
14:22:10 UTC (rev 3903)
+++
extensions/trunk/wicket/src/main/java/org/jboss/weld/wicket/WeldWebRequestCycleProcessor.java 2009-10-08
14:58:57 UTC (rev 3904)
@@ -12,7 +12,7 @@
import org.jboss.weld.conversation.ConversationManager;
/**
- * WebBeansWebRequestCycleProcessor is a subclass of the standard wicket
+ * WeldWebRequestCycleProcessor is a subclass of the standard wicket
* WebRequestCycleProcessor which saves the conversation id of any long-running
* cornversation in wicket page metadata. It also cleans up the conversation
* context.