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...
-
<
developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/br...
-
<
url>http://fisheye.jboss.org/browse/WebBeans/ri/tags/1.0.0.PREVIEW2-PA...
+
<
connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/br...
+
<
url>http://fisheye.jboss.org/browse/WebBeans/ri/tags/1.0.0.PREVIEW2/ri...
</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...
-
<
developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/br...
-
<
url>http://fisheye.jboss.org/browse/WebBeans/branches/1.0.0.PREVIEW2-P...
+
<
connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/br...
+
<
url>http://fisheye.jboss.org/browse/WebBeans/branches/1.0.0.PREVIEW2&l...
</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...
-
<
developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/br...
-
<
url>http://fisheye.jboss.org/browse/WebBeans/ri/branches/1.0.0.PREVIEW...
+
<
connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/branches...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/br...
+
<
url>http://fisheye.jboss.org/browse/WebBeans/ri/branches/1.0.0.PREVIEW...
</scm>
</project>