[webbeans-commits] Webbeans SVN: r3158 - in ri/branches/1.0.0.PREVIEW2: api and 13 other directories.
by webbeans-commits@lists.jboss.org
Author: rogerk
Date: 2009-07-23 12:59:45 -0400 (Thu, 23 Jul 2009)
New Revision: 3158
Modified:
ri/branches/1.0.0.PREVIEW2/api/pom.xml
ri/branches/1.0.0.PREVIEW2/core-api/pom.xml
ri/branches/1.0.0.PREVIEW2/impl/pom.xml
ri/branches/1.0.0.PREVIEW2/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/branches/1.0.0.PREVIEW2/impl/src/main/java/org/jboss/webbeans/CurrentManager.java
ri/branches/1.0.0.PREVIEW2/jboss-tck-runner/pom.xml
ri/branches/1.0.0.PREVIEW2/logging/pom.xml
ri/branches/1.0.0.PREVIEW2/osgi-bundle/pom.xml
ri/branches/1.0.0.PREVIEW2/parent/pom.xml
ri/branches/1.0.0.PREVIEW2/pom.xml
ri/branches/1.0.0.PREVIEW2/porting-package/pom.xml
ri/branches/1.0.0.PREVIEW2/spi/pom.xml
ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java
ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java
ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/TCCLSingletonProvider.java
ri/branches/1.0.0.PREVIEW2/tests/pom.xml
ri/branches/1.0.0.PREVIEW2/version-matrix/pom.xml
Log:
recent changes to accomodate TCCL singleton; pom.xml versions
Modified: ri/branches/1.0.0.PREVIEW2/api/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/api/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/api/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -4,12 +4,12 @@
<parent>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-parent</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<groupId>org.jboss.webbeans</groupId>
<artifactId>jsr299-api</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<packaging>jar</packaging>
<name>JSR-299 API</name>
<url>http://www.seamframework.org/WebBeans</url>
Modified: ri/branches/1.0.0.PREVIEW2/core-api/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/core-api/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/core-api/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -2,12 +2,12 @@
<parent>
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-api</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<name>Web Beans Core API</name>
<dependencies>
Modified: ri/branches/1.0.0.PREVIEW2/impl/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/impl/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/impl/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -2,12 +2,12 @@
<parent>
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-core</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<name>Web Beans Core</name>
<dependencies>
Modified: ri/branches/1.0.0.PREVIEW2/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/branches/1.0.0.PREVIEW2/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-07-23 16:59:45 UTC (rev 3158)
@@ -1171,7 +1171,7 @@
ApplicationContext.instance().destroy();
ApplicationContext.instance().setActive(false);
ApplicationContext.instance().setBeanStore(null);
- CurrentManager.cleanup();
+ CurrentManager.clear();
}
/**
Modified: ri/branches/1.0.0.PREVIEW2/impl/src/main/java/org/jboss/webbeans/CurrentManager.java
===================================================================
--- ri/branches/1.0.0.PREVIEW2/impl/src/main/java/org/jboss/webbeans/CurrentManager.java 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/impl/src/main/java/org/jboss/webbeans/CurrentManager.java 2009-07-23 16:59:45 UTC (rev 3158)
@@ -48,10 +48,11 @@
private final static Singleton<Map<Integer, BeanManagerImpl>> managers = SingletonProvider.instance().create(new IntegerMangerImplMap().getRawType());
- public static void cleanup()
+ public static void clear()
{
- rootManager.set(null);
managers.get().clear();
+ rootManager.clear();
+ managers.clear();
}
/**
@@ -72,7 +73,7 @@
public static void setRootManager(BeanManagerImpl managerImpl)
{
rootManager.set(managerImpl);
- if (managers.get() == null)
+ if (!managers.isSet())
{
managers.set(new ConcurrentHashMap<Integer, BeanManagerImpl>());
}
Modified: ri/branches/1.0.0.PREVIEW2/jboss-tck-runner/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/jboss-tck-runner/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/jboss-tck-runner/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -2,7 +2,7 @@
<parent>
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
Modified: ri/branches/1.0.0.PREVIEW2/logging/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/logging/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/logging/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -2,12 +2,12 @@
<parent>
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-logging</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<name>Web Beans Logging</name>
<dependencies>
Modified: ri/branches/1.0.0.PREVIEW2/osgi-bundle/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/osgi-bundle/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/osgi-bundle/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -21,7 +21,7 @@
<parent>
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -60,7 +60,7 @@
<Embed-Dependency>*; scope=compile; inline=true</Embed-Dependency>
<_exportcontents>javax.event; javax.context; javax.webbeans; javax.decorator; javax.inject; javax.enterprise.*; version=${osgi.version},
- org.jboss.webbeans.*.api.*; org.jboss.webbeans.*.spi.*; org.jboss.webbeans.conversation; org.jboss.webbeans.bootstrap; org.jboss.webbeans.introspector; org.jboss.webbeans.servlet; version=${osgi.version},
+ org.jboss.webbeans.*.api.*; org.jboss.webbeans.*.spi.*; org.jboss.webbeans.conversation; org.jboss.webbeans; org.jboss.webbeans.bootstrap; org.jboss.webbeans.introspector; org.jboss.webbeans.servlet; version=${osgi.version},
org.jboss.webbeans.bean.proxy; org.jboss.webbeans.ejb; org.jboss.webbeans.el; include:="WebBeansELResolver"; version=${osgi.version},
org.jboss.webbeans.jsf; include:="WebBeansPhaseListener"; version=${osgi.version},
javassist.util.proxy;version="3.8.1.GA"
Modified: ri/branches/1.0.0.PREVIEW2/parent/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/parent/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/parent/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -3,12 +3,12 @@
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-parent</artifactId>
<packaging>pom</packaging>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<parent>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-version-matrix</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<name>Web Beans, the reference implementation of JSR-299</name>
@@ -218,9 +218,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW2-P...</developerConnection>
- <url>http://fisheye.jboss.org/browse/WebBeans/ri/tags/1.0.0.PREVIEW2-PATCH2/ri</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW2/p...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/ri/tags/1.0.0.PREVIEW2/ri</url>
</scm>
<distributionManagement>
Modified: ri/branches/1.0.0.PREVIEW2/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -3,15 +3,15 @@
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-build-aggregator</artifactId>
<packaging>pom</packaging>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<name>Web Beans Build Aggregator</name>
<url>http://www.seamframework.org/WebBeans</url>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW2-P...</developerConnection>
- <url>http://fisheye.jboss.org/browse/WebBeans/branches/1.0.0.PREVIEW2-PATCH2</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW2</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW2</developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/branches/1.0.0.PREVIEW2</url>
</scm>
<distributionManagement>
Modified: ri/branches/1.0.0.PREVIEW2/porting-package/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/porting-package/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/porting-package/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -2,12 +2,12 @@
<parent>
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-porting-package</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<name>Web Beans Porting Package for JSR-299 TCK</name>
<dependencies>
Modified: ri/branches/1.0.0.PREVIEW2/spi/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/spi/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/spi/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -2,12 +2,12 @@
<parent>
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-spi</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<name>Web Beans Service Provider Interfaces</name>
<dependencies>
Modified: ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java
===================================================================
--- ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/Singleton.java 2009-07-23 16:59:45 UTC (rev 3158)
@@ -45,13 +45,26 @@
* Access the singleton
*
* @return a singleton object
+ * @throws IllegalStateException if the singleton is not set
*/
public T get();
/**
+ * Check if the singleton is set
+ *
+ * @return true if the singleton is set
+ */
+ public boolean isSet();
+
+ /**
* Store a singleton
*
* @param object the object to store
*/
public void set(T object);
+
+ /**
+ * Clear the singleton
+ */
+ public void clear();
}
Modified: ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java
===================================================================
--- ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/IsolatedStaticSingletonProvider.java 2009-07-23 16:59:45 UTC (rev 3158)
@@ -48,6 +48,10 @@
public T get()
{
+ if (object == null)
+ {
+ throw new IllegalStateException("Singleton is not set");
+ }
return object;
}
@@ -55,5 +59,15 @@
{
this.object = object;
}
+
+ public void clear()
+ {
+ this.object = null;
+ }
+
+ public boolean isSet()
+ {
+ return object != null;
+ }
}
}
Modified: ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/TCCLSingletonProvider.java
===================================================================
--- ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/TCCLSingletonProvider.java 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/TCCLSingletonProvider.java 2009-07-23 16:59:45 UTC (rev 3158)
@@ -54,7 +54,12 @@
public T get()
{
- return store.get(getClassLoader());
+ T instance = store.get(getClassLoader());
+ if (instance == null)
+ {
+ throw new IllegalStateException("Singleton not set for " + getClassLoader());
+ }
+ return instance;
}
public void set(T object)
@@ -62,6 +67,16 @@
store.put(getClassLoader(), object);
}
+ public void clear()
+ {
+ store.remove(getClassLoader());
+ }
+
+ public boolean isSet()
+ {
+ return store.containsKey(getClassLoader());
+ }
+
private ClassLoader getClassLoader()
{
SecurityManager sm = System.getSecurityManager();
Modified: ri/branches/1.0.0.PREVIEW2/tests/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/tests/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/tests/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -2,12 +2,12 @@
<parent>
<artifactId>webbeans-parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-core-test</artifactId>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<name>Web Beans Core Tests</name>
<dependencies>
Modified: ri/branches/1.0.0.PREVIEW2/version-matrix/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2/version-matrix/pom.xml 2009-07-23 16:45:38 UTC (rev 3157)
+++ ri/branches/1.0.0.PREVIEW2/version-matrix/pom.xml 2009-07-23 16:59:45 UTC (rev 3158)
@@ -3,7 +3,7 @@
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-version-matrix</artifactId>
<packaging>pom</packaging>
- <version>1.0.0.PREVIEW2-PATCH2</version>
+ <version>1.0.0.PREVIEW2</version>
<name>Web Beans Version Matrix</name>
<url>http://www.seamframework.org/WebBeans</url>
@@ -48,7 +48,7 @@
<properties>
<jsr299.tck.version>1.0.0.BETA3</jsr299.tck.version>
- <webbeans.version>1.0.0.PREVIEW2-PATCH2</webbeans.version>
+ <webbeans.version>1.0.0.PREVIEW2</webbeans.version>
<webbeans.servlet.version>1.0.0.CR1</webbeans.servlet.version>
<webbeans.se.version>1.0.0.BETA1</webbeans.se.version>
<jboss.test.harness.version>1.0.0.BETA3</jboss.test.harness.version>
@@ -531,9 +531,9 @@
</distributionManagement>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW2-P...</developerConnection>
- <url>http://fisheye.jboss.org/browse/WebBeans/ri/branches/1.0.0.PREVIEW2-PATCH...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/branches/1.0.0.PREVIEW2/v...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/ri/branches/1.0.0.PREVIEW2/ri</url>
</scm>
</project>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3157 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests: deployment/lifecycle/broken/addDefinitionError and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-23 12:45:38 -0400 (Thu, 23 Jul 2009)
New Revision: 3157
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/StateKeeper.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/InitializerMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbBean.java
Log:
Fixes to i/c tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java 2009-07-23 14:08:44 UTC (rev 3156)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java 2009-07-23 16:45:38 UTC (rev 3157)
@@ -76,7 +76,7 @@
{
HttpClient client = new HttpClient();
ConversationState c1 = request(client, "/clouds.jsf");
- ConversationState c2 = request(client, "/clouds.jsf", c1);
+ ConversationState c2 = request(client, "/cloud.jsf", c1);
assert c2.isLongRunning();
assert c1.getId().equals(c2.getId());
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java 2009-07-23 14:08:44 UTC (rev 3156)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/addDefinitionError/AddDefinitionErrorTest.java 2009-07-23 16:45:38 UTC (rev 3157)
@@ -5,6 +5,7 @@
import org.jboss.jsr299.tck.DefinitionError;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
import org.testng.annotations.Test;
@@ -22,12 +23,12 @@
@Resources({
@Resource(source="javax.enterprise.inject.spi.Extension", destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
})
-//TODO I don't see why a test that uses the SPI extension mechanism must be an integration test (DRA)
-//@IntegrationTest
+// Must be an integration test as it needs a resource copied to a folder
+@IntegrationTest
@ExpectedDeploymentException(DefinitionError.class)
public class AddDefinitionErrorTest extends AbstractJSR299Test
{
- @Test
+ @Test(groups="incontainer-ri-broken")
//TODO This test is not working in container due to exceptions being unwound on the server
@SpecAssertion(section = "11.5.2", id = "ca")
public void testObserverDefinitionErrorTreatedAsDefinitionError()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java 2009-07-23 14:08:44 UTC (rev 3156)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java 2009-07-23 16:45:38 UTC (rev 3157)
@@ -25,7 +25,7 @@
@Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle" })
@SpecAssertion(section = "3.2.1", id = "a")
- public void applicationMayCallAnyRemoveMethodOnDependentScopedSessionEnterpriseBeans() throws Exception
+ public void testApplicationMayCallAnyRemoveMethodOnDependentScopedSessionEnterpriseBeans() throws Exception
{
new RunInDependentContext()
{
@@ -45,7 +45,7 @@
@Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle" })
@SpecAssertion(section = "3.2.1", id = "da")
- public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed() throws Exception
+ public void testApplicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed() throws Exception
{
new RunInDependentContext()
{
@@ -66,7 +66,7 @@
@SpecAssertion(section = "3.2.1", id = "b"),
@SpecAssertion(section = "3.2.1", id = "c")
})
- public void applicationCannotCallRemoveMethodOnNonDependentScopedSessionEnterpriseBean()
+ public void testApplicationCannotCallRemoveMethodOnNonDependentScopedSessionEnterpriseBean()
{
SessionScopedSessionInterface sessionBean = getInstanceByType(SessionScopedSessionInterface.class);
sessionBean.remove();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/StateKeeper.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/StateKeeper.java 2009-07-23 14:08:44 UTC (rev 3156)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/StateKeeper.java 2009-07-23 16:45:38 UTC (rev 3157)
@@ -1,9 +1,11 @@
package org.jboss.jsr299.tck.tests.implementation.enterprise.remove;
+import java.io.Serializable;
+
import javax.enterprise.context.ApplicationScoped;
@ApplicationScoped
-class StateKeeper
+class StateKeeper implements Serializable
{
private boolean removeCalled = false;
private boolean beanDestroyed = false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/InitializerMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/InitializerMethodTest.java 2009-07-23 14:08:44 UTC (rev 3156)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/InitializerMethodTest.java 2009-07-23 16:45:38 UTC (rev 3157)
@@ -29,13 +29,6 @@
assert anotherHutch.getChicken().getName().equals("Standard");
}
- @Test(groups = { "stub", "initializerMethod", "interceptors" })
- @SpecAssertion(section = "3.8", id = "f")
- public void testMethodInterceptorNotCalledOnInitializerMethod()
- {
- assert false;
- }
-
@Test(groups = { "initializerMethod" })
@SpecAssertions({
@SpecAssertion(section = "3.8", id = "g"),
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-07-23 14:08:44 UTC (rev 3156)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-07-23 16:45:38 UTC (rev 3157)
@@ -31,8 +31,6 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@@ -46,9 +44,6 @@
@Artifact
@Packaging(PackagingType.EAR)
@IntegrationTest
-@Resources({
- @Resource(source="web.xml", destination="WEB-INF/web.xml")
-})
@BeansXml("beans.xml")
public class EjbInjectionTest extends AbstractJSR299Test
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbBean.java 2009-07-23 14:08:44 UTC (rev 3156)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/RemoteEjbBean.java 2009-07-23 16:45:38 UTC (rev 3157)
@@ -11,7 +11,7 @@
import javax.transaction.UserTransaction;
public
-@Stateful(name="SampleRemoteEjb", mappedName="ejb/SampleRemoteEjb")
+@Stateful
@TransactionManagement(TransactionManagementType.BEAN)
class RemoteEjbBean implements RemoteEjb
{
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3156 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-23 10:08:44 -0400 (Thu, 23 Jul 2009)
New Revision: 3156
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/Farm.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/Sheep.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
Log:
Added test for programmatic lookup + cleanup
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java 2009-07-23 14:01:22 UTC (rev 3155)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java 2009-07-23 14:08:44 UTC (rev 3156)
@@ -20,7 +20,6 @@
import javax.enterprise.inject.AmbiguousResolutionException;
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.UnsatisfiedResolutionException;
-import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
@@ -39,17 +38,13 @@
@Artifact
public class DynamicLookupTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertions({
@SpecAssertion(section = "5.7", id ="aa")
})
public void testObtainsInjectsInstanceOfInstance()
{
- Bean<ObtainsInjectionPointBean> injectionPointBean =
- getBeans(ObtainsInjectionPointBean.class).iterator().next();
-
- ObtainsInjectionPointBean injectionPoint = (ObtainsInjectionPointBean)
- getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class, getCurrentManager().createCreationalContext(injectionPointBean));
+ ObtainsInjectionPointBean injectionPoint = getInstanceByType(ObtainsInjectionPointBean.class);
assert injectionPoint.getPaymentProcessor() instanceof Instance;
}
@@ -57,16 +52,11 @@
@SpecAssertions({
@SpecAssertion(section = "5.7", id ="ba"),
@SpecAssertion(section = "5.7", id ="ca"),
- @SpecAssertion(section = "5.7.1", id ="ab"),
- @SpecAssertion(section = "5.7.1", id ="ba")
+ @SpecAssertion(section = "5.7.1", id ="ab")
})
public void testDynamicLookup()
{
- Bean<ObtainsInjectionPointBean> injectionPointBean =
- getBeans(ObtainsInjectionPointBean.class).iterator().next();
-
- ObtainsInjectionPointBean injectionPoint = (ObtainsInjectionPointBean)
- getCurrentManager().getReference( injectionPointBean, ObtainsInjectionPointBean.class, getCurrentManager().createCreationalContext(injectionPointBean));
+ ObtainsInjectionPointBean injectionPoint = getInstanceByType(ObtainsInjectionPointBean.class);
assert injectionPoint.getPaymentProcessor().select(new SynchronousBinding()).get() instanceof SynchronousChequePaymentProcessor;
}
@@ -74,11 +64,7 @@
@SpecAssertion(section = "5.7.1", id ="da")
public void testDuplicateBindingsThrowsException()
{
- Bean<ObtainsInjectionPointBean> injectionPointBean =
- getBeans(ObtainsInjectionPointBean.class).iterator().next();
-
- ObtainsInjectionPointBean injectionPoint = (ObtainsInjectionPointBean)
- getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class, getCurrentManager().createCreationalContext(injectionPointBean));
+ ObtainsInjectionPointBean injectionPoint = getInstanceByType(ObtainsInjectionPointBean.class);
injectionPoint.getPaymentProcessor().select(new SynchronousBinding(), new SynchronousBinding());
}
@@ -86,11 +72,7 @@
@SpecAssertion(section = "5.7.1", id = "e")
public void testNonBindingThrowsException()
{
- Bean<ObtainsInjectionPointBean> injectionPointBean =
- getBeans(ObtainsInjectionPointBean.class).iterator().next();
-
- ObtainsInjectionPointBean injectionPoint = (ObtainsInjectionPointBean)
- getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class, getCurrentManager().createCreationalContext(injectionPointBean));
+ ObtainsInjectionPointBean injectionPoint = getInstanceByType(ObtainsInjectionPointBean.class);
injectionPoint.getPaymentProcessor().select(new NonBinding());
}
@@ -126,4 +108,16 @@
Instance<PaymentProcessor> instance = injectionPoint.getPaymentProcessor().select(new SynchronousBinding());
assert !instance.isAmbiguous();
}
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section="5.7", id="ba"),
+ @SpecAssertion(section="5.7", id="da"),
+ @SpecAssertion(section="5.7.1", id="fc")})
+ public void testGetMethodReturnsContextualReference() {
+ Sheep sheep = getInstanceByType(Sheep.class);
+ sheep.setAge(10);
+ Farm farm = getInstanceByType(Farm.class);
+ assert farm.getSheep().get().getAge() == sheep.getAge();
+ }
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/Farm.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/Farm.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/Farm.java 2009-07-23 14:08:44 UTC (rev 3156)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.lookup.dynamic;
+
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Instance;
+
+class Farm
+{
+ @Any private Instance<Sheep> sheep;
+
+ public Instance<Sheep> getSheep()
+ {
+ return sheep;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/Sheep.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/Sheep.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/Sheep.java 2009-07-23 14:08:44 UTC (rev 3156)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.lookup.dynamic;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+class Sheep
+{
+ private int age = 0;
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+}
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3155 - ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-23 10:01:22 -0400 (Thu, 23 Jul 2009)
New Revision: 3155
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java
Log:
Test for WBRI-293
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java 2009-07-23 13:59:29 UTC (rev 3154)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java 2009-07-23 14:01:22 UTC (rev 3155)
@@ -28,7 +28,7 @@
@Artifact
public class ContextualReferenceTest extends AbstractWebBeansTest
{
- @Test
+ @Test(groups = "broken")
public void testReferencesEqual() {
Sheep sheep = getCurrentManager().getInstanceByType(Sheep.class);
sheep.setAge(10);
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3154 - in ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup: wbri293 and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-23 09:59:29 -0400 (Thu, 23 Jul 2009)
New Revision: 3154
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/Sheep.java
Log:
Test for WBRI-293
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/ContextualReferenceTest.java 2009-07-23 13:59:29 UTC (rev 3154)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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.webbeans.test.unit.lookup.wbri293;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Jozef Hartinger
+ *
+ */
+@Artifact
+public class ContextualReferenceTest extends AbstractWebBeansTest
+{
+ @Test
+ public void testReferencesEqual() {
+ Sheep sheep = getCurrentManager().getInstanceByType(Sheep.class);
+ sheep.setAge(10);
+ Sheep sheep2 = getCurrentManager().getInstanceByType(Sheep.class);
+ assert sheep.getAge() == sheep2.getAge();
+ assert sheep.equals(sheep2);
+ }
+
+}
Added: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/Sheep.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/Sheep.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/wbri293/Sheep.java 2009-07-23 13:59:29 UTC (rev 3154)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.unit.lookup.wbri293;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+class Sheep
+{
+ private int age = 0;
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+}
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3153 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests: event and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-23 09:28:41 -0400 (Thu, 23 Jul 2009)
New Revision: 3153
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
Log:
Remove a few stubs
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-07-23 13:14:00 UTC (rev 3152)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-07-23 13:28:41 UTC (rev 3153)
@@ -7,7 +7,6 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.AnnotationLiteral;
-import javax.enterprise.inject.deployment.Production;
import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -26,15 +25,6 @@
{
private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>() {};
- @Test(groups = { "annotationDefinition", "stub" })
- @SpecAssertion(section = "2.7.1", id = "b")
- public void testHasStereotypeAnnotation()
- {
- assert false;
- //Bean<Goat> bean = getBeans(Goat.class).iterator().next();
- //assert !bean.getDeploymentType().equals(HornedAnimalDeploymentType.class);
- }
-
@Test
@SpecAssertions( { @SpecAssertion(section = "2.7.1.1", id = "aa"),
@SpecAssertion(section = "2.4.3", id = "c") })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-07-23 13:14:00 UTC (rev 3152)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-07-23 13:28:41 UTC (rev 3153)
@@ -325,7 +325,7 @@
assert spider.getWeb().getRings() == 1;
}
- @Test(groups = { "events", "stub" })
+ @Test(groups = { "events", "broken" })
@SpecAssertion(section = "10.5", id = "ca")
public void testAsynchronousObserverThrowsExceptionIsLogged() throws InterruptedException
{
@@ -334,13 +334,6 @@
//TODO How can we assert that the exception was logged?
}
- @Test(groups = { "events", "stub" })
- @SpecAssertion(section = "10.5.1", id = "review") // I think this has been removed from the spec
- public void testAsynchronousObserverMethodContexts()
- {
- assert false;
- }
-
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
@SpecAssertion(section = "11.3.10", id = "d")
public void testDuplicateBindingsToFireFails()
@@ -412,62 +405,6 @@
assert BullTerrier.isSingleBindingEventObserved();
}
- @Test(groups = { "events", "stub" })
- @SpecAssertions( { @SpecAssertion(section = "10.7", id = "review") }) // removed from spec?
- public void testEventTypeMappedToJmsTopic()
- {
- assert false;
- }
-
- @Test(groups = { "events", "stub" })
- @SpecAssertions( { @SpecAssertion(section = "10.7", id = "review") }) // removed from spec?
- public void testEventMappingIsObserverMethodDeclaredByInterface()
- {
- assert false;
- }
-
- @Test(groups = { "events", "stub" })
- @SpecAssertions( { @SpecAssertion(section = "10.7", id = "review") }) // removed from spec?
- public void testEventParameterSpecifiesMappedEventTypeAndBindings()
- {
- assert false;
- }
-
- @Test(groups = { "events", "stub" })
- @SpecAssertions( { @SpecAssertion(section = "10.7", id = "review") }) // removed from spec?
- public void testMessageDestinationInjectedIsMappedTopic()
- {
- assert false;
- }
-
- @Test(groups = { "events", "stub" })
- @SpecAssertions( { @SpecAssertion(section = "10.7", id = "review") }) // removed from spec?
- public void testEventMappingMemberOfAnyInterface()
- {
- assert false;
- }
-
- @Test(groups = { "events", "stub" })
- @SpecAssertions( { @SpecAssertion(section = "10.7", id = "review") }) // removed from spec?
- public void testObserversOfJmsTopicMustBeAsynchronous()
- {
- assert false;
- }
-
- @Test(groups = { "events", "stub" })
- @SpecAssertions( { @SpecAssertion(section = "10.7", id = "review") }) // removed from spec?
- public void testObserversNotifiedOfEventFromJmsTopic()
- {
- assert false;
- }
-
- @Test(groups = { "events", "stub" })
- @SpecAssertions( { @SpecAssertion(section = "10.7", id = "review") }) // removed from spec?
- public void testEventsDistributedToProcessesWithSameTypeAndJmsTopic()
- {
- assert false;
- }
-
/**
* By default, Java implementation reuse is assumed. In this case, the
* producer, disposal and observer methods of the first bean are not
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java 2009-07-23 13:14:00 UTC (rev 3152)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/EventTest.java 2009-07-23 13:28:41 UTC (rev 3153)
@@ -149,57 +149,6 @@
assert dog.isCorrectTransactionState();
}
- /**
- * If the observer method is an asynchronous transactional observer method
- * and there is currently a JTA transaction in progress, the observer object
- * calls the observer method asynchronously during the after transaction
- * completion phase.
- */
- @Test(groups = { "stub", "events" })
- @SpecAssertion(section = "review", id = "review")
- public void testAsynchronousTransactionalObserverCalledAfterCompletion()
- {
- assert false;
- }
-
- /**
- * Otherwise, the observer method is called in the same transaction context,
- * client security context and lifecycle contexts as the invocation of
- * Event.fire().
- */
- @Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "10.5.1", id = "da")
- public void testObserverMethodCalledInSameContexts()
- {
- assert false;
- }
-
- /**
- * Otherwise, if the observer method is a @BeforeTransactionCompletion
- * transactional observer method, it is called within the context of the
- * transaction that is about to complete and with the same client security
- * context and lifecycle contexts.
- */
- @Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "10.5.1", id = "ba")
- public void testBeforeTransactionCompletionObserverMethodContexts()
- {
- assert false;
- }
-
- /**
- * Otherwise, if the observer method is any other kind of transactional
- * observer method, it is called in an unspecified transaction context, but
- * with the same client security context and lifecycle contexts as the
- * transaction that just completed.
- */
- @Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "10.5.1", id = "c")
- public void testOtherTransactionalObserverMethodContexts()
- {
- assert false;
- }
-
@Test(groups = { "events", "integration" })
@SpecAssertion(section = "10.5", id = "bd")
public void testObserverCanSetRollbackOnlyOnTransaction()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-07-23 13:14:00 UTC (rev 3152)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-07-23 13:28:41 UTC (rev 3153)
@@ -56,49 +56,4 @@
}
assert interfaceFound;
}
-
- @Test(groups = "stub")
- @SpecAssertions({
- @SpecAssertion(section = "11.1.2", id = "b")
- })
- public void testGetInterceptorBindingTypes()
- {
- assert false;
- }
-
- @Test(groups = "stub")
- @SpecAssertions({
- @SpecAssertion(section = "11.1.2", id = "c")
- })
- public void testInterceptsOnInterceptorBean()
- {
- assert false;
- }
-
- @Test(groups = "stub")
- @SpecAssertions({
- @SpecAssertion(section = "11.1.2", id = "d")
- })
- public void testInterceptInvokesInstance()
- {
- assert false;
- }
-
- @Test(groups = "stub")
- @SpecAssertions({
- @SpecAssertion(section = "11.1.2", id = "e")
- })
- public void testInterceptionTypeIdentifiesCallbackOrMethod()
- {
- assert false;
- }
-
- @Test(groups = "stub")
- @SpecAssertions({
- @SpecAssertion(section = "11.1.2", id = "f")
- })
- public void testInstanceOfInterceptorForEveryEnabledInterceptor()
- {
- assert false;
- }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-07-23 13:14:00 UTC (rev 3152)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-07-23 13:28:41 UTC (rev 3153)
@@ -20,18 +20,6 @@
public class ResolutionByNameTest extends AbstractJSR299Test
{
- @Test(groups={"stub", "el"}) @SpecAssertion(section="5.8", id = "aba")
- public void testELResolverRegisteredWithJsf()
- {
- assert false;
- }
-
- @Test(groups={"stub", "el"}) @SpecAssertion(section="5.8", id = "aaa")
- public void testELResolverRegisteredWithServlet()
- {
- assert false;
- }
-
@Test(groups = "ri-broken")
@SpecAssertion(section="5.8", id="c")
public void testQualifiedNameLookup()
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3152 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck: tests/deployment/lifecycle and 8 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-23 09:14:00 -0400 (Thu, 23 Jul 2009)
New Revision: 3152
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ExtensionsTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java
Log:
Match in review tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -59,17 +59,10 @@
}
- private BeanManager currentManager;
- protected void setCurrentManager(BeanManager currentManager)
- {
- this.currentManager = currentManager;
- }
-
-
protected BeanManager getCurrentManager()
{
- return currentManager;
+ return getCurrentConfiguration().getManagers().getManager();
}
protected byte[] serialize(Object instance) throws IOException
@@ -107,20 +100,6 @@
return JSR299ConfigurationImpl.get();
}
- @Override
- public void beforeMethod()
- {
- super.beforeMethod();
- setCurrentManager(getCurrentConfiguration().getManagers().getManager());
- }
-
- @Override
- public void afterMethod()
- {
- super.afterMethod();
- setCurrentManager(null);
- }
-
/**
* Checks if all annotations are in a given set of annotations
*
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ExtensionsTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ExtensionsTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ExtensionsTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -48,8 +48,7 @@
}
@Test
- //@SpecAssertion(section="11.5.1", id="ba")
- @SpecAssertion(section="review", id="review")
+ @SpecAssertion(section="11.5.1", id="ab")
public void testAddingBindingType()
{
assert BeforeBeanDiscoveryObserver.isObserved();
@@ -58,8 +57,7 @@
}
@Test
- //@SpecAssertion(section="11.5.1", id="bb")
- @SpecAssertion(section="review", id="review")
+ @SpecAssertion(section="11.5.1", id="ac")
public void testAddingScopeType()
{
assert BeforeBeanDiscoveryObserver.isObserved();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/beanDiscoveryMethodThrowsException/BeforeBeanDiscoveryThrowsExceptionTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -42,8 +42,7 @@
{
@Test(groups="incontainer-ri-broken")
- //@SpecAssertion(section="11.5.1", id="c")
- @SpecAssertion(section="review", id="review")
+ @SpecAssertion(section="11.5.1", id="ag")
public void testThrowsException()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/normalScope/AddingNormalScopeTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -42,8 +42,7 @@
{
@Test
- //@SpecAssertion(section="11.5.1", id="bb")
- @SpecAssertion(section="review", id="review")
+ @SpecAssertion(section="11.5.1", id="ac")
public void testAddingScopeType()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/passivatingScope/AddingPassivatingScopeTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -18,7 +18,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.DefinitionError;
+import org.jboss.jsr299.tck.DeploymentError;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.jboss.testharness.impl.packaging.IntegrationTest;
@@ -35,15 +35,13 @@
@Resources({
@Resource(source="javax.enterprise.inject.spi.Extension", destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
})
-@IntegrationTest
-// TODO This *should be* DeploymentError
-(a)ExpectedDeploymentException(DefinitionError.class)
+@IntegrationTest
+(a)ExpectedDeploymentException(DeploymentError.class)
public class AddingPassivatingScopeTest extends AbstractJSR299Test
{
- @Test
- //@SpecAssertion(section="11.5.1", id="bb")
- @SpecAssertion(section="review", id="review")
+ @Test(groups="ri-broken")
+ @SpecAssertion(section="11.5.1", id="ac")
public void testAddingScopeType()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -7,7 +7,6 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.New;
-import javax.enterprise.inject.deployment.Standard;
import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -44,16 +43,6 @@
assert Dependent.class.equals(newEnterpriseBean.getScopeType());
}
- @Test(groups = { "new", "deployment" })
- @SpecAssertion(section = "3.10", id = "review")
- public void testNewBeanIsOfStandardDeploymentType()
- {
- Set<Bean<WrappedEnterpriseBeanLocal>> beans = getBeans(WrappedEnterpriseBeanLocal.class, new NewLiteral());
- assert beans.size() == 1;
- newEnterpriseBean = beans.iterator().next();
- assert Standard.class.equals(newEnterpriseBean.getDeploymentType());
- }
-
@Test(groups = { "new" })
@SpecAssertion(section = "3.10", id = "r")
public void testNewBeanIsHasOnlyNewBinding()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -8,7 +8,6 @@
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.New;
-import javax.enterprise.inject.deployment.Standard;
import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -45,16 +44,6 @@
assert Dependent.class.equals(newSimpleBean.getScopeType());
}
- @Test(groups = { "new", "deployment" })
- @SpecAssertion(section = "3.10", id = "review")
- public void testNewBeanIsOfStandardDeploymentType()
- {
- Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
- assert beans.size() == 1;
- Bean<ExplicitContructorSimpleBean> newSimpleBean = beans.iterator().next();
- assert Standard.class.equals(newSimpleBean.getDeploymentType());
- }
-
@Test(groups = { "new" })
@SpecAssertion(section = "3.10", id = "r")
public void testNewBeanHasOnlyNewBinding()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -3,6 +3,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.two.TwoSpecializingBeansForOneSpecializedTest;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.jboss.testharness.impl.packaging.Packaging;
@@ -19,13 +20,15 @@
@ExpectedDeploymentException(DeploymentError.class)
public class TwoBeansSpecializeTheSameBeanTest extends AbstractJSR299Test
{
+ /**
+ * This method tests session beans
+ *
+ * @see org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.broken.twoBeansSpecializeTheSameBean.TwoBeansSpecializeTheSameBeanTest#testTwoBeansSpecializeTheSameBean()
+ * @see TwoSpecializingBeansForOneSpecializedTest#testTwoBeansSpecializeTheSameBean()
+ *
+ */
@Test
- //@SpecAssertion(section="4.3.3", id = "ba")
- @SpecAssertion(section = "review", id = "review") // removed from spec? was:
- // If, in a particular deployment, more than one enabled bean directly specializes
- // the same bean, the container automatically detects inconsistent specialization
- // and treats it as a deployment problem, as defined in Section 12.4, "Problems
- // detected automatically by the container"
+ @SpecAssertion(section = "4.3.3", id = "c")
public void testTwoBeansSpecializeTheSameBean()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/broken/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -3,6 +3,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.two.TwoSpecializingBeansForOneSpecializedTest;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
@@ -14,17 +15,18 @@
@ExpectedDeploymentException(DeploymentError.class)
public class TwoBeansSpecializeTheSameBeanTest extends AbstractJSR299Test
{
-
+
+ /**
+ * This method tests producers
+ *
+ * @see org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.twoBeansSpecializeTheSameBean.TwoBeansSpecializeTheSameBeanTest#testTwoBeansSpecializeTheSameBean()
+ * @see TwoSpecializingBeansForOneSpecializedTest#testTwoBeansSpecializeTheSameBean()
+ */
@Test
- //@SpecAssertion(section="4.3.3", id = "ba")
- @SpecAssertion(section = "review", id = "review") // removed from spec? was:
- // If, in a particular deployment, more than one enabled bean directly specializes
- // the same bean, the container automatically detects inconsistent specialization
- // and treats it as a deployment problem, as defined in Section 12.4, "Problems
- // detected automatically by the container"
+ @SpecAssertion(section = "4.3.3", id = "c")
public void testTwoBeansSpecializeTheSameBean()
{
assert false;
}
-
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java 2009-07-23 13:07:33 UTC (rev 3151)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java 2009-07-23 13:14:00 UTC (rev 3152)
@@ -3,6 +3,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.broken.twoBeansSpecializeTheSameBean.TwoBeansSpecializeTheSameBeanTest;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
@@ -14,13 +15,15 @@
@ExpectedDeploymentException(DeploymentError.class)
public class TwoSpecializingBeansForOneSpecializedTest extends AbstractJSR299Test
{
+ /**
+ * This is for managed beans
+ *
+ * @see TwoBeansSpecializeTheSameBeanTest#testTwoBeansSpecializeTheSameBean()
+ * @see org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.broken.twoBeansSpecializeTheSameBean.TwoBeansSpecializeTheSameBeanTest#testTwoBeansSpecializeTheSameBean()
+ *
+ */
@Test
- //@SpecAssertion(section="4.3.3", id = "ba")
- @SpecAssertion(section = "review", id = "review") // removed from spec? was:
- // If, in a particular deployment, more than one enabled bean directly specializes
- // the same bean, the container automatically detects inconsistent specialization
- // and treats it as a deployment problem, as defined in Section 12.4, "Problems
- // detected automatically by the container"
+ @SpecAssertion(section="4.3.3", id = "c")
public void testTwoBeansSpecializeTheSameBean()
{
assert false;
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3151 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-07-23 09:07:33 -0400 (Thu, 23 Jul 2009)
New Revision: 3151
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnotherStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
Log:
Fixed broken stereotype definition test.
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnotherStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnotherStereotype.java 2009-07-23 12:48:02 UTC (rev 3150)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnotherStereotype.java 2009-07-23 13:07:33 UTC (rev 3151)
@@ -8,11 +8,13 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE, METHOD, FIELD })
@Retention(RUNTIME)
+@RequestScoped
@interface AnotherStereotype
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-07-23 12:48:02 UTC (rev 3150)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-07-23 13:07:33 UTC (rev 3151)
@@ -94,10 +94,7 @@
public void testStereotypeNotDeclaredInheritedIsNotInherited()
{
assert getBeans(ShetlandPony.class).size() == 1;
-
- // rewrite this to not test deployment type
- //assert getBeans(ShetlandPony.class).iterator().next().getDeploymentType().equals(Production.class);
- assert false;
+ assert getBeans(ShetlandPony.class).iterator().next().getScopeType().equals(Dependent.class);
}
@Test
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3150 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/policy/enterprise and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-23 08:48:02 -0400 (Thu, 23 Jul 2009)
New Revision: 3150
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/EjbRemote.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/EnabledEjb.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/NotEnabledEjb.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/SessionBeanPolicyTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/policy/enterprise/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/policy/enterprise/beans.xml
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Added test for policy enablement of session beans
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/EjbRemote.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/EjbRemote.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/EjbRemote.java 2009-07-23 12:48:02 UTC (rev 3150)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.policy.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+interface EjbRemote
+{
+ String hello();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/EnabledEjb.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/EnabledEjb.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/EnabledEjb.java 2009-07-23 12:48:02 UTC (rev 3150)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.policy.enterprise;
+
+import javax.ejb.Stateless;
+import javax.enterprise.inject.Policy;
+
+@Stateless
+@Policy
+class EnabledEjb implements EjbRemote
+{
+ public String hello() {
+ return "Hello world!";
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/NotEnabledEjb.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/NotEnabledEjb.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/NotEnabledEjb.java 2009-07-23 12:48:02 UTC (rev 3150)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.policy.enterprise;
+
+import javax.ejb.Stateless;
+import javax.enterprise.inject.Policy;
+
+@Stateless
+@Policy
+class NotEnabledEjb implements EjbRemote
+{
+ public String hello() {
+ return "Hi!";
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/SessionBeanPolicyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/SessionBeanPolicyTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/enterprise/SessionBeanPolicyTest.java 2009-07-23 12:48:02 UTC (rev 3150)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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.jsr299.tck.tests.policy.enterprise;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: 20090625
+ *
+ */
+@Artifact
+(a)Packaging(PackagingType.EAR)
+@IntegrationTest
+@BeansXml("beans.xml")
+public class SessionBeanPolicyTest extends AbstractJSR299Test
+{
+
+ @Test(groups = { "policy", "ri-broken" })
+ @SpecAssertion(section = "5.2", id = "eb")
+ public void testEnabledPolicyAvailable()
+ {
+ assert getBeans(EjbRemote.class).size() == 1;
+ assert getBeans(EjbRemote.class).iterator().next().getTypes().contains(EnabledEjb.class);
+ }
+}
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/policy/enterprise/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/policy/enterprise/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/policy/enterprise/beans.xml 2009-07-23 12:48:02 UTC (rev 3150)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans>
+ <policies>
+ <class>org.jboss.jsr299.tck.tests.policy.enterprise.EnabledEjb</class>
+ </policies>
+</beans>
\ No newline at end of file
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-23 12:36:32 UTC (rev 3149)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-23 12:48:02 UTC (rev 3150)
@@ -1674,9 +1674,13 @@
<text>The <policies> element contains a list of bean classes and stereotypes. </text>
</assertion>
- <assertion id="e">
- <text>A policy is enabled for the bean deployment archive if the policy is a managed bean or session bean and the bean class of the bean is listed.</text>
+ <assertion id="ea">
+ <text>A policy is enabled for the bean deployment archive if the policy is a _managed bean_ or ~session bean~ and the bean class of the bean is listed.</text>
</assertion>
+
+ <assertion id="eb">
+ <text>A policy is enabled for the bean deployment archive if the policy is a ~managed bean~ or _session bean_ and the bean class of the bean is listed.</text>
+ </assertion>
<assertion id="f">
<text>A policy is enabled for the bean deployment archive if the policy is a producer method, field or resource, and the bean class that declares the method or field is listed.</text>
@@ -1946,7 +1950,7 @@
<text>If the scope is not active, as specified in Section 6.5.1, "The active context object for a scope", the client proxy rethrows |ContextNotActiveException| or |IllegalStateException|.</text>
</assertion>
- <assertion id="b">
+ <assertion id="b" testable="false">
<text>The behavior of all methods declared by |java.lang.Object|, except for |toString()|, is undefined for a client proxy</text>
</assertion>
@@ -2006,7 +2010,7 @@
<text>A reference to a bean injected into a disposer method or observer method is valid until the invocation of the method completes.</text>
</assertion>
- <assertion id="g">
+ <assertion id="g" testable="false">
<text>The application should not invoke a method of an invalid reference. If the application invokes a method of an invalid injected reference, the behavior is undefined.</text>
</assertion>
</section>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3149 - ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-23 08:36:32 -0400 (Thu, 23 Jul 2009)
New Revision: 3149
Modified:
ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java
Log:
Add examples and more details about logical deployment archives
Modified: ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java 2009-07-23 08:55:04 UTC (rev 3148)
+++ ri/trunk/spi/src/main/java/org/jboss/webbeans/bootstrap/spi/Deployment.java 2009-07-23 12:36:32 UTC (rev 3149)
@@ -23,6 +23,25 @@
/**
* Represents a deployment of a CDI application.
*
+ * <h3>Background</h3>
+ *
+ * <p>
+ * Java EE defines a series of accessibility rules for classloading, which CDI
+ * extends to cover bean resolution. For example a bean in the war can inject a
+ * bean in an ejb-jar, but not vice-versa.
+ * </p>
+ *
+ * <p>
+ * These rules are defined via the MANIFEST.MF <a
+ * href="http://java.sun.com/javase/6/docs/technotes/guides/extensions/"
+ * >Extension Mechanism Architecture</a> and <a
+ * href="http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html">JAR
+ * File Specification</a>.
+ * </p>
+ *
+ * <h3>Deployment structure representation</h3>
+ *
+ * <p>
* Web Beans will request the bean archive deployment structure during the bean
* discovery initialization step. After this step, CDI allows users to define
* bean's programmatically, possibly with bean classes from a deployment archive
@@ -32,21 +51,62 @@
* {@link BeanDeploymentArchive}s are loaded, before Web Beans proceeds to
* validating the deployment, the bean archive deployment structure will
* re-requested.
+ * </p>
*
+ * <p>
+ * The BeanDeploymentArchive tree represents the "logical structure" of the
+ * deployment; Given two archives A and B, which have a transitive closure of
+ * accessible archives A' and B', it allowable for the the archives A & B to be
+ * represented as a single BeanDeploymentArchive, assuming that A' and B' are
+ * bi-directionally accessible.
+ * </p>
+ *
+ * <p>
* For an application deployed as an ear to a Java EE container, all library
* jars, EJB jars, rars and war WEB-INF/classes directories should be searched,
* and the bean deployment archive structure built.
+ * </p>
*
+ * <p>
* For an application deployed as a war to a Java EE or Servlet container, all
* library jars and the WEB-INF/classes directory should be searched, and the
* bean deployment archive structure built.
+ * </p>
*
- * TODO Java SE structure
+ * <p>
* For an application deployed in the SE environment, all library jars and
* classpath directories should be searched, and the bean deployment archive
- * structure built. A single, logical deployment archive will be built for
- * all beans and beans.xml files found on the classpath.
+ * structure built. A single, logical deployment archive will be built for all
+ * beans and beans.xml files found on the classpath.
+ * </p>
*
+ * <h3>A Java EE example</h3>
+ *
+ * <p>
+ * Given an ejb-module A (not as part of an ear), an ear B (containing an
+ * ejb-jar C which uses the standard mechanism to reference module A, libraries
+ * F bundled in /lib, and a war D which references module C), and a war E (which
+ * references module A and bundles libraries G in /WEB-INF/lib) all deployed.
+ * </p>
+ *
+ * <p>
+ * War E would have be able to resolve beans from ejb module A, libraries G, as
+ * well as other app server libraries. Furthermore, any libraries in G will be
+ * able to resolve beans in other libraries G as well as in ejb module A and war
+ * E. Ejb module A will not be able to resolve beans in war E or libraries G. It
+ * would be legal to represent any libraries G as a single logical
+ * BeanDeploymentArchive, also incorportating classes in war E.
+ * </p>
+ *
+ * <p>
+ * War D would be able to resolve beans from from ejb module C, module A
+ * (transitively via C), libraries F, as well as other app server libraries. Ejb
+ * module C can resolve beans in libraries F as well as module A, but not beans
+ * in War D. Ejb module A cannot resolve beans in libraries F, module A or war
+ * D. It would be legal to represent libraries F as a single logical
+ * BeanDeploymentArchive.
+ * </p>
+ *
* @see BeanDeploymentArchive
*
* @author Pete Muir
15 years, 4 months