openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1431230 - in /openwebbeans/trunk: webbeans-ee-common/src/main/java/org/apache/webbeans/ee/common/beans/ webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ webbeans-impl/src/main/java/org/apache/webbeans/component/ webbeans-impl/src/ma...
Date Thu, 10 Jan 2013 09:37:57 GMT
Author: struberg
Date: Thu Jan 10 09:37:56 2013
New Revision: 1431230

URL: http://svn.apache.org/viewvc?rev=1431230&view=rev
Log:
OWB-344 move WebBeansContext to first param and remove getInstance()

Modified:
    openwebbeans/trunk/webbeans-ee-common/src/main/java/org/apache/webbeans/ee/common/beans/PrincipalBean.java
    openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/UserTransactionBean.java
    openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorBean.java
    openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorFactoryBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java
    openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java
    openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java
    openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/plugin/OpenWebBeansJmsPlugin.java

Modified: openwebbeans/trunk/webbeans-ee-common/src/main/java/org/apache/webbeans/ee/common/beans/PrincipalBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ee-common/src/main/java/org/apache/webbeans/ee/common/beans/PrincipalBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ee-common/src/main/java/org/apache/webbeans/ee/common/beans/PrincipalBean.java
(original)
+++ openwebbeans/trunk/webbeans-ee-common/src/main/java/org/apache/webbeans/ee/common/beans/PrincipalBean.java
Thu Jan 10 09:37:56 2013
@@ -26,14 +26,15 @@ import javax.enterprise.context.spi.Crea
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.BuildInOwbBean;
 import org.apache.webbeans.component.WebBeansType;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.spi.SecurityService;
 
 public class PrincipalBean extends BuildInOwbBean<Principal>
 {
 
-    public PrincipalBean()
+    public PrincipalBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.PRINCIPAL, Principal.class);
+        super(webBeansContext, WebBeansType.PRINCIPAL, Principal.class);
         addApiType(Object.class);
         addApiType(Principal.class);
         addQualifier(new DefaultLiteral());

Modified: openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/UserTransactionBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/UserTransactionBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/UserTransactionBean.java
(original)
+++ openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/UserTransactionBean.java
Thu Jan 10 09:37:56 2013
@@ -25,14 +25,15 @@ import javax.transaction.UserTransaction
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.BuildInOwbBean;
 import org.apache.webbeans.component.WebBeansType;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.spi.TransactionService;
 
 public class UserTransactionBean extends BuildInOwbBean<UserTransaction>
 {
 
-    public UserTransactionBean()
+    public UserTransactionBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.USERTRANSACTION, UserTransaction.class);
+        super(webBeansContext, WebBeansType.USERTRANSACTION, UserTransaction.class);
         addApiType(Object.class);
         addApiType(UserTransaction.class);
         addQualifier(new DefaultLiteral());

Modified: openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorBean.java
(original)
+++ openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorBean.java
Thu Jan 10 09:37:56 2013
@@ -25,14 +25,15 @@ import javax.validation.Validator;
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.BuildInOwbBean;
 import org.apache.webbeans.component.WebBeansType;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.spi.ValidatorService;
 
 public class ValidatorBean extends BuildInOwbBean<Validator>
 {
 
-    public ValidatorBean()
+    public ValidatorBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.VALIDATION, Validator.class);
+        super(webBeansContext, WebBeansType.VALIDATION, Validator.class);
         addApiType(Object.class);
         addApiType(Validator.class);
         addQualifier(new DefaultLiteral());

