Author: pete.muir(a)jboss.org
Date: 2008-12-08 11:58:53 -0500 (Mon, 08 Dec 2008)
New Revision: 480
Added:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
Removed:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/transaction/TransactionListener.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BoostrapTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/NewEventTest.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/mock/MockBootstrap.java
Log:
Change Bootstrap -> WebBeansBootstrap
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java 2008-12-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -1,279 +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;
-
-import static org.jboss.webbeans.ejb.EJB.ENTERPRISE_BEAN_CLASS;
-import static org.jboss.webbeans.jsf.JSF.UICOMPONENT_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.FILTER_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.HTTP_SESSION_LISTENER_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.SERVLET_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.SERVLET_CONTEXT_LISTENER_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.SERVLET_REQUEST_LISTENER_CLASS;
-import static org.jboss.webbeans.util.BeanFactory.createEnterpriseBean;
-import static org.jboss.webbeans.util.BeanFactory.createEventBean;
-import static org.jboss.webbeans.util.BeanFactory.createInstanceBean;
-import static org.jboss.webbeans.util.BeanFactory.createObserver;
-import static org.jboss.webbeans.util.BeanFactory.createProducerFieldBean;
-import static org.jboss.webbeans.util.BeanFactory.createProducerMethodBean;
-import static org.jboss.webbeans.util.BeanFactory.createSimpleBean;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.Observable;
-import javax.webbeans.Observer;
-import javax.webbeans.Observes;
-import javax.webbeans.Obtainable;
-
-import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.ManagerImpl;
-import org.jboss.webbeans.MetaDataCache;
-import org.jboss.webbeans.bean.AbstractBean;
-import org.jboss.webbeans.bean.AbstractClassBean;
-import org.jboss.webbeans.bean.EventBean;
-import org.jboss.webbeans.bean.InstanceBean;
-import org.jboss.webbeans.bean.ProducerFieldBean;
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bindings.InitializedBinding;
-import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
-import org.jboss.webbeans.event.ObserverImpl;
-import org.jboss.webbeans.introspector.AnnotatedField;
-import org.jboss.webbeans.introspector.AnnotatedItem;
-import org.jboss.webbeans.introspector.AnnotatedMethod;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.util.JNDI;
-
-/**
- * Bootstrapping functionality that is run at application startup and detects
- * and register beans
- *
- * @author Pete Muir
- */
-public class Bootstrap
-{
- // The property name of the discovery class
- public static String WEB_BEAN_DISCOVERY_PROPERTY_NAME =
"org.jboss.webbeans.bootstrap.webBeanDiscovery";
-
- private static LogProvider log = Logging.getLogProvider(Bootstrap.class);
-
- /**
- * Constructor
- *
- * Starts up with the singleton Manager
- */
- public Bootstrap()
- {
- JNDI.set(ManagerImpl.JNDI_KEY, CurrentManager.rootManager());
- }
-
- /**
- * Register any beans defined by the provided classes with the manager
- *
- * @param classes The classes to register
- */
- public void registerBeans(Class<?>... classes)
- {
- registerBeans(new HashSet<Class<?>>(Arrays.asList(classes)));
- }
-
- /**
- * Register the bean with the manager
- *
- * Creates the beans first and then sets them in the manager
- *
- * @param classes The classes to register as Web Beans
- */
- public void registerBeans(Iterable<Class<?>> classes)
- {
- Set<AbstractBean<?, ?>> beans = createBeans(classes);
- CurrentManager.rootManager().setBeans(beans);
- }
-
- /**
- * Discover any beans defined by the provided classes
- *
- * Beans discovered are not registered with the manager
- *
- * @param classes The classes to create Web Beans from
- * @return A set of Web Beans that represents the classes
- */
- public Set<AbstractBean<?, ?>> createBeans(Class<?>... classes)
- {
- return createBeans(new HashSet<Class<?>>(Arrays.asList(classes)));
- }
-
- /**
- * Creates Web Beans from a set of classes
- *
- * Iterates over the classes and creates a Web Bean of the corresponding
- * type. Also register the beans injection points with the resolver. If the
- * bean has producer methods, producer beans are created for these and those
- * injection points are also registered.
- *
- * @param classes The classes to adapt
- * @return A set of adapted Web Beans
- */
- public Set<AbstractBean<?, ?>> createBeans(Iterable<Class<?>>
classes)
- {
- Set<AbstractBean<?, ?>> beans = new HashSet<AbstractBean<?,
?>>();
- for (Class<?> clazz : classes)
- {
- if (MetaDataCache.instance().getEjbMetaData(clazz).isEjb())
- {
- createBean(createEnterpriseBean(clazz), beans);
- }
- else if (isTypeSimpleWebBean(clazz))
- {
- createBean(createSimpleBean(clazz), beans);
- }
- }
- return beans;
- }
-
- public void createBean(AbstractClassBean<?> bean, Set<AbstractBean<?,
?>> beans)
- {
- beans.add(bean);
-
CurrentManager.rootManager().getResolver().addInjectionPoints(bean.getInjectionPoints());
- for (AnnotatedMethod<Object> producerMethod : bean.getProducerMethods())
- {
- ProducerMethodBean<?> producerMethodBean =
createProducerMethodBean(producerMethod, bean);
- beans.add(producerMethodBean);
-
CurrentManager.rootManager().getResolver().addInjectionPoints(producerMethodBean.getInjectionPoints());
- log.info("Web Bean: " + producerMethodBean);
- }
- for (AnnotatedField<Object> producerField : bean.getProducerFields())
- {
- ProducerFieldBean<?> producerFieldBean =
createProducerFieldBean(producerField, bean);
- beans.add(producerFieldBean);
- log.info("Web Bean: " + producerFieldBean);
- }
- for (AnnotatedItem injectionPoint : bean.getInjectionPoints())
- {
- if ( injectionPoint.isAnnotationPresent(Observable.class) )
- {
- EventBean<Object, Field> eventBean = createEventBean(injectionPoint);
- beans.add(eventBean);
-
//CurrentManager.rootManager().getResolver().addInjectionPoints(eventBean.getInjectionPoints());
- log.info("Web Bean: " + eventBean);
- }
- if ( injectionPoint.isAnnotationPresent(Obtainable.class) )
- {
- InstanceBean<Object, Field> instanceBean =
createInstanceBean(injectionPoint);
- beans.add(instanceBean);
-
//CurrentManager.rootManager().getResolver().addInjectionPoints(eventBean.getInjectionPoints());
- log.info("Web Bean: " + instanceBean);
- }
- }
- for (AnnotatedMethod<Object> observerMethod : bean.getObserverMethods())
- {
- ObserverImpl<?> observer = createObserver(observerMethod, bean);
- if (observerMethod.getAnnotatedParameters(Observes.class).size() == 1)
- {
- registerObserver(observer,
observerMethod.getAnnotatedParameters(Observes.class).get(0).getType(),
observerMethod.getAnnotatedParameters(Observes.class).get(0).getBindingTypesAsArray());
- }
- else
- {
- throw new DefinitionException("Observer method can only have one
parameter annotated @Observes " + observer);
- }
-
- }
- log.info("Web Bean: " + bean);
- }
-
-
- /**
- * Starts the boot process.
- *
- * Discovers the beans and registers them with the manager. Also resolves the
- * injection points.
- *
- * @param webBeanDiscovery The discovery implementation
- */
- public void boot(WebBeanDiscovery webBeanDiscovery)
- {
- log.info("Starting Web Beans RI " + getVersion());
- if (webBeanDiscovery == null)
- {
- throw new IllegalStateException("No WebBeanDiscovery provider found, you
need to implement the org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery interface, and
tell the RI to use it by specifying -D" + Bootstrap.WEB_BEAN_DISCOVERY_PROPERTY_NAME
+ "=<classname>");
- }
- registerBeans(webBeanDiscovery.discoverWebBeanClasses());
- log.info("Validing Web Bean injection points");
- CurrentManager.rootManager().getResolver().resolveInjectionPoints();
- CurrentManager.rootManager().fireEvent(CurrentManager.rootManager(), new
InitializedBinding());
- log.info("Web Beans RI initialized");
- }
-
- /**
- * Gets version information
- *
- * @return The implementation version from the Bootstrap class package.
- */
- public static String getVersion()
- {
- Package pkg = Bootstrap.class.getPackage();
- return pkg != null ? pkg.getImplementationVersion() : null;
- }
-
- /**
- * Gets the available discovery implementations
- *
- * Parses the web-beans-ri.properties file and for each row describing a
- * discover class, instantiate that class and add it to the set
- *
- * @return A set of discovery implementations
- * @see org.jboss.webbeans.bootstrap.DeploymentProperties
- */
- @SuppressWarnings("unchecked")
- public static Set<Class<? extends WebBeanDiscovery>>
getWebBeanDiscoveryClasses()
- {
- Set<Class<? extends WebBeanDiscovery>> webBeanDiscoveryClasses = new
HashSet<Class<? extends WebBeanDiscovery>>();
- for (String className : new
DeploymentProperties(Thread.currentThread().getContextClassLoader()).getPropertyValues(WEB_BEAN_DISCOVERY_PROPERTY_NAME))
- {
- try
- {
- webBeanDiscoveryClasses.add((Class<WebBeanDiscovery>)
Class.forName(className));
- }
- catch (ClassNotFoundException e)
- {
- log.debug("Unable to load WebBeanDiscovery provider " + className,
e);
- }
- catch (NoClassDefFoundError e)
- {
- log.warn("Unable to load WebBeanDiscovery provider " + className +
" due classDependencyProblem", e);
- }
- }
- return webBeanDiscoveryClasses;
- }
-
- @SuppressWarnings("unchecked")
- private static <T> void registerObserver(Observer<T> observer,
Class<?> eventType, Annotation[] bindings)
- {
- CurrentManager.rootManager().addObserver(observer, (Class<T>) eventType,
bindings);
- }
-
- protected static boolean isTypeSimpleWebBean(Class<?> type)
- {
- return !SERVLET_CLASS.isAssignableFrom(type) &&
!FILTER_CLASS.isAssignableFrom(type) &&
!SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(type) &&
!HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(type) &&
!SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(type) &&
!ENTERPRISE_BEAN_CLASS.isAssignableFrom(type) &&
!UICOMPONENT_CLASS.isAssignableFrom(type);
- }
-
-}
Copied:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
(from rev 478,
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java)
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
(rev 0)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -0,0 +1,280 @@
+/*
+ * 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;
+
+import static org.jboss.webbeans.ejb.EJB.ENTERPRISE_BEAN_CLASS;
+import static org.jboss.webbeans.jsf.JSF.UICOMPONENT_CLASS;
+import static org.jboss.webbeans.servlet.Servlet.FILTER_CLASS;
+import static org.jboss.webbeans.servlet.Servlet.HTTP_SESSION_LISTENER_CLASS;
+import static org.jboss.webbeans.servlet.Servlet.SERVLET_CLASS;
+import static org.jboss.webbeans.servlet.Servlet.SERVLET_CONTEXT_LISTENER_CLASS;
+import static org.jboss.webbeans.servlet.Servlet.SERVLET_REQUEST_LISTENER_CLASS;
+import static org.jboss.webbeans.util.BeanFactory.createEnterpriseBean;
+import static org.jboss.webbeans.util.BeanFactory.createEventBean;
+import static org.jboss.webbeans.util.BeanFactory.createInstanceBean;
+import static org.jboss.webbeans.util.BeanFactory.createObserver;
+import static org.jboss.webbeans.util.BeanFactory.createProducerFieldBean;
+import static org.jboss.webbeans.util.BeanFactory.createProducerMethodBean;
+import static org.jboss.webbeans.util.BeanFactory.createSimpleBean;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.Observable;
+import javax.webbeans.Observer;
+import javax.webbeans.Observes;
+import javax.webbeans.Obtainable;
+
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.MetaDataCache;
+import org.jboss.webbeans.bean.AbstractBean;
+import org.jboss.webbeans.bean.AbstractClassBean;
+import org.jboss.webbeans.bean.EventBean;
+import org.jboss.webbeans.bean.InstanceBean;
+import org.jboss.webbeans.bean.ProducerFieldBean;
+import org.jboss.webbeans.bean.ProducerMethodBean;
+import org.jboss.webbeans.bindings.InitializedBinding;
+import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
+import org.jboss.webbeans.event.ObserverImpl;
+import org.jboss.webbeans.introspector.AnnotatedField;
+import org.jboss.webbeans.introspector.AnnotatedItem;
+import org.jboss.webbeans.introspector.AnnotatedMethod;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.util.JNDI;
+import org.jboss.webbeans.util.Reflections;
+
+/**
+ * Bootstrapping functionality that is run at application startup and detects
+ * and register beans
+ *
+ * @author Pete Muir
+ */
+public class WebBeansBootstrap
+{
+ // The property name of the discovery class
+ public static String WEB_BEAN_DISCOVERY_PROPERTY_NAME =
"org.jboss.webbeans.bootstrap.webBeanDiscovery";
+
+ private static LogProvider log = Logging.getLogProvider(WebBeansBootstrap.class);
+
+ /**
+ * Constructor
+ *
+ * Starts up with the singleton Manager
+ */
+ public WebBeansBootstrap()
+ {
+ JNDI.set(ManagerImpl.JNDI_KEY, CurrentManager.rootManager());
+ }
+
+ /**
+ * Register any beans defined by the provided classes with the manager
+ *
+ * @param classes The classes to register
+ */
+ public void registerBeans(Class<?>... classes)
+ {
+ registerBeans(new HashSet<Class<?>>(Arrays.asList(classes)));
+ }
+
+ /**
+ * Register the bean with the manager
+ *
+ * Creates the beans first and then sets them in the manager
+ *
+ * @param classes The classes to register as Web Beans
+ */
+ public void registerBeans(Iterable<Class<?>> classes)
+ {
+ Set<AbstractBean<?, ?>> beans = createBeans(classes);
+ CurrentManager.rootManager().setBeans(beans);
+ }
+
+ /**
+ * Discover any beans defined by the provided classes
+ *
+ * Beans discovered are not registered with the manager
+ *
+ * @param classes The classes to create Web Beans from
+ * @return A set of Web Beans that represents the classes
+ */
+ public Set<AbstractBean<?, ?>> createBeans(Class<?>... classes)
+ {
+ return createBeans(new HashSet<Class<?>>(Arrays.asList(classes)));
+ }
+
+ /**
+ * Creates Web Beans from a set of classes
+ *
+ * Iterates over the classes and creates a Web Bean of the corresponding
+ * type. Also register the beans injection points with the resolver. If the
+ * bean has producer methods, producer beans are created for these and those
+ * injection points are also registered.
+ *
+ * @param classes The classes to adapt
+ * @return A set of adapted Web Beans
+ */
+ public Set<AbstractBean<?, ?>> createBeans(Iterable<Class<?>>
classes)
+ {
+ Set<AbstractBean<?, ?>> beans = new HashSet<AbstractBean<?,
?>>();
+ for (Class<?> clazz : classes)
+ {
+ if (MetaDataCache.instance().getEjbMetaData(clazz).isEjb())
+ {
+ createBean(createEnterpriseBean(clazz), beans);
+ }
+ else if (isTypeSimpleWebBean(clazz))
+ {
+ createBean(createSimpleBean(clazz), beans);
+ }
+ }
+ return beans;
+ }
+
+ public void createBean(AbstractClassBean<?> bean, Set<AbstractBean<?,
?>> beans)
+ {
+ beans.add(bean);
+
CurrentManager.rootManager().getResolver().addInjectionPoints(bean.getInjectionPoints());
+ for (AnnotatedMethod<Object> producerMethod : bean.getProducerMethods())
+ {
+ ProducerMethodBean<?> producerMethodBean =
createProducerMethodBean(producerMethod, bean);
+ beans.add(producerMethodBean);
+
CurrentManager.rootManager().getResolver().addInjectionPoints(producerMethodBean.getInjectionPoints());
+ log.info("Web Bean: " + producerMethodBean);
+ }
+ for (AnnotatedField<Object> producerField : bean.getProducerFields())
+ {
+ ProducerFieldBean<?> producerFieldBean =
createProducerFieldBean(producerField, bean);
+ beans.add(producerFieldBean);
+ log.info("Web Bean: " + producerFieldBean);
+ }
+ for (AnnotatedItem injectionPoint : bean.getInjectionPoints())
+ {
+ if ( injectionPoint.isAnnotationPresent(Observable.class) )
+ {
+ EventBean<Object, Field> eventBean = createEventBean(injectionPoint);
+ beans.add(eventBean);
+
//CurrentManager.rootManager().getResolver().addInjectionPoints(eventBean.getInjectionPoints());
+ log.info("Web Bean: " + eventBean);
+ }
+ if ( injectionPoint.isAnnotationPresent(Obtainable.class) )
+ {
+ InstanceBean<Object, Field> instanceBean =
createInstanceBean(injectionPoint);
+ beans.add(instanceBean);
+
//CurrentManager.rootManager().getResolver().addInjectionPoints(eventBean.getInjectionPoints());
+ log.info("Web Bean: " + instanceBean);
+ }
+ }
+ for (AnnotatedMethod<Object> observerMethod : bean.getObserverMethods())
+ {
+ ObserverImpl<?> observer = createObserver(observerMethod, bean);
+ if (observerMethod.getAnnotatedParameters(Observes.class).size() == 1)
+ {
+ registerObserver(observer,
observerMethod.getAnnotatedParameters(Observes.class).get(0).getType(),
observerMethod.getAnnotatedParameters(Observes.class).get(0).getBindingTypesAsArray());
+ }
+ else
+ {
+ throw new DefinitionException("Observer method can only have one
parameter annotated @Observes " + observer);
+ }
+
+ }
+ log.info("Web Bean: " + bean);
+ }
+
+
+ /**
+ * Starts the boot process.
+ *
+ * Discovers the beans and registers them with the manager. Also resolves the
+ * injection points.
+ *
+ * @param webBeanDiscovery The discovery implementation
+ */
+ public void boot(WebBeanDiscovery webBeanDiscovery)
+ {
+ log.info("Starting Web Beans RI " + getVersion());
+ if (webBeanDiscovery == null)
+ {
+ throw new IllegalStateException("No WebBeanDiscovery provider found, you
need to implement the org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery interface, and
tell the RI to use it by specifying -D" +
WebBeansBootstrap.WEB_BEAN_DISCOVERY_PROPERTY_NAME + "=<classname>");
+ }
+ registerBeans(webBeanDiscovery.discoverWebBeanClasses());
+ log.info("Validing Web Bean injection points");
+ CurrentManager.rootManager().getResolver().resolveInjectionPoints();
+ CurrentManager.rootManager().fireEvent(CurrentManager.rootManager(), new
InitializedBinding());
+ log.info("Web Beans RI initialized");
+ }
+
+ /**
+ * Gets version information
+ *
+ * @return The implementation version from the Bootstrap class package.
+ */
+ public static String getVersion()
+ {
+ Package pkg = WebBeansBootstrap.class.getPackage();
+ return pkg != null ? pkg.getImplementationVersion() : null;
+ }
+
+ /**
+ * Gets the available discovery implementations
+ *
+ * Parses the web-beans-ri.properties file and for each row describing a
+ * discover class, instantiate that class and add it to the set
+ *
+ * @return A set of discovery implementations
+ * @see org.jboss.webbeans.bootstrap.DeploymentProperties
+ */
+ @SuppressWarnings("unchecked")
+ public static Set<Class<? extends WebBeanDiscovery>>
getWebBeanDiscoveryClasses()
+ {
+ Set<Class<? extends WebBeanDiscovery>> webBeanDiscoveryClasses = new
HashSet<Class<? extends WebBeanDiscovery>>();
+ for (String className : new
DeploymentProperties(Thread.currentThread().getContextClassLoader()).getPropertyValues(WEB_BEAN_DISCOVERY_PROPERTY_NAME))
+ {
+ try
+ {
+ webBeanDiscoveryClasses.add((Class<WebBeanDiscovery>)
Class.forName(className));
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.debug("Unable to load WebBeanDiscovery provider " + className,
e);
+ }
+ catch (NoClassDefFoundError e)
+ {
+ log.warn("Unable to load WebBeanDiscovery provider " + className +
" due classDependencyProblem", e);
+ }
+ }
+ return webBeanDiscoveryClasses;
+ }
+
+ @SuppressWarnings("unchecked")
+ private static <T> void registerObserver(Observer<T> observer,
Class<?> eventType, Annotation[] bindings)
+ {
+ CurrentManager.rootManager().addObserver(observer, (Class<T>) eventType,
bindings);
+ }
+
+ protected static boolean isTypeSimpleWebBean(Class<?> type)
+ {
+ return !type.isAnnotation() && !Reflections.isAbstract(type) &&
!SERVLET_CLASS.isAssignableFrom(type) && !FILTER_CLASS.isAssignableFrom(type)
&& !SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(type) &&
!HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(type) &&
!SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(type) &&
!ENTERPRISE_BEAN_CLASS.isAssignableFrom(type) &&
!UICOMPONENT_CLASS.isAssignableFrom(type);
+ }
+
+}
Property changes on:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2008-12-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -24,7 +24,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import org.jboss.webbeans.bootstrap.Bootstrap;
+import org.jboss.webbeans.bootstrap.WebBeansBootstrap;
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
import org.jboss.webbeans.contexts.ApplicationContext;
import org.jboss.webbeans.contexts.RequestContext;
@@ -55,8 +55,8 @@
public static void beginApplication(ServletContext context)
{
servletContext = context;
- Bootstrap bootstrap = new Bootstrap();
- bootstrap.boot(getWebBeanDiscovery());
+ WebBeansBootstrap webBeansBootstrap = new WebBeansBootstrap();
+ webBeansBootstrap.boot(getWebBeanDiscovery());
ApplicationContext.INSTANCE.setBeanMap(new ApplicationBeanMap(servletContext));
}
@@ -132,7 +132,7 @@
{
WebBeanDiscovery webBeanDiscovery = null;
- for (Class<? extends WebBeanDiscovery> clazz :
Bootstrap.getWebBeanDiscoveryClasses())
+ for (Class<? extends WebBeanDiscovery> clazz :
WebBeansBootstrap.getWebBeanDiscoveryClasses())
{
Constructor<? extends WebBeanDiscovery> constructor =
Reflections.getConstructor(clazz, ServletContext.class);
if (constructor != null)
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/transaction/TransactionListener.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/transaction/TransactionListener.java 2008-12-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/transaction/TransactionListener.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -24,9 +24,6 @@
import javax.ejb.EJBException;
import javax.ejb.Remove;
import javax.ejb.SessionSynchronization;
-import javax.ejb.Stateful;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
import javax.transaction.Status;
import javax.transaction.Synchronization;
import javax.webbeans.RequestScoped;
@@ -37,9 +34,9 @@
* @author Nicklas Karlsson
*
*/
-@Stateful
+//@Stateful
@RequestScoped
-(a)TransactionAttribute(TransactionAttributeType.SUPPORTS)
+//(a)TransactionAttribute(TransactionAttributeType.SUPPORTS)
public class TransactionListener implements LocalTransactionListener,
SessionSynchronization
{
// The registered synchronizations
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java
===================================================================
---
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java 2008-12-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -1,10 +1,18 @@
package org.jboss.webbeans.test;
+import java.net.URL;
+import java.util.Properties;
+import javax.ejb.EJBContainer;
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+
+
public abstract class AbstractEjbEmbeddableTest extends AbstractTest
{
- /*@AfterClass
+ @AfterClass
public void afterClass()
{
EJBContainer current = EJBContainer.getCurrentEJBContainer();
@@ -34,6 +42,6 @@
URL url = Thread.currentThread().getContextClassLoader().getResource(path);
String s = url.toString();
return s.substring(0, s.length() - path.length());
- }*/
+ }
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java
===================================================================
---
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java 2008-12-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -4,7 +4,7 @@
import javax.webbeans.Standard;
import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.bootstrap.Bootstrap;
+import org.jboss.webbeans.bootstrap.WebBeansBootstrap;
import org.jboss.webbeans.contexts.ApplicationContext;
import org.jboss.webbeans.contexts.RequestContext;
import org.jboss.webbeans.contexts.SessionContext;
@@ -19,7 +19,7 @@
{
protected MockManagerImpl manager;
- protected Bootstrap bootstrap;
+ protected WebBeansBootstrap webBeansBootstrap;
@BeforeMethod
public final void before()
@@ -31,7 +31,7 @@
CurrentManager.setRootManager(manager);
// Mock the ApplicationContext as a simple map
ApplicationContext.INSTANCE.setBeanMap(new SimpleBeanMap());
- bootstrap = new MockBootstrap();
+ webBeansBootstrap = new MockBootstrap();
init();
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BoostrapTest.java
===================================================================
---
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BoostrapTest.java 2008-12-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BoostrapTest.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -36,7 +36,7 @@
@Test(groups="bootstrap")
public void testSingleSimpleBean()
{
- Set<AbstractBean<?, ?>> beans = bootstrap.createBeans(Tuna.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(Tuna.class);
assert beans.size() == 1;
assert beans.iterator().next().getType().equals(Tuna.class);
}
@@ -44,7 +44,7 @@
@Test(groups="bootstrap")
public void testSingleEnterpriseBean()
{
- Set<AbstractBean<?, ?>> beans = bootstrap.createBeans(Hound.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(Hound.class);
assert beans.size() == 1;
assert beans.iterator().next().getType().equals(Hound.class);
}
@@ -52,7 +52,7 @@
@Test(groups="bootstrap")
public void testMultipleSimpleBean()
{
- Set<AbstractBean<?, ?>> beans = bootstrap.createBeans(Tuna.class,
Salmon.class, SeaBass.class, Sole.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(Tuna.class, Salmon.class, SeaBass.class, Sole.class);
assert beans.size() == 4;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
for (AbstractBean<?, ?> bean : beans)
@@ -73,7 +73,7 @@
@Test(groups="bootstrap")
public void testProducerMethodBean()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(TarantulaProducer.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(TarantulaProducer.class);
assert beans.size() == 2;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
for (AbstractBean<?, ?> bean : beans)
@@ -90,7 +90,7 @@
@Test(groups="bootstrap")
public void testMultipleEnterpriseBean()
{
- Set<AbstractBean<?, ?>> beans = bootstrap.createBeans(Hound.class,
Elephant.class, Panther.class, Tiger.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(Hound.class, Elephant.class, Panther.class, Tiger.class);
assert beans.size() == 4;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
for (AbstractBean<?, ?> bean : beans)
@@ -111,7 +111,7 @@
@Test(groups="bootstrap")
public void testMultipleEnterpriseAndSimpleBean()
{
- Set<AbstractBean<?, ?>> beans = bootstrap.createBeans(Hound.class,
Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class,
Sole.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(Hound.class, Elephant.class, Panther.class, Tiger.class,
Tuna.class, Salmon.class, SeaBass.class, Sole.class);
assert beans.size() == 8;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
for (AbstractBean<?, ?> bean : beans)
@@ -140,7 +140,7 @@
@Test(groups="bootstrap")
public void testRegisterProducerMethodBean()
{
- bootstrap.registerBeans(TarantulaProducer.class);
+ webBeansBootstrap.registerBeans(TarantulaProducer.class);
assert manager.getBeans().size() == 4;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
for (Bean<?> bean : manager.getBeans())
@@ -161,7 +161,7 @@
@Test(groups="bootstrap")
public void testRegisterMultipleEnterpriseAndSimpleBean()
{
- bootstrap.registerBeans(Hound.class, Elephant.class, Panther.class, Tiger.class,
Tuna.class, Salmon.class, SeaBass.class, Sole.class);
+ webBeansBootstrap.registerBeans(Hound.class, Elephant.class, Panther.class,
Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class);
assert manager.getBeans().size() == 8 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
for (Bean<?> bean : manager.getBeans())
@@ -194,13 +194,13 @@
@Test(groups="bootstrap", expectedExceptions=IllegalStateException.class)
public void testDiscoverFails()
{
- bootstrap.boot(null);
+ webBeansBootstrap.boot(null);
}
@Test(groups="bootstrap")
public void testDiscover()
{
- bootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(Hound.class, Elephant.class, Panther.class,
Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class)), null, null));
+ webBeansBootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(Hound.class, Elephant.class, Panther.class,
Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class)), null, null));
assert manager.getBeans().size() == 10;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
@@ -236,7 +236,7 @@
{
assert !InitializedObserver.observered;
- bootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(InitializedObserver.class)), null, null));
+ webBeansBootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(InitializedObserver.class)), null, null));
assert InitializedObserver.observered;
}
@@ -244,13 +244,13 @@
@Test(groups="bootstrap")
public void testRequestContextActiveDuringInitializtionEvent()
{
- bootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(InitializedObserverWhichUsesRequestContext.class,
Tuna.class)), null, null));
+ webBeansBootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(InitializedObserverWhichUsesRequestContext.class,
Tuna.class)), null, null));
}
@Test(groups="bootstrap")
public void testApplicationContextActiveDuringInitializtionEvent()
{
- bootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(InitializedObserverWhichUsesApplicationContext.class,
LadybirdSpider.class)), null, null));
+ webBeansBootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(InitializedObserverWhichUsesApplicationContext.class,
LadybirdSpider.class)), null, null));
}
}
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseBeanTest.java
===================================================================
---
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseBeanTest.java 2008-12-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseBeanTest.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -5,12 +5,13 @@
import javax.naming.NamingException;
import org.jboss.webbeans.examples.Translator;
+import org.testng.annotations.Test;
public class EnterpriseBeanTest extends AbstractEjbEmbeddableTest
{
- //(a)Test(expectedExceptions=UnsupportedOperationException.class)
+ @Test(expectedExceptions=UnsupportedOperationException.class)
public void test() throws NamingException
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/NewEventTest.java
===================================================================
---
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/NewEventTest.java 2008-12-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/NewEventTest.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -324,7 +324,7 @@
@SpecAssertion(section = "8.5")
public void testObserverMethodOnEnterpriseBeanIsBusinessMethodOrStatic()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(Pomeranian.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(Pomeranian.class);
assert beans.size() == 1;
Set<Observer<MockManagerImpl>> observers =
manager.resolveObservers(manager, new InitializedBinding());
assert observers.size() == 2;
@@ -334,7 +334,7 @@
@SpecAssertion(section = "8.5")
public void testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(TibetanTerrier.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(TibetanTerrier.class);
assert beans.size() == 1;
Set<Observer<MockManagerImpl>> observers =
manager.resolveObservers(manager, new InitializedBinding());
assert observers.size() == 1;
@@ -354,7 +354,7 @@
@SpecAssertion(section = { "8.5.1", "8.5.2" })
public void testObserverMethodMustHaveOnlyOneEventParameter()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(YorkshireTerrier.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(YorkshireTerrier.class);
assert beans != null;
}
@@ -362,7 +362,7 @@
@SpecAssertion(section = "8.5.1")
public void testObserverMethodCannotObserveParameterizedEvents()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(BostonTerrier.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(BostonTerrier.class);
assert beans != null;
}
@@ -371,7 +371,7 @@
public void testObserverMethodWithoutBindingTypesObservesEventsWithoutBindingTypes()
{
// This observer has no binding types specified
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(Pomeranian.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(Pomeranian.class);
assert beans.size() == 1;
// Resolve registered observers with an event containing no binding types
@@ -384,7 +384,7 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodAnnotatedProducesFails()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(BorderTerrier.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(BorderTerrier.class);
assert beans != null;
}
@@ -392,7 +392,7 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodAnnotatedInitializerFails()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(AustralianTerrier.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(AustralianTerrier.class);
assert beans != null;
}
@@ -400,7 +400,7 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodAnnotatedDestructorFails()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(CairnsTerrier.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(CairnsTerrier.class);
assert beans != null;
}
@@ -408,7 +408,7 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodWithDisposesParamFails()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(FoxTerrier.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(FoxTerrier.class);
assert beans != null;
}
@@ -416,7 +416,7 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodMayHaveMultipleBindingTypes()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(BullTerrier.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(BullTerrier.class);
assert beans != null;
// If we can resolve the observer with the two binding types,
// then it worked
@@ -444,7 +444,7 @@
@SpecAssertion(section = "8.5.4")
public void testObserverMethodReceivesInjectionsOnNonObservesParameters()
{
- Set<AbstractBean<?, ?>> beans =
bootstrap.createBeans(BananaSpider.class);
+ Set<AbstractBean<?, ?>> beans =
webBeansBootstrap.createBeans(BananaSpider.class);
assert beans != null;
}
@@ -458,7 +458,7 @@
@SpecAssertion(section = "8.5.5")
public void testConditionalObserver()
{
- bootstrap.registerBeans(RecluseSpider.class);
+ webBeansBootstrap.registerBeans(RecluseSpider.class);
manager.fireEvent("New string event");
// Should not be notified since bean is not instantiated yet
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-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -88,21 +88,21 @@
@Test
public void testClassesImplementingServletInterfacesNotDiscoveredAsSimpleBeans()
{
- bootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(FilterBean.class,
HttpSessionListenerBean.class, ServletBean.class, ServletContextListenerBean.class,
ServletRequestListenerBean.class)), null, null));
+ webBeansBootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(FilterBean.class,
HttpSessionListenerBean.class, ServletBean.class, ServletContextListenerBean.class,
ServletRequestListenerBean.class)), null, null));
assert manager.getBeans().size() == MockManagerImpl.BUILT_IN_BEANS;
}
@Test
public void testClassesImplementingEnterpriseBeanInterfaceNotDiscoveredAsSimpleBean()
{
- bootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(EnterpriseBeanWebBean.class)), null, null));
+ webBeansBootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(EnterpriseBeanWebBean.class)), null, null));
assert manager.getBeans().size() == MockManagerImpl.BUILT_IN_BEANS;
}
@Test
public void testClassExtendingUiComponentNotDiscoveredAsSimpleBean()
{
- bootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(UIComponentBean.class)), null, null));
+ webBeansBootstrap.boot(new MockWebBeanDiscovery(new
HashSet<Class<?>>(Arrays.asList(UIComponentBean.class)), null, null));
assert manager.getBeans().size() == MockManagerImpl.BUILT_IN_BEANS;
}
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-08
15:52:37 UTC (rev 479)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2008-12-08
16:58:53 UTC (rev 480)
@@ -1,8 +1,8 @@
package org.jboss.webbeans.test.mock;
-import org.jboss.webbeans.bootstrap.Bootstrap;
+import org.jboss.webbeans.bootstrap.WebBeansBootstrap;
-public class MockBootstrap extends Bootstrap
+public class MockBootstrap extends WebBeansBootstrap
{
public MockBootstrap()