[webbeans-commits] Webbeans SVN: r3664 - in extensions/trunk/se: src/main/java/org/jboss/webbeans/environment/se and 8 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Mon Sep 14 20:19:00 EDT 2009


Author: peteroyle
Date: 2009-09-14 20:18:59 -0400 (Mon, 14 Sep 2009)
New Revision: 3664

Removed:
   extensions/trunk/se/src/main/resources/beans.xml
Modified:
   extensions/trunk/se/pom.xml
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/bindings/Parameters.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/AbstractScanner.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEBeanDeploymentArchive.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeanDiscovery.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeansDeployment.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/Scanner.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/URLScanner.java
   extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/events/Shutdown.java
   extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/StartMainTest.java
   extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/MainTestBean.java
   extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/ParametersTestBean.java
   extensions/trunk/se/src/test/resources/META-INF/beans.xml
Log:
Updated to latest spec changes and added service registry

Modified: extensions/trunk/se/pom.xml
===================================================================
--- extensions/trunk/se/pom.xml	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/pom.xml	2009-09-15 00:18:59 UTC (rev 3664)
@@ -69,6 +69,11 @@
             <artifactId>webbeans-core</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>javax.inject</groupId>
+            <artifactId>inject-api</artifactId>
+        </dependency>
+
     </dependencies>
 
     <scm>

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,3 +1,19 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.webbeans.environment.se;
 
 import javax.enterprise.context.ApplicationScoped;
@@ -2,5 +18,5 @@
 import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Current;
 import javax.enterprise.inject.spi.BeanManager;
 
+import javax.inject.Inject;
 import org.jboss.webbeans.bootstrap.api.Bootstrap;
@@ -16,7 +32,7 @@
 {
    
    private static LogProvider log = Logging.getLogProvider(ShutdownManager.class);
-   private @Current WebBeansManager manager;
+   private @Inject WebBeansManager manager;
 
    private boolean hasShutdownBeenCalled = false;
    

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -20,7 +20,7 @@
 
 import org.jboss.webbeans.bootstrap.api.Bootstrap;
 import org.jboss.webbeans.bootstrap.api.Environments;
-import org.jboss.webbeans.bootstrap.spi.Deployment;
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
 import org.jboss.webbeans.context.api.BeanStore;
 import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
 import org.jboss.webbeans.environment.se.discovery.SEWebBeansDeployment;
@@ -57,16 +57,16 @@
         this.applicationBeanStore = new ConcurrentHashMapBeanStore();
     }
 
