openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r751280 - in /incubator/openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java test/java/org/apache/webbeans/test/mock/MockManager.java
Date Sat, 07 Mar 2009 14:59:39 GMT
Author: gerdogdu
Date: Sat Mar  7 14:59:39 2009
New Revision: 751280

URL: http://svn.apache.org/viewvc?rev=751280&view=rev
Log:
Updating XML deployment type configuration.

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java?rev=751280&r1=751279&r2=751280&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
Sat Mar  7 14:59:39 2009
@@ -53,6 +53,7 @@
 
 import org.apache.webbeans.WebBeansConstants;
 import org.apache.webbeans.annotation.CurrentLiteral;
+import org.apache.webbeans.annotation.ProductionLiteral;
 import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.component.xml.XMLComponentImpl;
 import org.apache.webbeans.component.xml.XMLProducerComponentImpl;
@@ -1350,9 +1351,17 @@
         {
             // Check from stereotype
             Annotation stereoTypeDeploymentType = WebBeansUtil.getMaxPrecedenceSteroTypeDeploymentType(component);
-
-            // Default deployment type
-            component.setType(stereoTypeDeploymentType);
+            
+            if(stereoTypeDeploymentType == null)
+            {
+                // Default deployment type
+                component.setType(new ProductionLiteral());                
+            }
+            else
+            {
+                component.setType(stereoTypeDeploymentType);
+            }
+            
         }
         else
         {

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java?rev=751280&r1=751279&r2=751280&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
Sat Mar  7 14:59:39 2009
@@ -33,18 +33,20 @@
 
 import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.container.ManagerImpl;
+import org.apache.webbeans.container.activity.ActivityManager;
 
 public class MockManager implements Manager
 {
     private static MockManager instance = new MockManager();
 
-    private static ManagerImpl manager = ManagerImpl.getManager();
+    private ManagerImpl manager = null;
 
     private List<AbstractComponent<?>> componentList = new ArrayList<AbstractComponent<?>>();
 
     private MockManager()
     {
-
+        this.manager = new ManagerImpl();
+        ActivityManager.getInstance().setRootActivity(this.manager);
     }
 
     public static MockManager getInstance()
@@ -55,7 +57,10 @@
     public void clear()
     {
         componentList.clear();
-        manager.getBeans().clear();
+        if(manager != null)
+        {
+            manager.getBeans().clear();   
+        }
     }
 
     public List<AbstractComponent<?>> getComponents()



Mime
View raw message