Modified: openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorFactoryBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorFactoryBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorFactoryBean.java
(original)
+++ openwebbeans/trunk/webbeans-ee/src/main/java/org/apache/webbeans/ee/beans/ValidatorFactoryBean.java
Thu Jan 10 09:37:56 2013
@@ -25,14 +25,15 @@ import javax.validation.ValidatorFactory
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.BuildInOwbBean;
 import org.apache.webbeans.component.WebBeansType;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.spi.ValidatorService;
 
 public class ValidatorFactoryBean extends BuildInOwbBean<ValidatorFactory>
 {
 
-    public ValidatorFactoryBean()
+    public ValidatorFactoryBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.VALIDATIONFACT, ValidatorFactory.class);
+        super(webBeansContext, WebBeansType.VALIDATIONFACT, ValidatorFactory.class);
         addApiType(Object.class);
         addApiType(ValidatorFactory.class);
         addQualifier(new DefaultLiteral());

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractInjectionTargetBean.java
Thu Jan 10 09:37:56 2013
@@ -96,7 +96,7 @@ public abstract class AbstractInjectionT
      */
     protected AbstractInjectionTargetBean(WebBeansContext webBeansContext, WebBeansType webBeansType,
Class<T> returnType, AnnotatedType<T> annotatedType)
     {
-        super(webBeansType, returnType, webBeansContext);
+        super(webBeansContext, webBeansType, returnType);
         Asserts.assertNotNull(annotatedType, "AnnotatedType may not be null");
         this.annotatedType = annotatedType;
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
Thu Jan 10 09:37:56 2013
@@ -75,7 +75,7 @@ public abstract class AbstractOwbBean<T>
     /** Return type of the bean */
     protected Class<T> returnType;
 
-    /** this is only for public access and will be built from {@link #stereoTypes} on demand
*/
+    /** the StereoType classes of that bean if it's annotated with a StereoType */
     protected Set<Class<? extends Annotation>> stereoTypeClasses = new HashSet<Class<?
extends Annotation>>();
 
     /**This bean is specialized or not*/
@@ -122,7 +122,7 @@ public abstract class AbstractOwbBean<T>
      * @param webBeansContext
      * @param webBeansType web beans type
      */
-    protected AbstractOwbBean(WebBeansType webBeansType, Class<T> returnType, WebBeansContext
webBeansContext)
+    protected AbstractOwbBean(WebBeansContext webBeansContext, WebBeansType webBeansType,
Class<T> returnType)
     {
         this.webBeansType = webBeansType;
         this.returnType = returnType;
@@ -135,9 +135,9 @@ public abstract class AbstractOwbBean<T>
      * @param webBeanType beans type
      * @param webBeansContext
      */
-    protected AbstractOwbBean(WebBeansType webBeanType, WebBeansContext webBeansContext)
+    protected AbstractOwbBean(WebBeansContext webBeansContext, WebBeansType webBeanType)
     {
-        this(webBeanType, null, webBeansContext);
+        this(webBeansContext, webBeanType, null);
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractProducerBean.java
Thu Jan 10 09:37:56 2013
@@ -46,7 +46,7 @@ public abstract class AbstractProducerBe
      */
     protected AbstractProducerBean(WebBeansType type, Class<T> returnType, InjectionTargetBean<?>
ownerComponent)
     {
-        super(type, returnType, ownerComponent.getWebBeansContext());
+        super(ownerComponent.getWebBeansContext(), type, returnType);
         this.ownerComponent = ownerComponent;
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BeanManagerBean.java
Thu Jan 10 09:37:56 2013
@@ -31,7 +31,7 @@ public class BeanManagerBean extends Abs
 
     public BeanManagerBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.MANAGER, BeanManager.class, webBeansContext);
+        super(webBeansContext, WebBeansType.MANAGER, BeanManager.class);
         setImplScopeType(ApplicationScoped.class);
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/BuildInOwbBean.java
Thu Jan 10 09:37:56 2013
@@ -35,17 +35,17 @@ import org.apache.webbeans.proxy.MethodH
 import org.apache.webbeans.config.WebBeansContext;
 
 /**
- * Following 3 options are provided for vendor's build-in beans implementation:
+ * Following 3 options are provided for vendor's built-in beans implementation:
  * 
- * 1. "none", means the build-in bean does not need a proxy wrapper.
- * 2. "default", means the build-in bean needs OWB-provided default proxy wrapper.
+ * 1. "none", means the built-in bean does not need a proxy wrapper.
+ * 2. "default", means the built-in bean needs OWB-provided default proxy wrapper.
  * 3. A class name, which implements MethodHandler. This will allow vendor to 
  *    customize the serialization behavior.
  *    
- * The default values for 4 build-in beans are "default". Following property could
+ * The default values for 4 built-in beans are "default". Following property could
  * be used to change the default behavior:
  * 
- * Property Name:   org.apache.webbeans.component.BuildInOwbBean.property 
+ * Property Name:   org.apache.webbeans.component.BuiltInOwbBean.property
  * Sample values:   UserTransation:none;Principal:default;Validation:com.mycompany.ValidationProxyHandler;ValidationFactory:default
  *  
  * @author yingwang
@@ -85,7 +85,58 @@ public abstract class BuildInOwbBean<T> 
     
     
     protected Constructor handlerContructor;
-    
+
+    @SuppressWarnings("unchecked")
+    protected BuildInOwbBean(WebBeansContext webBeansContext, WebBeansType webBeansType,
Class<T> returnType)
+    {
+        super(webBeansContext, webBeansType, returnType);
+        initBuildInBeanConfig(getWebBeansContext());
+        handlerClassName = proxyHandlerMap.get(getWebBeansType());
+        if (handlerClassName.equalsIgnoreCase(PROXY_HANDLER_VALUE_NONE) ||
+                handlerClassName.equalsIgnoreCase(PROXY_HANDLER_VALUE_DEFAULT))
+        {
+            return;
+        }
+
+        // initialize the custom proxy handler class and its constructor.
+        AccessController.doPrivileged(new PrivilegedAction<T>()
+        {
+            private BuildInOwbBean<T> buildinBean;
+
+            public T run()
+            {
+                try
+                {
+                    buildinBean.handlerClass = Class.forName(name);
+                    buildinBean.handlerContructor = buildinBean.handlerClass.getConstructor(BuildInOwbBean.class,
Object.class);
+                    return null;
+                }
+                catch (ClassNotFoundException e)
+                {
+                    getLogger().log(Level.SEVERE, e.getMessage(), e);
+                }
+                catch (SecurityException e)
+                {
+                    getLogger().log(Level.SEVERE, e.getMessage(), e);
+                }
+                catch (NoSuchMethodException e)
+                {
+                    getLogger().log(Level.SEVERE, e.getMessage(), e);
+                }
+                buildinBean.handlerClass = null;
+                buildinBean.handlerContructor = null;
+                return null;
+            }
+
+            protected PrivilegedAction<T> setBuildInBean(BuildInOwbBean<T> b)
+            {
+                buildinBean = b;
+                return this;
+            }
+
+        }.setBuildInBean(this));
+    }
+
     /**
      * Parse the custom property.
      * 
@@ -139,57 +190,7 @@ public abstract class BuildInOwbBean<T> 
         return true;
     }
 
-    @SuppressWarnings("unchecked")
-    protected BuildInOwbBean(WebBeansType webBeansType, Class<T> returnType)
-    {
-        super(webBeansType, returnType, WebBeansContext.currentInstance());
-        initBuildInBeanConfig(getWebBeansContext());
-        handlerClassName = proxyHandlerMap.get(getWebBeansType());
-        if (handlerClassName.equalsIgnoreCase(PROXY_HANDLER_VALUE_NONE) ||
-                handlerClassName.equalsIgnoreCase(PROXY_HANDLER_VALUE_DEFAULT)) 
-        {
-            return;
-        }
 
-        // initialize the custom proxy handler class and its constructor.
-        AccessController.doPrivileged(new PrivilegedAction<T>() 
-        {
-            private BuildInOwbBean<T> buildinBean;
-            
-            public T run()
-            {
-                try 
-                {
-                    buildinBean.handlerClass = Class.forName(name);
-                    buildinBean.handlerContructor = buildinBean.handlerClass.getConstructor(BuildInOwbBean.class,
Object.class);
-                    return null;
-                } 
-                catch (ClassNotFoundException e) 
-                {
-                    getLogger().log(Level.SEVERE, e.getMessage(), e);
-                } 
-                catch (SecurityException e) 
-                {
-                    getLogger().log(Level.SEVERE, e.getMessage(), e);
-                } 
-                catch (NoSuchMethodException e) 
-                {
-                    getLogger().log(Level.SEVERE, e.getMessage(), e);
-                }
-                buildinBean.handlerClass = null;
-                buildinBean.handlerContructor = null;
-                return null;
-            }
-            
-            protected PrivilegedAction<T> setBuildInBean(BuildInOwbBean<T> b)

-            {
-                buildinBean = b;
-                return this;
-            }
-            
-        }.setBuildInBean(this));
-    }
-        
     /**
      * Create a dependent proxy wrapper around the actual build in bean instance.
      * 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/EventBean.java
Thu Jan 10 09:37:56 2013
@@ -48,7 +48,7 @@ public class EventBean<T> extends Abstra
     @SuppressWarnings("serial")
     public EventBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.OBSERVABLE,new TypeLiteral<Event<T>>(){}.getRawType(),
webBeansContext);
+        super(webBeansContext, WebBeansType.OBSERVABLE,new TypeLiteral<Event<T>>(){}.getRawType());
     }
     
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InjectionPointBean.java
Thu Jan 10 09:37:56 2013
@@ -65,7 +65,7 @@ public class InjectionPointBean extends 
     
     public InjectionPointBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.INJECTIONPOINT,InjectionPoint.class, webBeansContext);
+        super(webBeansContext, WebBeansType.INJECTIONPOINT,InjectionPoint.class);
         
         addQualifier(new DefaultLiteral());
         setImplScopeType(Dependent.class);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
Thu Jan 10 09:37:56 2013
@@ -40,7 +40,7 @@ public class InstanceBean<T> extends Abs
     @SuppressWarnings("serial")
     public InstanceBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.INSTANCE, new TypeLiteral<Instance<T>>(){}.getRawType(),
webBeansContext);
+        super(webBeansContext, WebBeansType.INSTANCE, new TypeLiteral<Instance<T>>(){}.getRawType());
     }
     
          

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/third/ThirdpartyBeanImpl.java
Thu Jan 10 09:37:56 2013
@@ -37,9 +37,9 @@ public class ThirdpartyBeanImpl<T> exten
     private Bean<T> bean = null;
     
     
-    public ThirdpartyBeanImpl(Bean<T> bean, WebBeansContext webBeansContext)
+    public ThirdpartyBeanImpl(WebBeansContext webBeansContext, Bean<T> bean)
     {
-        super(WebBeansType.THIRDPARTY, webBeansContext);
+        super(webBeansContext, WebBeansType.THIRDPARTY);
         
         this.bean = bean;
         

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Thu Jan 10 09:37:56 2013
@@ -343,7 +343,7 @@ public class BeanManagerImpl implements 
         }
         else
         {
-            ThirdpartyBeanImpl<?> bean = new ThirdpartyBeanImpl(newBean, webBeansContext);
+            ThirdpartyBeanImpl<?> bean = new ThirdpartyBeanImpl(webBeansContext, newBean);
             addPassivationInfo(bean);
             deploymentBeans.add(bean);
         }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptorBeanPleaseRemove.java
Thu Jan 10 09:37:56 2013
@@ -88,7 +88,7 @@ public class WebBeansInterceptorBeanPlea
 
     public WebBeansInterceptorBeanPleaseRemove(AbstractInjectionTargetBean<T> delegateBean)
     {
-        super(WebBeansType.INTERCEPTOR,delegateBean.getReturnType(), delegateBean.getWebBeansContext());
+        super(delegateBean.getWebBeansContext(), WebBeansType.INTERCEPTOR,delegateBean.getReturnType());
         
         this.delegateBean = delegateBean;
         clazz = getDelegate().getReturnType();

Modified: openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java
(original)
+++ openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsBean.java
Thu Jan 10 09:37:56 2013
@@ -35,9 +35,9 @@ public class JmsBean<T> extends Abstract
 {
     private JMSModel jmsModel = null;
     
-    JmsBean(JMSModel jmsModel)
+    JmsBean(WebBeansContext webBeansContext, JMSModel jmsModel)
     {
-        super(WebBeansType.JMS, WebBeansContext.getInstance());
+        super(webBeansContext, WebBeansType.JMS);
         this.jmsModel = jmsModel;
     }
 

Modified: openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java
(original)
+++ openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/component/JmsComponentFactory.java
Thu Jan 10 09:37:56 2013
@@ -32,6 +32,7 @@ import javax.jms.TopicPublisher;
 import javax.jms.TopicSession;
 import javax.jms.TopicSubscriber;
 
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.jms.JMSModel;
 import org.apache.webbeans.jms.JMSModel.JMSType;
 import org.apache.webbeans.util.Asserts;
@@ -50,11 +51,11 @@ public final class JmsComponentFactory
         return instance;
     }
     
-    public <T> JmsBean<T> getJmsComponent(JMSModel model)
+    public <T> JmsBean<T> getJmsComponent(WebBeansContext webBeansContext, JMSModel
model)
     {
         Asserts.assertNotNull(model,"model parameter can not be null");
         
-        JmsBean<T> component = new JmsBean<T>(model);
+        JmsBean<T> component = new JmsBean<T>(webBeansContext, model);
         
         if(model.getJmsType().equals(JMSType.QUEUE))
         {

Modified: openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/plugin/OpenWebBeansJmsPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/plugin/OpenWebBeansJmsPlugin.java?rev=1431230&r1=1431229&r2=1431230&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/plugin/OpenWebBeansJmsPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-jms/src/main/java/org/apache/webbeans/jms/plugin/OpenWebBeansJmsPlugin.java
Thu Jan 10 09:37:56 2013
@@ -20,6 +20,7 @@ package org.apache.webbeans.jms.plugin;
 
 import javax.enterprise.inject.spi.Bean;
 
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.jms.JMSModel;
 import org.apache.webbeans.jms.component.JmsComponentFactory;
@@ -35,15 +36,18 @@ import org.apache.webbeans.spi.plugins.A
  */
 public class OpenWebBeansJmsPlugin extends AbstractOwbPlugin implements org.apache.webbeans.plugins.OpenWebBeansJmsPlugin
 {
+    private WebBeansContext webBeansContext;
 
-    public OpenWebBeansJmsPlugin()
+    public OpenWebBeansJmsPlugin(WebBeansContext webBeansContext)
     {
         super();
+        this.webBeansContext = webBeansContext;
     }
 
+    @Override
     public Bean<?> getJmsBean(JMSModel model)
     {
-        JmsBean<?> bean = JmsComponentFactory.getJmsComponentFactory().getJmsComponent(model);
+        JmsBean<?> bean = JmsComponentFactory.getJmsComponentFactory().getJmsComponent(webBeansContext,
model);
 
         return bean;
 



Mime
View raw message