openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1363137 - in /openwebbeans/trunk: atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/ webbeans-impl/src/main/java/org/apache/webbeans/util/ webbeans-porting/src/main/java/org/apache/webbeans/test/tck/
Date Wed, 18 Jul 2012 21:55:24 GMT
Author: struberg
Date: Wed Jul 18 21:55:23 2012
New Revision: 1363137

URL: http://svn.apache.org/viewvc?rev=1363137&view=rev
Log:
OWB-683 cleanup TCK and porting modules

Modified:
    openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
    openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/BeansImpl.java
    openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java
    openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java

Modified: openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java?rev=1363137&r1=1363136&r2=1363137&view=diff
==============================================================================
--- openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java
(original)
+++ openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java
Wed Jul 18 21:55:23 2012
@@ -29,6 +29,7 @@ import javax.enterprise.inject.spi.BeanM
 import junit.framework.Test;
 
 import org.apache.webbeans.atinject.tck.specific.SpecificProducer;
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.test.tck.StandaloneContainersImpl;
 import org.atinject.tck.Tck;
 import org.atinject.tck.auto.Car;
@@ -70,7 +71,7 @@ public class AtInjectContainer extends S
         {
             deploy(deploymentClasses);
             
-            BeanManager manager = getBeanManager(); 
+            BeanManager manager = WebBeansContext.getInstance().getBeanManagerImpl();
             Set<Bean<?>> beans = manager.getBeans(Car.class, new Annotation[0]);
             Bean<?> carBean = beans.iterator().next();
             

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java?rev=1363137&r1=1363136&r2=1363137&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansAnnotatedTypeUtil.java
Wed Jul 18 21:55:23 2012
@@ -512,8 +512,8 @@ public final class WebBeansAnnotatedType
                 definitionUtil.defineSerializable(producerMethodBean);
                 definitionUtil.defineStereoTypes(producerMethodBean, AnnotationUtil.getAnnotationsFromSet(annotatedMethod.getAnnotations()));
                 webBeansContext.getWebBeansUtil().setBeanEnableFlagForProducerBean(bean,
-                                                                                        
         producerMethodBean,
-                                                                                        
         AnnotationUtil.getAnnotationsFromSet(annotatedMethod.getAnnotations()));
+                                                                                   producerMethodBean,
+                                                                                   AnnotationUtil.getAnnotationsFromSet(annotatedMethod.getAnnotations()));
 
                 Set<Type> types = annotatedMethod.getTypeClosure();
                 producerMethodBean.getTypes().addAll(types);

Modified: openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/BeansImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/BeansImpl.java?rev=1363137&r1=1363136&r2=1363137&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/BeansImpl.java
(original)
+++ openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/BeansImpl.java
Wed Jul 18 21:55:23 2012
@@ -23,50 +23,11 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.lang.reflect.Method;
-
-import javax.enterprise.inject.spi.Bean;
-import javax.persistence.Entity;
-
-import org.apache.webbeans.component.InjectionTargetBean;
-import org.apache.webbeans.component.ManagedBean;
-import org.apache.webbeans.component.WebBeansType;
-import org.apache.webbeans.config.DefinitionUtil;
-import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.util.AnnotationUtil;
 import org.jboss.jsr299.tck.spi.Beans;
 
 public class BeansImpl implements Beans
 {
 
-    @SuppressWarnings("unchecked")
-    public <T> Bean<T> createProducerMethodBean(Method method, Bean<?>
declaringBean)
-    {
-        DefinitionUtil definitionUtil = ((InjectionTargetBean<?>)declaringBean).getWebBeansContext().getDefinitionUtil();
-        return definitionUtil.createProducerComponent((Class<T>)method.getReturnType(),
method, (InjectionTargetBean<?>)declaringBean, false);
-        
-    }
-
-    public <T> Bean<T> createSimpleBean(Class<T> clazz)
-    {
-        WebBeansContext webBeansContext = WebBeansContext.getInstance();
-        webBeansContext.getManagedBeanConfigurator().checkManagedBeanCondition(clazz);
-
-        ManagedBean<T> bean = webBeansContext.getManagedBeanConfigurator().define(clazz,
WebBeansType.MANAGED);
-
-        return bean;
-    }
-
-    public boolean isEnterpriseBean( Class<?> clazz )
-    {
-        return false;
-    }
-
-    public boolean isEntityBean( Class<?> clazz )
-    {
-        return (AnnotationUtil.hasClassAnnotation(clazz, Entity.class));
-    }        
-
     public boolean isProxy( Object instance )
     {
         return instance.getClass().getName().contains("$$");
@@ -86,19 +47,4 @@ public class BeansImpl implements Beans
         ObjectInputStream ois = new ObjectInputStream(bais);
         return ois.readObject();
     }
-
-    public boolean isStatefulBean( Class<?> clazz )
-    {
-        return false;
-    }
-
-    public boolean isStatelessBean( Class<?> clazz )
-    {
-        return false;
-    }
-
-    public <T> T getEnterpriseBean(Class<? extends T> beanType, Class<T>
localInterface)
-    {
-        return null;
-    }
-}
\ No newline at end of file
+ }

Modified: openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java?rev=1363137&r1=1363136&r2=1363137&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java
(original)
+++ openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ManagersImpl.java
Wed Jul 18 21:55:23 2012
@@ -22,9 +22,7 @@ import javax.enterprise.inject.spi.BeanM
 
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.container.InjectableBeanManager;
-import org.apache.webbeans.exception.inject.DefinitionException;
 import org.jboss.jsr299.tck.spi.Managers;
-import org.jboss.testharness.api.DeploymentException;
 
 public class ManagersImpl implements Managers
 {
@@ -44,29 +42,4 @@ public class ManagersImpl implements Man
         
         return beanManager; 
     }
-
-    public boolean isDefinitionError(DeploymentException deploymentException)
-    {
-        Throwable cause = deploymentException.getCause();
-        
-        if(DefinitionException.class.isAssignableFrom(cause.getClass()))
-        {
-            return true;
-        }
-        
-        return false;
-    }
-
-    public boolean isDeploymentError(DeploymentException deploymentException)
-    {
-        Throwable cause = deploymentException.getCause();
-        
-        if(DeploymentException.class.isAssignableFrom(cause.getClass()))
-        {
-            return true;
-        }
-        
-        return false;
-    }
-
 }

Modified: openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java?rev=1363137&r1=1363136&r2=1363137&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
(original)
+++ openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
Wed Jul 18 21:55:23 2012
@@ -28,7 +28,6 @@ import java.util.logging.Logger;
 import javax.ejb.Singleton;
 import javax.ejb.Stateful;
 import javax.ejb.Stateless;
-import javax.enterprise.inject.spi.BeanManager;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
@@ -165,11 +164,6 @@ public class StandaloneContainersImpl im
         return this.excpetion;
     }
 
-    protected BeanManager getBeanManager()
-    {
-        return WebBeansContext.getInstance().getBeanManagerImpl();
-    }
-
     public void deploy(Collection<Class<?>> classes) throws DeploymentException
     {
         setUp(classes);



Mime
View raw message