-    public BeanManager go()
-    {
-        bootstrap.setEnvironment(Environments.SE);
-        bootstrap.getServices().add(Deployment.class, new SEWebBeansDeployment() {});
-        bootstrap.setApplicationContext(applicationBeanStore);
-        bootstrap.startContainer();
-        bootstrap.startInitialization().deployBeans().validateBeans().endInitialization();
-        this.manager = bootstrap.getManager();
-        WebBeansManagerUtils.getInstanceByType(manager, ShutdownManager.class).
-                setBootstrap(bootstrap);
+    public BeanManager go() {
+        SEWebBeansDeployment deployment = new SEWebBeansDeployment() {};
+        bootstrap.startContainer(Environments.SE, deployment, this.applicationBeanStore);
+        final BeanDeploymentArchive mainBeanDepArch = deployment.getBeanDeploymentArchives().get(0);
+        this.manager = bootstrap.getManager(mainBeanDepArch);
+        bootstrap.startInitialization();
+        bootstrap.deployBeans();
+        WebBeansManagerUtils.getInstanceByType(manager, ShutdownManager.class).setBootstrap(bootstrap);
+        bootstrap.validateBeans();
+        bootstrap.endInitialization();
         return this.manager;
     }
 

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -22,9 +22,7 @@
 import java.util.List;
 
 import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.AfterBeanDiscovery;
 
 import org.jboss.webbeans.environment.se.StartMain;
 import org.jboss.webbeans.environment.se.bindings.Parameters;
@@ -41,6 +39,10 @@
 {
    private String[] args;
    private List<String> argsList;
+
+    public ParametersFactory() {
+        this.setArgs(StartMain.PARAMETERS);
+    }
    
    /**
     * Producer method for the injectable command line args.
@@ -79,13 +81,4 @@
       this.argsList = Collections.unmodifiableList( new ArrayList<String>( Arrays.asList( args ) ) );
    }
 
-   /**
-    * On WebBeans initialisation, retrieve the command line args that were given
-    * to StartMain.
-    *
-    * @param manager The Manager which has been initialized.
-    */
-   public void initArgs(@Observes AfterBeanDiscovery after) {
-      this.setArgs( StartMain.PARAMETERS );
-   }
 }

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/bindings/Parameters.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/bindings/Parameters.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/bindings/Parameters.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -20,14 +20,14 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
+import javax.inject.Qualifier;
 
-import javax.enterprise.inject.BindingType;
 
 /**
  * 
  * @author Peter Royle
  */
- at BindingType
+ at Qualifier
 @Retention(RetentionPolicy.RUNTIME)
 @Target( { ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD, ElementType.TYPE })
 public @interface Parameters {}

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/AbstractScanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/AbstractScanner.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/AbstractScanner.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
 /**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEBeanDeploymentArchive.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEBeanDeploymentArchive.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEBeanDeploymentArchive.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
-/*
+/**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.
@@ -20,6 +20,8 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
+import org.jboss.webbeans.bootstrap.api.helpers.SimpleServiceRegistry;
 import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
 import org.jboss.webbeans.ejb.spi.EjbDescriptor;
 
@@ -34,10 +36,12 @@
 public class SEBeanDeploymentArchive implements BeanDeploymentArchive
 {
     private final SEWebBeanDiscovery wbDiscovery;
+    private final ServiceRegistry serviceRegistry;
 
     public SEBeanDeploymentArchive()
     {
         wbDiscovery = new SEWebBeanDiscovery() {};
+        serviceRegistry = new SimpleServiceRegistry();
     }
 
     /**
@@ -73,4 +77,8 @@
         return Collections.EMPTY_SET;
     }
 
+    public ServiceRegistry getServices() {
+        return this.serviceRegistry;
+    }
+
 }

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeanDiscovery.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeanDiscovery.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeanDiscovery.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
 /**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.
@@ -22,7 +22,6 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
 import org.jboss.webbeans.environment.se.util.Reflections;
 
 /**
@@ -33,7 +32,7 @@
  * @author Pete Muir
  * @author Ales Justin
  */
-public abstract class SEWebBeanDiscovery implements WebBeanDiscovery
+public abstract class SEWebBeanDiscovery
 {
    
    private final Set<Class<?>> wbClasses;

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeansDeployment.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeansDeployment.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/SEWebBeansDeployment.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
 /**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.
@@ -18,6 +18,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
 import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
 import org.jboss.webbeans.bootstrap.spi.Deployment;
 
@@ -42,7 +43,7 @@
     /**
      * {@inheritDoc}
      * @return A collection containing the singular logical BeanDeploymentArchive
-     *         consisting of all Bean classes and beans.xml descriptos in the current
+     *         consisting of all Bean classes and beans.xml descriptors in the current
      *         classpath.
      */
     public List<BeanDeploymentArchive> getBeanDeploymentArchives()
@@ -59,4 +60,8 @@
     {
         return this.beanDeploymentArchive;
     }
+
+    public ServiceRegistry getServices() {
+        return this.beanDeploymentArchive.getServices();
+    }
 }

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/Scanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/Scanner.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/Scanner.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
 /**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/URLScanner.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/URLScanner.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/URLScanner.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
 /**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.

Modified: extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/events/Shutdown.java
===================================================================
--- extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/events/Shutdown.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/events/Shutdown.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
-/*
+/**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.
@@ -20,8 +20,8 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
+import javax.inject.Qualifier;
 
-import javax.enterprise.inject.BindingType;
 
 /**
  * Fired by webbeans SE before shutting down. Applications and modules should
@@ -29,7 +29,7 @@
  * 
  * @author Peter Royle
  */
- at BindingType
+ at Qualifier
 @Retention(RetentionPolicy.RUNTIME)
 @Target( { ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD, ElementType.TYPE })
 public @interface Shutdown{}

Deleted: extensions/trunk/se/src/main/resources/beans.xml
===================================================================
--- extensions/trunk/se/src/main/resources/beans.xml	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/main/resources/beans.xml	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,19 +0,0 @@
-<!--
-
-    JBoss, Home of Professional Open Source
-    Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.
-
--->
-<beans></beans>

Modified: extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/StartMainTest.java
===================================================================
--- extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/StartMainTest.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/StartMainTest.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
 /**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.

Modified: extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/MainTestBean.java
===================================================================
--- extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/MainTestBean.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/MainTestBean.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
 /**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.
@@ -16,25 +16,28 @@
  */
 package org.jboss.webbeans.environment.se.test.beans;
 
+import java.io.Serializable;
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Current;
-import javax.enterprise.inject.Initializer;
 import javax.enterprise.inject.spi.AfterDeploymentValidation;
+import javax.inject.Inject;
 
 /**
  *
  * @author Peter Royle
  */
 @ApplicationScoped
-public class MainTestBean
+public class MainTestBean implements Serializable
 {
 
     boolean initialised = false;
     ParametersTestBean parametersTestBean;
 
-    @Initializer
-    public void init(@Current ParametersTestBean paramsTestBean)
+    public MainTestBean() {
+    }
+
+    @Inject
+    public MainTestBean(ParametersTestBean paramsTestBean)
     {
         this.initialised = true;
         this.parametersTestBean = paramsTestBean;

Modified: extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/ParametersTestBean.java
===================================================================
--- extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/ParametersTestBean.java	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/test/java/org/jboss/webbeans/environment/se/test/beans/ParametersTestBean.java	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,8 +1,8 @@
 /**
  * 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.
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.
@@ -15,14 +15,14 @@
  * limitations under the License.
  */
 
-
 package org.jboss.webbeans.environment.se.test.beans;
 
+import java.io.Serializable;
 import java.util.List;
 
 import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Initializer;
 
+import javax.inject.Inject;
 import org.jboss.webbeans.environment.se.bindings.Parameters;
 import org.testng.Assert;
 
@@ -31,12 +31,15 @@
  * @author Peter Royle
  */
 @ApplicationScoped
-public class ParametersTestBean {
+public class ParametersTestBean implements Serializable {
 
     List<String> parameters;
 
-    @Initializer
-    public void init(@Parameters List<String> params) {
+    public ParametersTestBean() {
+    }
+
+    @Inject
+    public ParametersTestBean(@Parameters List<String> params) {
         this.parameters = params;
         // even if no args are given, it should will always at least be an empty array
         Assert.assertNotNull( params );

Modified: extensions/trunk/se/src/test/resources/META-INF/beans.xml
===================================================================
--- extensions/trunk/se/src/test/resources/META-INF/beans.xml	2009-09-14 17:57:21 UTC (rev 3663)
+++ extensions/trunk/se/src/test/resources/META-INF/beans.xml	2009-09-15 00:18:59 UTC (rev 3664)
@@ -1,9 +1,9 @@
 <!--
 
     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.
+    Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.




More information about the weld-commits mailing list