Weld SVN: r4401 - examples/trunk.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-29 09:12:37 -0400 (Thu, 29 Oct 2009)
New Revision: 4401
Modified:
examples/trunk/pom.xml
Log:
update to new testng
Modified: examples/trunk/pom.xml
===================================================================
--- examples/trunk/pom.xml 2009-10-29 13:09:56 UTC (rev 4400)
+++ examples/trunk/pom.xml 2009-10-29 13:12:37 UTC (rev 4401)
@@ -94,7 +94,7 @@
<log4j.version>1.2.14</log4j.version>
<slf4j.version>1.4.2</slf4j.version>
<!-- Testing deps -->
- <testng.version>5.9</testng.version>
+ <testng.version>5.10</testng.version>
</properties>
<!-- Dependency management, including any extra repositories needed -->
15 years, 1 month
Weld SVN: r4400 - in core/trunk/tests/src/test/java/org/jboss/weld/test/unit: implementation/annotatedItem/anonymous and 3 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-29 09:09:56 -0400 (Thu, 29 Oct 2009)
New Revision: 4400
Added:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Choice.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java
Removed:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/BallImpl.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTest.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Defender.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTest.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Referee.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Defender.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Goalkeeper.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/PassivationActivationTest.java
Log:
fix tests so they run incontainer
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -1,14 +0,0 @@
-package org.jboss.weld.test.unit.implementation.annotatedItem;
-
-abstract class ChoiceParent<T>
-{
-}
-
-
-class Choice<T, E> extends ChoiceParent<T>
-{
- public Choice<T, E> aMethod()
- {
- return null;
- }
-}
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -5,11 +5,9 @@
import java.util.Set;
import javax.enterprise.inject.Stereotype;
-import javax.enterprise.inject.spi.AnnotatedType;
import javax.inject.Qualifier;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.introspector.jlr.WeldClassImpl;
import org.jboss.weld.metadata.TypeStore;
@@ -17,8 +15,7 @@
import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
-@Artifact(addCurrentPackage = false)
-(a)Classes({Animal.class, Antelope.class, Kangaroo.class, Order.class, Random.class})
+@Artifact
public class ClassAnnotatedItemTest extends AbstractWeldTest
{
@@ -53,12 +50,5 @@
WeldClass<Antelope> classWithNoAnnotations = WeldClassImpl.of(Antelope.class, transformer);
assert classWithNoAnnotations.getAnnotations().size() == 0;
}
-
- @Test(groups = "broken")
- public void testNonStaticInnerClassWithGenericTypes()
- {
- AnnotatedType at = WeldClassImpl.of(new Kangaroo().procreate().getClass(), transformer);
- WeldClassImpl.of(at, transformer);
- }
}
Deleted: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -1,17 +0,0 @@
-package org.jboss.weld.test.unit.implementation.annotatedItem;
-
-
-class Kangaroo
-{
- LittleKangarooInHerPouch<String> procreate()
- {
- return new LittleKangarooInHerPouch<String>("Joey");
- }
-
- class LittleKangarooInHerPouch<T>
- {
- LittleKangarooInHerPouch(T formalParam)
- {
- }
- }
-}
Copied: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Choice.java (from rev 4397, core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java)
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Choice.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Choice.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -0,0 +1,14 @@
+package org.jboss.weld.test.unit.implementation.annotatedItem.anonymous;
+
+abstract class ChoiceParent<T>
+{
+}
+
+
+class Choice<T, E> extends ChoiceParent<T>
+{
+ public Choice<T, E> aMethod()
+ {
+ return null;
+ }
+}
Added: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -0,0 +1,25 @@
+package org.jboss.weld.test.unit.implementation.annotatedItem.anonymous;
+
+import javax.enterprise.inject.spi.AnnotatedType;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.introspector.jlr.WeldClassImpl;
+import org.jboss.weld.metadata.TypeStore;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class ClassAnnotatedItemTest extends AbstractWeldTest
+{
+
+ private final ClassTransformer transformer = new ClassTransformer(new TypeStore());
+
+ @Test(groups = "broken")
+ public void testNonStaticInnerClassWithGenericTypes()
+ {
+ AnnotatedType at = WeldClassImpl.of(new Kangaroo().procreate().getClass(), transformer);
+ WeldClassImpl.of(at, transformer);
+ }
+
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -0,0 +1,17 @@
+package org.jboss.weld.test.unit.implementation.annotatedItem.anonymous;
+
+
+class Kangaroo
+{
+ LittleKangarooInHerPouch<String> procreate()
+ {
+ return new LittleKangarooInHerPouch<String>("Joey");
+ }
+
+ class LittleKangarooInHerPouch<T>
+ {
+ LittleKangarooInHerPouch(T formalParam)
+ {
+ }
+ }
+}
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/BallImpl.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/BallImpl.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/BallImpl.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -19,6 +19,7 @@
import javax.ejb.Stateless;
import javax.ejb.Timeout;
+import javax.ejb.Timer;
/**
* @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
@@ -37,7 +38,7 @@
}
@Timeout
- public void finishGame()
+ public void finishGame(Timer timer)
{
}
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTest.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTest.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -1,10 +1,11 @@
package org.jboss.weld.test.unit.interceptor.ejb;
+import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
-import java.util.Arrays;
-
+import javax.ejb.Timer;
import javax.enterprise.inject.spi.InterceptionType;
import org.jboss.testharness.impl.packaging.Artifact;
@@ -13,9 +14,8 @@
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.jboss.weld.bean.SessionBean;
import org.jboss.weld.bean.interceptor.InterceptorBindingsAdapter;
+import org.jboss.weld.ejb.spi.InterceptorBindings;
import org.jboss.weld.test.AbstractWeldTest;
-import org.jboss.weld.ejb.spi.InterceptorBindings;
-
import org.testng.annotations.Test;
@Artifact
@@ -47,9 +47,10 @@
assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE, ballSessionBean.getType().getMethod("pass")).size() == 1;
assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE, ballSessionBean.getType().getMethod("pass")).get(0).getBeanClass().equals(Defender.class);
- assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE, ballSessionBean.getType().getMethod("finishGame")).size() == 0;
- assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_TIMEOUT, ballSessionBean.getType().getMethod("finishGame")).size() == 1;
- assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_TIMEOUT, ballSessionBean.getType().getMethod("finishGame")).get(0).getBeanClass().equals(Referee.class);
+ Method finishGameMethod = ballSessionBean.getType().getMethod("finishGame", Timer.class);
+ assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE, finishGameMethod).size() == 0;
+ assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_TIMEOUT, finishGameMethod).size() == 1;
+ assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_TIMEOUT, finishGameMethod).get(0).getBeanClass().equals(Referee.class);
}
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Defender.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Defender.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Defender.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -17,12 +17,9 @@
package org.jboss.weld.test.unit.interceptor.ejb3model;
-import javax.interceptor.Interceptor;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
-import org.jboss.weld.test.unit.interceptor.ejb.Pass;
-
/**
* @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
*/
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTest.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTest.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -17,15 +17,13 @@
package org.jboss.weld.test.unit.interceptor.ejb3model;
-import javax.enterprise.inject.spi.Bean;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.test.AbstractWeldTest;
-
-import org.testng.annotations.Test;
-import org.testng.annotations.BeforeTest;
import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
/**
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Referee.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Referee.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Referee.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -16,10 +16,8 @@
*/
package org.jboss.weld.test.unit.interceptor.ejb3model;
-import org.jboss.weld.test.unit.interceptor.ejb.TimeBound;
-
-import javax.interceptor.Interceptor;
import javax.interceptor.AroundTimeout;
+import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
/**
Added: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -0,0 +1,37 @@
+/*
+ * 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.weld.test.unit.interceptor.ejb3model;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.interceptor.InterceptorBinding;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
+ */
+@InterceptorBinding
+@Retention(RUNTIME)
+(a)Target({ElementType.METHOD, ElementType.TYPE})
+@Documented
+public @interface TimeBound
+{
+}
\ No newline at end of file
Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Defender.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Defender.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Defender.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -19,13 +19,10 @@
import java.io.Serializable;
-import javax.interceptor.Interceptor;
import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
-import org.jboss.weld.test.unit.interceptor.ejb.*;
-import org.jboss.weld.test.unit.interceptor.ejb.Pass;
-
/**
* @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
*/
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Goalkeeper.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Goalkeeper.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Goalkeeper.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -19,13 +19,10 @@
import java.io.Serializable;
-import javax.interceptor.Interceptor;
import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
-import org.jboss.weld.test.unit.interceptor.ejb.*;
-import org.jboss.weld.test.unit.interceptor.ejb.Shot;
-
/**
* @author <a href="mailto:mariusb@redhat.com">Marius Bogoevici</a>
*/
Modified: core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/PassivationActivationTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/PassivationActivationTest.java 2009-10-29 13:08:26 UTC (rev 4399)
+++ core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/PassivationActivationTest.java 2009-10-29 13:09:56 UTC (rev 4400)
@@ -17,18 +17,17 @@
package org.jboss.weld.test.unit.interceptor.passivation;
+import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
-import java.io.ByteArrayInputStream;
+import java.io.ObjectOutputStream;
-import javax.enterprise.inject.spi.Bean;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.jboss.weld.test.AbstractWeldTest;
-
import org.testng.annotations.Test;
/**
@@ -39,7 +38,7 @@
public class PassivationActivationTest extends AbstractWeldTest
{
- @Test
+ @Test(groups = "incontainer-broken")
public void testPassivationAndActivation() throws Exception
{
Bean bean = getCurrentManager().getBeans(Ball.class).iterator().next();
15 years, 1 month
Weld SVN: r4399 - core/trunk/tests.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-29 09:08:26 -0400 (Thu, 29 Oct 2009)
New Revision: 4399
Modified:
core/trunk/tests/pom.xml
Log:
ws
Modified: core/trunk/tests/pom.xml
===================================================================
--- core/trunk/tests/pom.xml 2009-10-29 13:05:41 UTC (rev 4398)
+++ core/trunk/tests/pom.xml 2009-10-29 13:08:26 UTC (rev 4399)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>weld-core-parent</artifactId>
<groupId>org.jboss.weld</groupId>
@@ -17,29 +18,29 @@
<artifactId>testng</artifactId>
<classifier>jdk15</classifier>
<exclusions>
- <exclusion>
- <artifactId>junit</artifactId>
- <groupId>junit</groupId>
- </exclusion>
+ <exclusion>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ </exclusion>
</exclusions>
</dependency>
-
+
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness-jboss-as-52</artifactId>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
@@ -49,18 +50,18 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-spi</artifactId>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.jboss.interceptor</groupId>
<artifactId>jboss-interceptor-api</artifactId>
</dependency>
@@ -69,57 +70,57 @@
<groupId>org.jboss.interceptor</groupId>
<artifactId>jboss-interceptor</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-api</artifactId>
</dependency>
-
+
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>test</scope>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
</dependency>
-
+
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
-
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </dependency>
+
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
</dependency>
-
+
</dependencies>
<build>
- <defaultGoal>test</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <suiteXmlFiles>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <suiteXmlFiles>
<suiteXmlFile>unit-tests.xml</suiteXmlFile>
- </suiteXmlFiles>
- </configuration>
- </plugin>
+ </suiteXmlFiles>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
@@ -137,9 +138,9 @@
<outputName>test-report</outputName>
</configuration>
</plugin>
- </plugins>
+ </plugins>
</build>
-
+
<profiles>
<profile>
<id>incontainer</id>
@@ -233,9 +234,9 @@
<executions>
<execution>
<id>generate-test-artifacts</id>
- <phase>generate-test-sources</phase>
+ <phase>generate-test-sources</phase>
<goals>
- <goal>java</goal>
+ <goal>java</goal>
</goals>
</execution>
</executions>
15 years, 1 month
Weld SVN: r4398 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-29 09:05:41 -0400 (Thu, 29 Oct 2009)
New Revision: 4398
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
Log:
mark tests broken
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2009-10-29 08:03:13 UTC (rev 4397)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2009-10-29 13:05:41 UTC (rev 4398)
@@ -157,28 +157,28 @@
validateTagHandlerAnnotatedType(ProcessAnnotatedTypeObserver.getTagHandlerEvent().getAnnotatedType());
}
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "bg")
public void testProcessAnnotatedTypeEventFiredForTagLibraryListener() {
assert ProcessAnnotatedTypeObserver.getTagLibraryListenerEvent() != null;
validateTagLibraryListenerAnnotatedType(ProcessAnnotatedTypeObserver.getTagLibraryListenerEvent().getAnnotatedType());
}
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "bj")
public void testProcessAnnotatedTypeEventFiredForServlet() {
assert ProcessAnnotatedTypeObserver.getServletEvent() != null;
validateServletAnnotatedType(ProcessAnnotatedTypeObserver.getServletEvent().getAnnotatedType());
}
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "bk")
public void testProcessAnnotatedTypeEventFiredForFilter() {
assert ProcessAnnotatedTypeObserver.getFilterEvent() != null;
validateFilterAnnotatedType(ProcessAnnotatedTypeObserver.getFilterEvent().getAnnotatedType());
}
- @Test
+ @Test(groups = "ri-broken")
@SpecAssertion(section = "12.3", id = "bd")
public void testProcessAnnotatedTypeEventFiredForJsfManagedBean() {
assert ProcessAnnotatedTypeObserver.getJsfManagedBeanEvent() != null;
15 years, 1 month
Weld SVN: r4397 - cdi-tck/trunk/impl/src/main/resources.
by weld-commits@lists.jboss.org
Author: jharting
Date: 2009-10-29 04:03:13 -0400 (Thu, 29 Oct 2009)
New Revision: 4397
Modified:
cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
typo
Modified: cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-10-29 06:53:22 UTC (rev 4396)
+++ cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-10-29 08:03:13 UTC (rev 4397)
@@ -2559,7 +2559,7 @@
<text>Servlet Filter |init()| method called after injected fields</text>
</assertion>
<assertion id="br">
- <text>Servle Filtert |init()| method called after Java EE resource injection</text>
+ <text>Servlet Filter |init()| method called after Java EE resource injection</text>
</assertion>
</group>
</section>
15 years, 1 month
Weld SVN: r4396 - in api/trunk/cdi/src/main/java/javax/enterprise/context: spi and 1 other directory.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 02:53:22 -0400 (Thu, 29 Oct 2009)
New Revision: 4396
Added:
api/trunk/cdi/src/main/java/javax/enterprise/context/spi/package-info.java
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/package-info.java
Log:
package-level javadoc for context.spi
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/package-info.java 2009-10-29 06:42:07 UTC (rev 4395)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/package-info.java 2009-10-29 06:53:22 UTC (rev 4396)
@@ -3,27 +3,17 @@
*
* <p>A scope type is a Java annotation annotated
* {@link javax.inject.Scope @Scope} or
- * {@link javax.enterprise.context.NormalScope @NormalScope}.</p>
+ * {@link javax.enterprise.context.NormalScope @NormalScope}.
+ * The scope of a bean determines the lifecycle and visibility of
+ * its instances. In particular, the scope determines:</p>
*
- * <p>Associated with every scope type is a
- * {@linkplain javax.enterprise.context.spi.Context context object}.
- * The context object determines the lifecycle and visibility of
- * instances of all {@linkplain javax.enterprise.inject beans} with
- * that scope. In particular, the context object defines:</p>
- *
* <ul>
- * <li>When a new instance of any bean with that scope is created</li>
- * <li>When an existing instance of any bean with that scope is
- * destroyed</li>
- * <li>Which injected references refer to any instance of a bean
- * with that scope</li>
+ * <li>When a new instance of the bean is created</li>
+ * <li>When an existing instance of the bean is destroyed</li>
+ * <li>Which injected references refer to any instance of the
+ * bean</li>
* </ul>
*
- * <p>The context implementation collaborates with the container via
- * the {@link javax.enterprise.context.spi.Context Context} and
- * {@link javax.enterprise.context.spi.Contextual Contextual}
- * interfaces to create and destroy contextual instances.</p>
- *
* <h3>Built-in scopes</h3>
*
* <p>The following built-in scopes are provided:
@@ -40,10 +30,11 @@
* and EJB invocations. The built-in conversation context supports
* JSF requests.</p>
*
- * <p>For other kinds of invocations, a portable extension may define
- * a custom context object for any or all of the built-in scopes. For
- * example, a third-party web application framework might provide a
- * conversation context object for the built-in conversation scope.</p>
+ * <p>For other kinds of invocations, a portable extension may define a
+ * custom {@linkplain javax.enterprise.context.spi.Context context object}
+ * for any or all of the built-in scopes. For example, a third-party web
+ * application framework might provide a conversation context object for
+ * the built-in conversation scope.</p>
*
* <p>The context associated with a built-in scope propagates across
* local, synchronous Java method calls, including invocation of EJB
Added: api/trunk/cdi/src/main/java/javax/enterprise/context/spi/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/spi/package-info.java (rev 0)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/spi/package-info.java 2009-10-29 06:53:22 UTC (rev 4396)
@@ -0,0 +1,17 @@
+/**
+ * <p>The custom context SPI.</p>
+ *
+ * <p>Associated with every
+ * {@linkplain javax.enterprise.context scope type} is a
+ * {@linkplain javax.enterprise.context.spi.Context context object}.
+ * The context object implements the semantics of the scope type.</p>
+ *
+ * <p>The context implementation collaborates with the container via
+ * the {@link javax.enterprise.context.spi.Context Context} and
+ * {@link javax.enterprise.context.spi.Contextual Contextual}
+ * interfaces to create and destroy contextual instances.</p>
+ *
+ * @see javax.enterprise.context
+ * @see javax.enterprise.inject.spi
+ */
+package javax.enterprise.context.spi;
\ No newline at end of file
15 years, 1 month
Weld SVN: r4395 - api/trunk/cdi/src/main/java/javax/enterprise/context/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 02:42:07 -0400 (Thu, 29 Oct 2009)
New Revision: 4395
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Context.java
api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Contextual.java
api/trunk/cdi/src/main/java/javax/enterprise/context/spi/CreationalContext.java
Log:
javadoc for context.spi package
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Context.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Context.java 2009-10-29 06:08:14 UTC (rev 4394)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Context.java 2009-10-29 06:42:07 UTC (rev 4395)
@@ -22,9 +22,19 @@
import javax.enterprise.context.ContextNotActiveException;
/**
- * The contract between the manager and a contextual object.
- * This interface should not be called directly by the application.
+ * <p>Provides an operation for obtaining contextual instances with a particular scope
+ * of any contextual type. Any instance of {@code Context} is called a context object.</p>
*
+ * <p>The context object is responsible for creating and destroying contextual instances
+ * by calling operations of {@link javax.enterprise.context.spi.Contextual}. In particular,
+ * the context object is responsible for destroying any contextual instance it creates by
+ * passing the instance to
+ * {@link javax.enterprise.context.spi.Contextual#destroy(Object, CreationalContext)}. A
+ * destroyed instance must not subsequently be returned by {@code get()}.
+ * The context object must pass the same instance of
+ * {@link javax.enterprise.context.spi.CreationalContext} to {@code Contextual.destroy()}
+ * that it passed to {@code Contextual.create()} when it created the instance.</p>
+ *
* @author Gavin King
* @author Pete Muir
*/
@@ -33,42 +43,42 @@
{
/**
- * The scope which this context implements
+ * Get the scope type of the context object.
*
* @return the scope
*/
public Class<? extends Annotation> getScope();
/**
- * Return an existing instance of a contextual type or create a new instance
- * of a contextual type
+ * Return an existing instance of certain contextual type or create a new
+ * instance by calling
+ * {@link javax.enterprise.context.spi.Contextual#create(CreationalContext)}
+ * and return the new instance.
*
* @param <T> the type of contextual type
* @param contextual the contextual type
- * @param creationalContext the creational context in which incompletely
- * initialized instances may be placed
- * @return the contextual instance, or null if no creational context is given
- * and an instance does not exist in the context
+ * @param creationalContext the context in which the new instance will be created
+ * @return the contextual instance
+ *
* @throws ContextNotActiveException if the context is not active
*/
public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext);
/**
- * Return an existing instance of a contextual type or create a new instance
- * of a contextual type
+ * Return an existing instance of a certain contextual type or a null value.
*
* @param <T> the type of the contextual type
* @param contextual the contextual type
- * @return the contextual instance, or null if an instance does not exist in
- * the context
+ * @return the contextual instance, or a null value
+ *
* @throws ContextNotActiveException if the context is not active
*/
public <T> T get(Contextual<T> contextual);
/**
- * The context is only active at certain points in the application lifecycle
+ * Determines if the context object is active.
*
- * @return true if the context is active
+ * @return <tt>true</tt> if the context is active, or <tt>false</tt> otherwise.
*/
boolean isActive();
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Contextual.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Contextual.java 2009-10-29 06:08:14 UTC (rev 4394)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/spi/Contextual.java 2009-10-29 06:42:07 UTC (rev 4395)
@@ -20,33 +20,46 @@
import javax.enterprise.inject.CreationException;
/**
- * The contract between a context and a contextual type This interface should
- * not be implemented directly by the application.
+ * <p>Defines operations to create and destroy contextual instances of a
+ * certain type. Any implementation of {@code Contextual} is called a
+ * contextual type. In particular, all beans are contextual types.</p>
*
+ * @see javax.enterprise.inject.spi.Bean
+ *
+ * @author Gavin King
* @author Nicklas Karlsson
* @author Pete Muir
*/
public interface Contextual<T>
{
/**
- * Create a new instance of the contextual type
+ * Create a new instance of the contextual type. Instances should
+ * use the given {@link javax.enterprise.context.spi.CreationalContext}
+ * when obtaining contextual references to inject, in order to ensure
+ * that any dependent objects are associated with the contextual instance
+ * that is being created. An implementation may call
+ * {@link javax.enterprise.context.spi.CreationalContext#push(Object)}
+ * between instantiation and injection to help the container minimize the
+ * use of client proxy objects.
*
- * @param creationalContext
- * the creational context in which incompletely initialized
- * contexts may be placed
+ * @param creationalContext
+ * the context in which this instance is being created
* @return the contextual instance
* @throws CreationException
- * if a checked exception occurs whilst creating the instance
+ * if a checked exception occurs while creating the instance
*/
public T create(CreationalContext<T> creationalContext);
/**
- * Destroys an instance of the contexual type
+ * Destroy an instance of the contextual type. Implementations should
+ * call {@link javax.enterprise.context.spi.CreationalContext#release()}
+ * to allow the container to destroy dependent objects of the contextual
+ * instance.
*
* @param instance
- * the insance to destroy
+ * the contextual instance to destroy
* @param creationalContext
- * the creational context used to create the instance
+ * the context in which this instance was created
*/
public void destroy(T instance, CreationalContext<T> creationalContext);
}
Modified: api/trunk/cdi/src/main/java/javax/enterprise/context/spi/CreationalContext.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/context/spi/CreationalContext.java 2009-10-29 06:08:14 UTC (rev 4394)
+++ api/trunk/cdi/src/main/java/javax/enterprise/context/spi/CreationalContext.java 2009-10-29 06:42:07 UTC (rev 4395)
@@ -17,10 +17,11 @@
package javax.enterprise.context.spi;
/**
- * Allows registration of an incompletely initialized contextual instance with
- * the container. The contextual instance is considered incompletely initialized
- * until the create() method returns the instance.
+ * <p>Provides operations that are used by the
+ * {@link javax.enterprise.context.spi.Contextual} implementation during
+ * instance creation and destruction.</p>
*
+ * @author Gavin King
* @author Pete Muir
*
*/
@@ -28,12 +29,20 @@
{
/**
- * Push an incomplete instance to the container
+ * Registers an incompletely initialized contextual instance the with the
+ * container. A contextual instance is considered incompletely initialized
+ * until it is returned by
+ * {@link javax.enterprise.context.spi.Contextual#create(CreationalContext)}.
*
- * @param incompleteInstance
+ * @param incompleteInstance the incompletely initialized instance
*/
public void push(T incompleteInstance);
+ /**
+ * Destroys all dependent objects of the instance which is being destroyed,
+ * by passing each dependent object to
+ * {@link javax.enterprise.context.spi.Contextual#destroy(Object, CreationalContext)}.
+ */
public void release();
}
15 years, 1 month
Weld SVN: r4394 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 02:08:14 -0400 (Thu, 29 Oct 2009)
New Revision: 4394
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java
Log:
links
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java 2009-10-29 06:02:15 UTC (rev 4393)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/package-info.java 2009-10-29 06:08:14 UTC (rev 4394)
@@ -61,5 +61,7 @@
* {@link javax.enterprise.inject.spi.Extension} declared in
* <tt>META-INF/services</tt>.</p>
*
+ * @see javax.enterprise.inject
+ * @see javax.enterprise.context.spi
*/
package javax.enterprise.inject.spi;
\ No newline at end of file
15 years, 1 month
Weld SVN: r4393 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 02:02:15 -0400 (Thu, 29 Oct 2009)
New Revision: 4393
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
Log:
minor
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java 2009-10-29 06:01:31 UTC (rev 4392)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java 2009-10-29 06:02:15 UTC (rev 4393)
@@ -25,15 +25,15 @@
public enum SessionBeanType
{
/**
- * A {@link javax.ejb.Stateless stateless} session bean
+ * A {@linkplain javax.ejb.Stateless stateless} session bean
*/
STATELESS,
/**
- * A {@link javax.ejb.Stateful stateful} session bean
+ * A {@linkplain javax.ejb.Stateful stateful} session bean
*/
STATEFUL,
/**
- * A {@link javax.ejb.Singleton singleton} session bean
+ * A {@linkplain javax.ejb.Singleton singleton} session bean
*/
SINGLETON
}
\ No newline at end of file
15 years, 1 month
Weld SVN: r4392 - api/trunk/cdi/src/main/java/javax/enterprise/inject/spi.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-10-29 02:01:31 -0400 (Thu, 29 Oct 2009)
New Revision: 4392
Modified:
api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
Log:
sessionbeantype
Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java 2009-10-29 05:57:43 UTC (rev 4391)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java 2009-10-29 06:01:31 UTC (rev 4392)
@@ -16,7 +16,24 @@
*/
package javax.enterprise.inject.spi;
+/**
+ * Identifies the kind of EJB session bean.
+ *
+ * @author Gavin King
+ *
+ */
public enum SessionBeanType
{
- STATELESS, STATEFUL, SINGLETON
+ /**
+ * A {@link javax.ejb.Stateless stateless} session bean
+ */
+ STATELESS,
+ /**
+ * A {@link javax.ejb.Stateful stateful} session bean
+ */
+ STATEFUL,
+ /**
+ * A {@link javax.ejb.Singleton singleton} session bean
+ */
+ SINGLETON
}
\ No newline at end of file
15 years, 1 month