Author: jlmonteiro
Date: Mon Jan 17 10:47:19 2011
New Revision: 1059859
URL: http://svn.apache.org/viewvc?rev=1059859&view=rev
Log:
OPENEJB-1422 fix compile error caused by OWB-503. Patch from Shawn. Thx
Modified:
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/BeansDeployer.java
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java
Modified:
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/BeansDeployer.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/BeansDeployer.java?rev=1059859&r1=1059858&r2=1059859&view=diff
==============================================================================
---
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/BeansDeployer.java
(original)
+++
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/BeansDeployer.java
Mon Jan 17 10:47:19 2011
@@ -92,9 +92,12 @@ public class BeansDeployer {
/**XML Configurator*/
protected final WebBeansXMLConfigurator xmlConfigurator;
+
+ private final WebBeansContext webBeansContext;
- public BeansDeployer(WebBeansXMLConfigurator xmlConfigurator) {
+ public BeansDeployer(WebBeansXMLConfigurator xmlConfigurator,
WebBeansContext webBeansContext) {
this.xmlConfigurator = xmlConfigurator;
+ this.webBeansContext = webBeansContext;
}
/**
@@ -162,7 +165,7 @@ public class BeansDeployer {
BeanManagerImpl manager =
WebBeansContext.getInstance().getBeanManagerImpl();
manager.fireEvent(new AfterBeanDiscoveryImpl(),new Annotation[0]);
- WebBeansUtil.inspectErrorStack("There are errors that are added by
AfterBeanDiscovery event observers. Look at logs for further details");
+ webBeansContext.getWebBeansUtil()._inspectErrorStack("There are errors
that are added by AfterBeanDiscovery event observers. Look at logs for further
details");
}
/**
@@ -173,7 +176,7 @@ public class BeansDeployer {
BeanManagerImpl manager =
WebBeansContext.getInstance().getBeanManagerImpl();
manager.fireEvent(new AfterDeploymentValidationImpl(),new
Annotation[0]);
- WebBeansUtil.inspectErrorStack("There are errors that are added by
AfterDeploymentValidation event observers. Look at logs for further details");
+ webBeansContext.getWebBeansUtil()._inspectErrorStack("There are errors
that are added by AfterDeploymentValidation event observers. Look at logs for
further details");
}
/**
@@ -405,14 +408,14 @@ public class BeansDeployer {
specialClassList.add(specialClass);
}
}
- WebBeansUtil.configureSpecializations(specialClassList);
+
webBeansContext.getWebBeansUtil()._configureSpecializations(specialClassList);
}
// XML Defined Specializations
checkXMLSpecializations();
//configure specialized producer beans.
- WebBeansUtil.configureProducerMethodSpecializations();
+
webBeansContext.getWebBeansUtil()._configureProducerMethodSpecializations();
}
catch (Exception e) {
throw new WebBeansDeploymentException(e);
@@ -449,7 +452,7 @@ public class BeansDeployer {
}
specialClassList.add(specialClass);
}
- WebBeansUtil.configureSpecializations(specialClassList);
+
webBeansContext.getWebBeansUtil()._configureSpecializations(specialClassList);
}
/**
@@ -546,10 +549,10 @@ public class BeansDeployer {
//Fires ProcessInjectionTarget event for Java EE components instances
//That supports injections but not managed beans
ProcessInjectionTargetImpl<T> processInjectionTargetEvent = null;
- if (WebBeansUtil.supportsJavaEeComponentInjections(clazz)) {
+ if
(webBeansContext.getWebBeansUtil()._supportsJavaEeComponentInjections(clazz)) {
//Fires ProcessInjectionTarget
- processInjectionTargetEvent =
WebBeansUtil.fireProcessInjectionTargetEventForJavaEeComponents(clazz);
- WebBeansUtil.inspectErrorStack("There are errors that are added by
ProcessInjectionTarget event observers. Look at logs for further details");
+ processInjectionTargetEvent =
webBeansContext.getWebBeansUtil()._fireProcessInjectionTargetEventForJavaEeComponents(clazz);
+ webBeansContext.getWebBeansUtil()._inspectErrorStack("There are
errors that are added by ProcessInjectionTarget event observers. Look at logs
for further details");
//Sets custom InjectionTarget instance
if (processInjectionTargetEvent.isSet()) {
@@ -581,7 +584,7 @@ public class BeansDeployer {
//If ProcessInjectionTargetEvent is not set, set it
if (processInjectionTargetEvent == null) {
- processInjectionTargetEvent =
WebBeansUtil.fireProcessInjectionTargetEvent(managedBean);
+ processInjectionTargetEvent =
webBeansContext.getWebBeansUtil()._fireProcessInjectionTargetEvent(managedBean);
}
//Decorator
@@ -592,7 +595,7 @@ public class BeansDeployer {
if (annotationTypeSet) {
WebBeansAnnotatedTypeUtil.defineDecorator(annotatedType);
} else {
- WebBeansUtil.defineDecorator(managedBeanCreator,
processInjectionTargetEvent);
+
webBeansContext.getWebBeansUtil()._defineDecorator(managedBeanCreator,
processInjectionTargetEvent);
}
}
//Interceptor
@@ -603,7 +606,7 @@ public class BeansDeployer {
if (annotationTypeSet) {
WebBeansAnnotatedTypeUtil.defineInterceptor(annotatedType);
} else {
- WebBeansUtil.defineInterceptor(managedBeanCreator,
processInjectionTargetEvent);
+
webBeansContext.getWebBeansUtil()._defineInterceptor(managedBeanCreator,
processInjectionTargetEvent);
}
} else {
if
(WebBeansContext.getInstance().getBeanManagerImpl().containsCustomDecoratorClass(annotatedType.getJavaClass())
||
@@ -614,7 +617,7 @@ public class BeansDeployer {
if (logger.wblWillLogDebug()) {
logger.debug("Found Managed Bean with class name : [{0}]",
annotatedType.getJavaClass().getName());
}
- WebBeansUtil.defineManagedBean(managedBeanCreator,
processInjectionTargetEvent);
+
webBeansContext.getWebBeansUtil()._defineManagedBean(managedBeanCreator,
processInjectionTargetEvent);
}
return true;
Modified:
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java?rev=1059859&r1=1059858&r2=1059859&view=diff
==============================================================================
---
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java
(original)
+++
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java
Mon Jan 17 10:47:19 2011
@@ -89,7 +89,7 @@ public class OpenEJBLifecycle implements
webBeansContext = WebBeansContext.getInstance();
this.beanManager = webBeansContext.getBeanManagerImpl();
this.xmlDeployer = new WebBeansXMLConfigurator();
- this.deployer = new BeansDeployer(this.xmlDeployer);
+ this.deployer = new BeansDeployer(this.xmlDeployer, webBeansContext);
this.jndiService = webBeansContext.getService(JNDIService.class);
this.beanManager.setXMLConfigurator(this.xmlDeployer);
this.scannerService = webBeansContext.getScannerService();
@@ -180,7 +180,7 @@ public class OpenEJBLifecycle implements
AnnotatedType<?> annotatedType =
webBeansContext.getAnnotatedElementFactory().newAnnotatedType(implClass);
//Fires ProcessAnnotatedType
- ProcessAnnotatedTypeImpl<?> processAnnotatedEvent =
WebBeansUtil.fireProcessAnnotatedTypeEvent(annotatedType);
+ ProcessAnnotatedTypeImpl<?> processAnnotatedEvent =
webBeansContext.getWebBeansUtil()._fireProcessAnnotatedTypeEvent(annotatedType);
// TODO Can you really veto an EJB?
//if veto() is called
@@ -196,7 +196,7 @@ public class OpenEJBLifecycle implements
EjbUtility.fireEvents((Class<Object>) implClass, bean,
(ProcessAnnotatedTypeImpl<Object>) processAnnotatedEvent);
- WebBeansUtil.setInjectionTargetBeanEnableFlag(bean);
+
webBeansContext.getWebBeansUtil()._setInjectionTargetBeanEnableFlag(bean);
}
//Check Specialization
@@ -249,7 +249,7 @@ public class OpenEJBLifecycle implements
AnnotatedType<?> annotatedType =
webBeansContext.getAnnotatedElementFactory().newAnnotatedType(implClass);
//Fires ProcessAnnotatedType
- ProcessAnnotatedTypeImpl<?> processAnnotatedEvent =
WebBeansUtil.fireProcessAnnotatedTypeEvent(annotatedType);
+ ProcessAnnotatedTypeImpl<?> processAnnotatedEvent =
webBeansContext.getWebBeansUtil()._fireProcessAnnotatedTypeEvent(annotatedType);
//if veto() is called
if (processAnnotatedEvent.isVeto()) {