Author: pete.muir(a)jboss.org
Date: 2009-03-22 13:18:51 -0400 (Sun, 22 Mar 2009)
New Revision: 2132
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BootstrapOrderingBeanComparator.java
ri/trunk/tests/src/test/java/com/
ri/trunk/tests/src/test/java/com/acme/
ri/trunk/tests/src/test/java/com/acme/RoadRunner.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Animal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Cow.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/DeployerOrderingTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Gazelle.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/GazelleLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Lion.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/LionLocal.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Tuna.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InjectionPointBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InstanceBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/ManagerBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/tests/unit-tests.xml
Log:
Start work on bean ordering for deployer
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java 2009-03-22
13:27:30 UTC (rev 2131)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -48,8 +48,6 @@
{
return DEFAULT_TYPES;
}
-
-
@Override
public Set<Annotation> getBindings()
@@ -69,4 +67,10 @@
return FILTERED_ANNOTATION_TYPES;
}
+ @Override
+ public String toString()
+ {
+ return "Built-in implicit javax.event.Event bean";
+ }
+
}
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InjectionPointBean.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InjectionPointBean.java 2009-03-22
13:27:30 UTC (rev 2131)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InjectionPointBean.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -80,4 +80,10 @@
return TYPES;
}
+ @Override
+ public String toString()
+ {
+ return "Built-in javax.inject.manager.InjectionPoint bean";
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InstanceBean.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InstanceBean.java 2009-03-22
13:27:30 UTC (rev 2131)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InstanceBean.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -66,4 +66,10 @@
return FILTERED_ANNOTATION_TYPES;
}
+ @Override
+ public String toString()
+ {
+ return "Built-in implicit javax.inject.Instance bean";
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/ManagerBean.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/ManagerBean.java 2009-03-22
13:27:30 UTC (rev 2131)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/ManagerBean.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -56,4 +56,11 @@
return true;
}
+ @Override
+ public String toString()
+ {
+ return "Built-in javax.inject.manager.Manager bean";
+ }
+
+
}
\ No newline at end of file
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-03-22
13:27:30 UTC (rev 2131)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -3,6 +3,7 @@
import java.lang.annotation.Annotation;
import java.util.HashSet;
import java.util.Set;
+import java.util.TreeSet;
import javax.event.Observes;
import javax.inject.BindingType;
@@ -47,33 +48,35 @@
public BeanDeployer(ManagerImpl manager)
{
this.manager = manager;
- this.beans = new HashSet<RIBean<?>>();
+ this.beans = new TreeSet<RIBean<?>>(new
BootstrapOrderingBeanComparator());
this.classes = new HashSet<AnnotatedClass<?>>();
}
-
- public void addBean(RIBean<?> bean)
+ public BeanDeployer addBean(RIBean<?> bean)
{
this.beans.add(bean);
+ return this;
}
- public void addClass(Class<?> clazz)
+ public BeanDeployer addClass(Class<?> clazz)
{
if (!clazz.isAnnotation() && !clazz.isEnum())
{
classes.add(AnnotatedClassImpl.of(clazz));
}
+ return this;
}
- public void addClasses(Iterable<Class<?>> classes)
+ public BeanDeployer addClasses(Iterable<Class<?>> classes)
{
for (Class<?> clazz : classes)
{
addClass(clazz);
}
+ return this;
}
- public void deploy()
+ public BeanDeployer createBeans()
{
for (AnnotatedClass<?> clazz : classes)
{
@@ -86,16 +89,37 @@
createSimpleBean(clazz);
}
}
+ return this;
+ }
+
+ public BeanDeployer deploy()
+ {
+ printBeans();
manager.setBeans(beans);
+ return this;
}
+ public Set<RIBean<?>> getBeans()
+ {
+ return beans;
+ }
+
+ protected void printBeans()
+ {
+ for (RIBean<?> bean : beans)
+ {
+ log.info("Bean: " + bean);
+ }
+ }
+
/**
* Creates a Web Bean from a bean abstraction and adds it to the set of
* created beans
*
* Also creates the implicit field- and method-level beans, if present
*
- * @param bean The bean representation
+ * @param bean
+ * The bean representation
*/
protected void createBean(AbstractClassBean<?> bean, final
AnnotatedClass<?> annotatedClass)
{
@@ -114,8 +138,6 @@
createRealizedProducerFields(bean, annotatedClass);
createRealizedObserverMethods(bean, annotatedClass);
}
-
- log.info("Web Bean: " + bean);
}
private void createProducerMethods(AbstractClassBean<?> declaringBean,
AnnotatedClass<?> annotatedClass)
@@ -132,14 +154,13 @@
ProducerMethodBean<?> bean = ProducerMethodBean.of(annotatedMethod,
declaringBean, manager);
beans.add(bean);
manager.getResolver().addInjectionPoints(bean.getInjectionPoints());
- log.info("Web Bean: " + bean);
}
private void createRealizedProducerMethods(AbstractClassBean<?> declaringBean,
AnnotatedClass<?> realizingClass)
{
AnnotatedClass<?> realizedClass = realizingClass.getSuperclass();
for (AnnotatedMethod<?> realizedMethod :
realizedClass.getDeclaredAnnotatedMethods(Produces.class))
- {
+ {
createProducerMethod(declaringBean, realizeProducerMethod(realizedMethod,
realizingClass));
}
}
@@ -148,7 +169,7 @@
{
AnnotatedClass<?> realizedClass = realizingClass.getSuperclass();
for (final AnnotatedField<?> realizedField :
realizedClass.getDeclaredAnnotatedFields(Produces.class))
- {
+ {
createProducerField(declaringBean, realizeProducerField(realizedField,
realizingClass));
}
}
@@ -157,7 +178,6 @@
{
ProducerFieldBean<?> bean = ProducerFieldBean.of(field, declaringBean,
manager);
beans.add(bean);
- log.info("Web Bean: " + bean);
}
private void createProducerFields(AbstractClassBean<?> declaringBean,
AnnotatedClass<?> annotatedClass)
@@ -167,7 +187,7 @@
createProducerField(declaringBean, field);
}
}
-
+
private void createObserverMethods(AbstractClassBean<?> declaringBean,
AnnotatedClass<?> annotatedClass)
{
for (AnnotatedMethod<?> method :
annotatedClass.getDeclaredMethodsWithAnnotatedParameters(Observes.class))
@@ -205,7 +225,8 @@
/**
* Indicates if the type is a simple Web Bean
*
- * @param type The type to inspect
+ * @param type
+ * The type to inspect
* @return True if simple Web Bean, false otherwise
*/
private boolean isTypeSimpleWebBean(AnnotatedClass<?> clazz)
@@ -218,11 +239,9 @@
return !Reflections.isAbstract(rawType) &&
!Reflections.isParameterizedType(rawType) &&
!servletApiAbstraction.SERVLET_CLASS.isAssignableFrom(rawType) &&
!servletApiAbstraction.FILTER_CLASS.isAssignableFrom(rawType) &&
!servletApiAbstraction.SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(rawType) &&
!servletApiAbstraction.HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(rawType) &&
!servletApiAbstraction.SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(rawType) &&
!ejbApiAbstraction.ENTERPRISE_BEAN_CLASS.isAssignableFrom(rawType) &&
!jsfApiAbstraction.UICOMPONENT_CLASS.isAssignableFrom(rawType) &&
hasSimpleWebBeanConstructor(clazz);
}
-
-
private static boolean hasSimpleWebBeanConstructor(AnnotatedClass<?> type)
{
- return type.getNoArgsConstructor() != null ||
type.getAnnotatedConstructors(Initializer.class).size() > 0;
+ return type.getNoArgsConstructor() != null ||
type.getAnnotatedConstructors(Initializer.class).size() > 0;
}
private static <T> AnnotatedMethod<T> realizeProducerMethod(final
AnnotatedMethod<T> method, final AnnotatedClass<?> realizingClass)
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BootstrapOrderingBeanComparator.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BootstrapOrderingBeanComparator.java
(rev 0)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BootstrapOrderingBeanComparator.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,124 @@
+package org.jboss.webbeans.bootstrap;
+
+import java.util.Comparator;
+
+import org.jboss.webbeans.bean.AbstractClassBean;
+import org.jboss.webbeans.bean.AbstractProducerBean;
+import org.jboss.webbeans.bean.NewBean;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.standard.AbstractStandardBean;
+
+public class BootstrapOrderingBeanComparator implements
Comparator<RIBean<?>>
+{
+
+ public int compare(RIBean<?> o1, RIBean<?> o2)
+ {
+ if (o1 instanceof AbstractStandardBean && !(o2 instanceof
AbstractStandardBean))
+ {
+ return -1;
+ }
+ else if (!(o1 instanceof AbstractStandardBean) && o2 instanceof
AbstractStandardBean)
+ {
+ return 1;
+ }
+ else if (o1 instanceof AbstractStandardBean && o2 instanceof
AbstractStandardBean)
+ {
+ return o1.getId().compareTo(o2.getId());
+ }
+ else if (o1.getType().getName().startsWith("org.jboss.webbeans")
&& !o2.getType().getName().startsWith("org.jboss.webbeans"))
+ {
+ return -1;
+ }
+ else if (!o1.getType().getName().startsWith("org.jboss.webbeans")
&& o2.getType().getName().startsWith("org.jboss.webbeans"))
+ {
+ return 1;
+ }
+ else if (o1 instanceof AbstractClassBean)
+ {
+ AbstractClassBean<?> b1 = (AbstractClassBean<?>) o1;
+ if (o2 instanceof NewBean && !(o1 instanceof NewBean))
+ {
+ // Always initialize new beans after class beans
+ return -1;
+ }
+ else if (o1 instanceof NewBean && o2 instanceof AbstractClassBean
&& !(o2 instanceof NewBean))
+ {
+ // Always initialize new beans after class beans
+ return 1;
+ }
+ else if (o1 instanceof NewBean && !(o2 instanceof NewBean))
+ {
+ // Always initialize new class beans after class beans but before other
beans
+ return -1;
+ }
+ else if (o1 instanceof NewBean && o2 instanceof NewBean)
+ {
+ return o1.getId().compareTo(o2.getId());
+ }
+ else if (o2 instanceof AbstractClassBean)
+ {
+ AbstractClassBean<?> b2 = (AbstractClassBean<?>) o2;
+ if (o1.getTypes().contains(b2.getType()))
+ {
+ return 1;
+ }
+ else if (b2.getTypes().contains(b1.getType()))
+ {
+ return -1;
+ }
+ else
+ {
+ return o1.getId().compareTo(o2.getId());
+ }
+ }
+ else if (o2 instanceof AbstractProducerBean)
+ {
+ // Producer beans are always initialized after class beans
+ return -1;
+ }
+ else
+ {
+ // Ordering doesn't matter
+ return o1.getId().compareTo(o2.getId());
+ }
+ }
+ else if (o1 instanceof AbstractProducerBean)
+ {
+ AbstractProducerBean<?, ?> b1 = (AbstractProducerBean<?, ?>) o1;
+ if (o2 instanceof NewBean)
+ {
+ // Always initialize producers beans after new beans
+ return 1;
+ }
+ else if (o2 instanceof AbstractClassBean)
+ {
+ if (b1.getDeclaringBean().equals(o2))
+ {
+ return 1;
+ }
+ else
+ {
+ return o1.getId().compareTo(o2.getId());
+ }
+ }
+ else
+ {
+ // Ordering doesn't matter
+ return o1.getId().compareTo(o2.getId());
+ }
+ }
+ else
+ {
+ if (o2 instanceof AbstractClassBean || o2 instanceof AbstractProducerBean)
+ {
+ // Initialize undefined ordering after defined ordering
+ return 1;
+ }
+ else
+ {
+ return o1.getId().compareTo(o2.getId());
+ }
+ }
+ }
+
+}
Property changes on:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BootstrapOrderingBeanComparator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-22
13:27:30 UTC (rev 2131)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -134,7 +134,7 @@
beanDeployer.addClass(NumericConversationIdGenerator.class);
beanDeployer.addClass(HttpSessionManager.class);
}
- beanDeployer.deploy();
+ beanDeployer.createBeans().deploy();
}
public void boot()
Added: ri/trunk/tests/src/test/java/com/acme/RoadRunner.java
===================================================================
--- ri/trunk/tests/src/test/java/com/acme/RoadRunner.java (rev 0)
+++ ri/trunk/tests/src/test/java/com/acme/RoadRunner.java 2009-03-22 17:18:51 UTC (rev
2132)
@@ -0,0 +1,6 @@
+package com.acme;
+
+public class RoadRunner
+{
+
+}
Property changes on: ri/trunk/tests/src/test/java/com/acme/RoadRunner.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Animal.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Animal.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Animal.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.ordering;
+
+interface Animal
+{
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Cow.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Cow.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Cow.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.bootstrap.ordering;
+
+import javax.context.ApplicationScoped;
+
+@ApplicationScoped
+class Cow implements Animal
+{
+
+ public static boolean mooed = false;
+
+ public void moo()
+ {
+ mooed = true;
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Cow.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/DeployerOrderingTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/DeployerOrderingTest.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/DeployerOrderingTest.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,113 @@
+package org.jboss.webbeans.test.unit.bootstrap.ordering;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.bean.EnterpriseBean;
+import org.jboss.webbeans.bean.NewBean;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.bean.standard.AbstractStandardBean;
+import org.jboss.webbeans.bean.standard.EventBean;
+import org.jboss.webbeans.bean.standard.InjectionPointBean;
+import org.jboss.webbeans.bean.standard.InstanceBean;
+import org.jboss.webbeans.bean.standard.ManagerBean;
+import org.jboss.webbeans.bootstrap.BeanDeployer;
+import org.jboss.webbeans.mock.MockEjbDescriptor;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+import com.acme.RoadRunner;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+(a)Classes(packages="com.acme")
+public class DeployerOrderingTest extends AbstractWebBeansTest
+{
+
+ @Test(groups="bootstrap")
+ public void testNewSimpleBeansAfterNonNew()
+ {
+ BeanDeployer beanDeployer = new BeanDeployer(manager);
+ beanDeployer.addClasses(Arrays.asList(Cow.class, Tuna.class));
+ beanDeployer.createBeans();
+ assert beanDeployer.getBeans().size() == 4;
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(0, 2))
+ {
+ assert !(bean instanceof NewBean);
+ assert bean instanceof SimpleBean;
+ }
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(2, 4))
+ {
+ assert (bean instanceof NewBean);
+ assert bean instanceof SimpleBean;
+ }
+ }
+
+ @Test(groups="bootstrap")
+ public void testNewEnterpriseBeansAfterNonNew()
+ {
+ BeanDeployer beanDeployer = new BeanDeployer(manager);
+ beanDeployer.addClasses(Arrays.asList(Lion.class, Gazelle.class));
+ manager.getEjbDescriptorCache().add(MockEjbDescriptor.of(Lion.class));
+ manager.getEjbDescriptorCache().add(MockEjbDescriptor.of(Gazelle.class));
+ beanDeployer.createBeans();
+ assert beanDeployer.getBeans().size() == 4;
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(0, 2))
+ {
+ assert !(bean instanceof NewBean);
+ assert bean instanceof EnterpriseBean;
+ }
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(2, 4))
+ {
+ assert (bean instanceof NewBean);
+ assert bean instanceof EnterpriseBean;
+ }
+ }
+
+ @Test(groups="bootstrap")
+ public void testStandardBeansBeforeAll()
+ {
+ BeanDeployer beanDeployer = new BeanDeployer(manager);
+
beanDeployer.addBean(EventBean.of(manager)).addBean(InjectionPointBean.of(manager)).addBean(InstanceBean.of(manager)).addBean(ManagerBean.of(manager));
+ beanDeployer.addClasses(Arrays.asList(Cow.class, Tuna.class));
+ beanDeployer.createBeans();
+ assert beanDeployer.getBeans().size() == 8;
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(0, 4))
+ {
+ assert bean instanceof AbstractStandardBean;
+ }
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(4, 6))
+ {
+ assert !(bean instanceof NewBean);
+ assert bean instanceof SimpleBean;
+ }
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(6, 8))
+ {
+ assert (bean instanceof NewBean);
+ assert bean instanceof SimpleBean;
+ }
+ }
+
+ @Test(groups="bootstrap")
+ public void testOrgJbossWebbeansBeforeUsers()
+ {
+ BeanDeployer beanDeployer = new BeanDeployer(manager);
+ beanDeployer.addClasses(Arrays.asList(Cow.class, Tuna.class, RoadRunner.class));
+ beanDeployer.createBeans();
+ assert beanDeployer.getBeans().size() == 6;
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(0, 4))
+ {
+ assert bean.getType().getName().startsWith("org.jboss.webbeans");
+ }
+ for (RIBean<?> bean : new
ArrayList<RIBean<?>>(beanDeployer.getBeans()).subList(4, 6))
+ {
+ assert bean.getType().getName().startsWith("com.acme");
+ }
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/DeployerOrderingTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Gazelle.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Gazelle.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Gazelle.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.bootstrap.ordering;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Production;
+
+@Production
+@Stateful
+class Gazelle implements GazelleLocal
+{
+
+ @Remove
+ public void remove1()
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Gazelle.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/GazelleLocal.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/GazelleLocal.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/GazelleLocal.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.ordering;
+
+import javax.ejb.Local;
+
+@Local
+public interface GazelleLocal
+{
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/GazelleLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Lion.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Lion.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Lion.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.bootstrap.ordering;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Production;
+
+@Production
+@Stateful
+class Lion implements LionLocal
+{
+
+ @Remove
+ public void remove1()
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Lion.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/LionLocal.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/LionLocal.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/LionLocal.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.ordering;
+
+import javax.ejb.Local;
+
+@Local
+public interface LionLocal
+{
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/LionLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Tuna.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Tuna.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Tuna.java 2009-03-22
17:18:51 UTC (rev 2132)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.bootstrap.ordering;
+
+import javax.context.RequestScoped;
+
+@RequestScoped
+class Tuna
+{
+
+ public String getName()
+ {
+ return "Ophir";
+ }
+
+}
Property changes on:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ordering/Tuna.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/tests/unit-tests.xml
===================================================================
--- ri/trunk/tests/unit-tests.xml 2009-03-22 13:27:30 UTC (rev 2131)
+++ ri/trunk/tests/unit-tests.xml 2009-03-22 17:18:51 UTC (rev 2132)
@@ -43,6 +43,7 @@
<packages>
<package name="org.jboss.webbeans.test.examples" />
<package name="org.jboss.webbeans.test.unit.bootstrap" />
+ <package name="org.jboss.webbeans.test.unit.bootstrap.ordering"
/>
<package name="org.jboss.webbeans.test.unit.bootstrap.environments"
/>
<package
name="org.jboss.webbeans.test.unit.bootstrap.environments.multipleEnterprise"
/>
<package
name="org.jboss.webbeans.test.unit.bootstrap.environments.multipleEnterpriseAndSimple"
/>