[webbeans-commits] Webbeans SVN: r621 - in ri/trunk: webbeans-ri/src/main/java/org/jboss/webbeans and 17 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sat Dec 20 12:11:56 EST 2008
Author: pete.muir at jboss.org
Date: 2008-12-20 12:11:55 -0500 (Sat, 20 Dec 2008)
New Revision: 621
Added:
ri/trunk/webbeans-ri-spi/src/main/java/org/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java
Removed:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/
Modified:
ri/trunk/webbeans-ri-spi/
ri/trunk/webbeans-ri-spi/pom.xml
ri/trunk/webbeans-ri/pom.xml
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractFacadeBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EjbDescriptorCache.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/ConcurrentCache.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/JNDI.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EventBusTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Chunky.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Singleton.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Whitefish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/AuroraFinch.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/EuropeanGoldfinch.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Haddock.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java
Log:
Split spi out, put manager in JNDI, make Manager serializable
Modified: ri/trunk/webbeans-ri/pom.xml
===================================================================
--- ri/trunk/webbeans-ri/pom.xml 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/pom.xml 2008-12-20 17:11:55 UTC (rev 621)
@@ -17,6 +17,11 @@
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-api</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-ri-spi</artifactId>
+ </dependency>
<dependency>
<groupId>org.testng</groupId>
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -18,6 +18,7 @@
package org.jboss.webbeans;
import java.io.InputStream;
+import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
@@ -69,7 +70,7 @@
*
*/
@Standard
-public class ManagerImpl implements Manager
+public class ManagerImpl implements Manager, Serializable
{
// The JNDI key to place the manager under
public static final String JNDI_KEY = "java:comp/Manager";
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -17,6 +17,7 @@
package org.jboss.webbeans;
+import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.Collections;
@@ -44,14 +45,14 @@
*
* @author Pete Muir
*/
-public class Resolver
+public class Resolver implements Serializable
{
/**
* Extension of an element which bases equality not only on type, but also on
* binding type
*/
- private abstract class ResolvableAnnotatedItem<T, S> extends ForwardingAnnotatedItem<T, S>
+ private abstract class ResolvableAnnotatedItem<T, S> extends ForwardingAnnotatedItem<T, S> implements Serializable
{
@Override
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractFacadeBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractFacadeBean.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractFacadeBean.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -18,6 +18,7 @@
package org.jboss.webbeans.bean;
import java.lang.annotation.Annotation;
+
import javax.webbeans.Dependent;
import javax.webbeans.Production;
import javax.webbeans.Standard;
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -39,7 +39,7 @@
*
* @see org.jboss.webbeans.bean.proxy.ProxyMethodHandler
*/
-public class ProxyPool
+public class ProxyPool implements Serializable
{
/**
* A container/cache for previously created proxies
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -92,11 +92,16 @@
public WebBeansBootstrap(ManagerImpl manager)
{
this.manager = manager;
- CurrentManager.setRootManager(manager);
+ registerManager();
manager.addContext(DependentContext.INSTANCE);
- JNDI.set(ManagerImpl.JNDI_KEY, manager);
}
+ protected void registerManager()
+ {
+ JNDI.bind(ManagerImpl.JNDI_KEY, manager);
+ CurrentManager.setRootManager(manager);
+ }
+
public WebBeansBootstrap()
{
this(new ManagerImpl());
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EjbDescriptorCache.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EjbDescriptorCache.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EjbDescriptorCache.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -17,6 +17,7 @@
package org.jboss.webbeans.ejb;
+import java.io.Serializable;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -30,7 +31,7 @@
* @author Pete Muir
*
*/
-public class EjbDescriptorCache
+public class EjbDescriptorCache implements Serializable
{
// EJB name -> EJB descriptor map
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -17,15 +17,15 @@
package org.jboss.webbeans.event;
+import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_COMPLETION;
+import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_FAILURE;
+import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_SUCCESS;
+import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.BEFORE_COMPLETION;
+
import javax.transaction.Status;
import javax.transaction.Synchronization;
import javax.webbeans.Observer;
-import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_COMPLETION;
-import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_SUCCESS;
-import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.AFTER_FAILURE;
-import static org.jboss.webbeans.event.ObserverImpl.TransactionObservationPhase.BEFORE_COMPLETION;
-
/**
* A synchronization object which will deliver the event to the observer after
* the JTA transaction currently in effect is committed.
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -17,6 +17,7 @@
package org.jboss.webbeans.event;
+import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.util.HashSet;
import java.util.List;
@@ -39,16 +40,16 @@
* @author David Allen
*
*/
-public class EventManager
+public class EventManager implements Serializable
{
/**
* An event type -> observer list map
*/
- private class RegisteredObserversMap extends ForwardingMap<Class<?>, List<EventObserver<?>>>
+ private class RegisteredObserversMap extends ForwardingMap<Class<?>, List<EventObserver<?>>> implements Serializable
{
// The map delegate
- private Map<Class<?>, List<EventObserver<?>>> delegate;
+ private ConcurrentHashMap<Class<?>, List<EventObserver<?>>> delegate;
/**
* Constructor. Initializes the delegate
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/ConcurrentCache.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/ConcurrentCache.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/ConcurrentCache.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -17,10 +17,10 @@
package org.jboss.webbeans.util;
+import java.io.Serializable;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
@@ -32,11 +32,11 @@
*
* @author Pete Muir
*/
-public class ConcurrentCache<K, V> extends ForwardingMap<K, Future<V>>
+public class ConcurrentCache<K, V> extends ForwardingMap<K, Future<V>> implements Serializable
{
// The backing map with the value wrapped in a Future instance
- private ConcurrentMap<K, Future<V>> map;
+ private ConcurrentHashMap<K, Future<V>> map;
/**
* Constructor
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/JNDI.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/JNDI.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/JNDI.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -18,7 +18,9 @@
package org.jboss.webbeans.util;
import java.util.Hashtable;
+import java.util.Properties;
+import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.webbeans.ExecutionException;
@@ -36,11 +38,8 @@
{
private static final LogProvider log = Logging.getLogProvider(JNDI.class);
- private static Hashtable initialContextProperties;
-
- private static InitialContext initialContext;
- public static InitialContext getInitialContext(Hashtable<String, String> props) throws NamingException
+ public static InitialContext getInitialContext(Hashtable props) throws NamingException
{
if (props==null)
{
@@ -66,22 +65,9 @@
public static InitialContext getInitialContext() throws NamingException
{
- if (initialContext == null)
- {
- initInitialContext();
- }
-
- return initialContext;
+ return getInitialContext(new Properties());
}
- private static synchronized void initInitialContext() throws NamingException
- {
- if (initialContext == null)
- {
- initialContext = getInitialContext(new Hashtable<String, String>());
- }
- }
-
/**
* Looks up a object in JNDI
*
@@ -105,7 +91,8 @@
{
try
{
- return (T) getInitialContext().lookup(name);
+ Object instance = getInitialContext().lookup(name);
+ return (T) instance;
}
catch (NamingException e)
{
@@ -113,9 +100,29 @@
}
}
- public static void set(String key, Object value)
+ public static void bind(String key, Object value)
{
- // TODO Implement JNDI lookup
+ try
+ {
+ getInitialContext().bind(key, value);
+ }
+ catch (NamingException e)
+ {
+ throw new ExecutionException("Error binding " + value + " to " + key + " in JNDI", e);
+ }
}
+
+ public static void bind(String env, String name, Object value)
+ {
+ try
+ {
+ Context environment = (Context) getInitialContext().lookup(env);
+ environment.bind(name, value);
+ }
+ catch (NamingException e)
+ {
+ throw new ExecutionException("Error binding " + value + " to " + name + " in JNDI", e);
+ }
+ }
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EventBusTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EventBusTest.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EventBusTest.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -17,8 +17,8 @@
import org.jboss.webbeans.test.beans.BirdCage;
import org.jboss.webbeans.test.beans.BlueFacedParrotFinch;
import org.jboss.webbeans.test.beans.EuropeanGoldfinch;
+import org.jboss.webbeans.test.beans.FinchKeeper;
import org.jboss.webbeans.test.beans.OrangeCheekedWaxbill;
-import org.jboss.webbeans.test.beans.FinchKeeper;
import org.jboss.webbeans.test.beans.RecluseSpider;
import org.jboss.webbeans.test.beans.StarFinch;
import org.jboss.webbeans.test.beans.TeaCupPomeranian;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -1,5 +1,7 @@
package org.jboss.webbeans.test;
+import static org.jboss.webbeans.bean.BeanFactory.createSimpleBean;
+
import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.HashMap;
@@ -39,7 +41,6 @@
import org.jboss.webbeans.test.mock.MockManagerImpl;
import org.jboss.webbeans.test.mock.MockWebBeanDiscovery;
import org.testng.annotations.Test;
-import static org.jboss.webbeans.bean.BeanFactory.*;
@SpecVersion("20081206")
public class SimpleBeanModelTest extends AbstractTest
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Chunky.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Chunky.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Chunky.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.test.annotations;
+import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Singleton.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Singleton.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Singleton.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -2,6 +2,7 @@
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Whitefish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Whitefish.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Whitefish.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.test.annotations;
+import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/AuroraFinch.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/AuroraFinch.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/AuroraFinch.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -3,6 +3,7 @@
import javax.webbeans.Event;
import javax.webbeans.Initializer;
import javax.webbeans.Observable;
+
import org.jboss.webbeans.test.beans.StarFinch.Mess;
public class AuroraFinch
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/EuropeanGoldfinch.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/EuropeanGoldfinch.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/EuropeanGoldfinch.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -6,6 +6,7 @@
import javax.webbeans.Destructor;
import javax.webbeans.Event;
import javax.webbeans.Observable;
+
import org.jboss.webbeans.test.beans.StarFinch.Mess;
@ConversationScoped @Stateful
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Haddock.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Haddock.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Haddock.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -3,8 +3,6 @@
import javax.webbeans.Named;
import javax.webbeans.Production;
-import org.jboss.webbeans.test.annotations.Whitefish;
-
@Production
@Named
public class Haddock implements Animal
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -1,5 +1,6 @@
package org.jboss.webbeans.test.mock;
+import org.jboss.webbeans.CurrentManager;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.bootstrap.WebBeansBootstrap;
@@ -16,4 +17,10 @@
manager.setBeans(createStandardBeans());
}
+ @Override
+ protected void registerManager()
+ {
+ CurrentManager.setRootManager(manager);
+ }
+
}
Property changes on: ri/trunk/webbeans-ri-spi
___________________________________________________________________
Name: svn:ignore
+ .project
.classpath
target
Modified: ri/trunk/webbeans-ri-spi/pom.xml
===================================================================
--- ri/trunk/webbeans-ri-spi/pom.xml 2008-12-20 17:05:07 UTC (rev 620)
+++ ri/trunk/webbeans-ri-spi/pom.xml 2008-12-20 17:11:55 UTC (rev 621)
@@ -34,18 +34,6 @@
<build>
<defaultGoal>install</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.2</version>
- <configuration>
- <suiteXmlFiles>
- <suiteXmlFile>testng.xml</suiteXmlFile>
- </suiteXmlFiles>
- </configuration>
- </plugin>
- </plugins>
</build>
</project>
Copied: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi (from rev 614, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi)
Deleted: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java 2008-12-20 00:24:19 UTC (rev 614)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -1,42 +0,0 @@
-/*
- * 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.bootstrap.spi;
-
-/**
- * Represents the business interface of an EJB
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public interface BusinessInterfaceDescriptor<T>
-{
-
- /**
- * Gets the business interface class
- */
- public Class<T> getInterface();
-
- /**
- * Gets the JNDI name under which the EJB is registered
- *
- * @return The JNDI name
- */
- public String getJndiName();
-
-}
\ No newline at end of file
Copied: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java (from rev 620, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java)
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/BusinessInterfaceDescriptor.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -0,0 +1,42 @@
+/*
+ * 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.bootstrap.spi;
+
+/**
+ * Represents the business interface of an EJB
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public interface BusinessInterfaceDescriptor<T>
+{
+
+ /**
+ * Gets the business interface class
+ */
+ public Class<T> getInterface();
+
+ /**
+ * Gets the JNDI name under which the EJB is registered
+ *
+ * @return The JNDI name
+ */
+ public String getJndiName();
+
+}
\ No newline at end of file
Deleted: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java 2008-12-20 00:24:19 UTC (rev 614)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -1,96 +0,0 @@
-/*
- * 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.bootstrap.spi;
-
-
-/**
- * EJB metadata from the EJB descriptor
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public interface EjbDescriptor<T>
-{
-
- /**
- * Gets the EJB type
- *
- * @return The EJB Bean class
- */
- public Class<T> getType();
-
- /**
- * Gets the local business interfaces of the EJB
- *
- * @return An iterator over the local business interfaces
- */
- public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces();
-
- /**
- * Gets the remote business interfaces of the EJB
- *
- * @return An iterator over the remote business interfaces
- */
- public Iterable<BusinessInterfaceDescriptor<?>> getRemoteBusinessInterfaces();
-
- /**
- * Get the remove methods of the EJB
- *
- * @return An iterator over the remove methods
- */
- public Iterable<MethodDescriptor> getRemoveMethods();
-
- /**
- * Indicates if the bean is stateless
- *
- * @return True if stateless, false otherwise
- */
- public boolean isStateless();
-
- /**
- * Indicates if the bean is a EJB 3.1 Singleton
- *
- * @return True if the bean is a singleton, false otherwise
- */
- public boolean isSingleton();
-
- /**
- * Indicates if the EJB is stateful
- *
- * @return True if the bean is stateful, false otherwise
- */
- public boolean isStateful();
-
- /**
- * Indicates if the EJB is and MDB
- *
- * @return True if the bean is an MDB, false otherwise
- */
- public boolean isMessageDriven();
-
- /**
- * Gets the EJB name
- *
- * @return The name
- */
- public String getEjbName();
-
- public String getLocalJndiName();
-
-}
Copied: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java (from rev 620, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java)
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -0,0 +1,96 @@
+/*
+ * 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.bootstrap.spi;
+
+
+/**
+ * EJB metadata from the EJB descriptor
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public interface EjbDescriptor<T>
+{
+
+ /**
+ * Gets the EJB type
+ *
+ * @return The EJB Bean class
+ */
+ public Class<T> getType();
+
+ /**
+ * Gets the local business interfaces of the EJB
+ *
+ * @return An iterator over the local business interfaces
+ */
+ public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces();
+
+ /**
+ * Gets the remote business interfaces of the EJB
+ *
+ * @return An iterator over the remote business interfaces
+ */
+ public Iterable<BusinessInterfaceDescriptor<?>> getRemoteBusinessInterfaces();
+
+ /**
+ * Get the remove methods of the EJB
+ *
+ * @return An iterator over the remove methods
+ */
+ public Iterable<MethodDescriptor> getRemoveMethods();
+
+ /**
+ * Indicates if the bean is stateless
+ *
+ * @return True if stateless, false otherwise
+ */
+ public boolean isStateless();
+
+ /**
+ * Indicates if the bean is a EJB 3.1 Singleton
+ *
+ * @return True if the bean is a singleton, false otherwise
+ */
+ public boolean isSingleton();
+
+ /**
+ * Indicates if the EJB is stateful
+ *
+ * @return True if the bean is stateful, false otherwise
+ */
+ public boolean isStateful();
+
+ /**
+ * Indicates if the EJB is and MDB
+ *
+ * @return True if the bean is an MDB, false otherwise
+ */
+ public boolean isMessageDriven();
+
+ /**
+ * Gets the EJB name
+ *
+ * @return The name
+ */
+ public String getEjbName();
+
+ public String getLocalJndiName();
+
+}
Deleted: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java 2008-12-20 00:24:19 UTC (rev 614)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -1,10 +0,0 @@
-package org.jboss.webbeans.bootstrap.spi;
-
-public interface MethodDescriptor
-{
-
- public String getMethodName();
-
- public Class<?>[] getMethodParameterTypes();
-
-}
Copied: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java (from rev 620, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java)
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/MethodDescriptor.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.bootstrap.spi;
+
+public interface MethodDescriptor
+{
+
+ public String getMethodName();
+
+ public Class<?>[] getMethodParameterTypes();
+
+}
Deleted: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java 2008-12-20 00:24:19 UTC (rev 614)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -1,52 +0,0 @@
-/*
- * 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.bootstrap.spi;
-
-import java.net.URL;
-
-/**
- * A container should implement this interface to allow the Web Beans RI to
- * discover the Web Beans to deploy
- *
- * @author Pete Muir
- *
- */
-public interface WebBeanDiscovery
-{
- /**
- * Gets list of all classes in classpath archives with web-beans.xml files
- *
- * @return An iterable over the classes
- */
- public Iterable<Class<?>> discoverWebBeanClasses();
-
- /**
- * Gets a list of all web-beans.xml files in the app classpath
- *
- * @return An iterable over the web-beans.xml files
- */
- public Iterable<URL> discoverWebBeansXml();
-
- /**
- * Gets a descriptor for each EJB in the application
- *
- * @return The bean class to descriptor map
- */
- public Iterable<EjbDescriptor<?>> discoverEjbs();
-
-}
Copied: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java (from rev 620, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java)
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java 2008-12-20 17:11:55 UTC (rev 621)
@@ -0,0 +1,52 @@
+/*
+ * 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.bootstrap.spi;
+
+import java.net.URL;
+
+/**
+ * A container should implement this interface to allow the Web Beans RI to
+ * discover the Web Beans to deploy
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WebBeanDiscovery
+{
+ /**
+ * Gets list of all classes in classpath archives with web-beans.xml files
+ *
+ * @return An iterable over the classes
+ */
+ public Iterable<Class<?>> discoverWebBeanClasses();
+
+ /**
+ * Gets a list of all web-beans.xml files in the app classpath
+ *
+ * @return An iterable over the web-beans.xml files
+ */
+ public Iterable<URL> discoverWebBeansXml();
+
+ /**
+ * Gets a descriptor for each EJB in the application
+ *
+ * @return The bean class to descriptor map
+ */
+ public Iterable<EjbDescriptor<?>> discoverEjbs();
+
+}
More information about the weld-commits
mailing list