[jboss-cvs] JBossAS SVN: r109224 - branches/switchboard-integration/server/src/main/java/org/jboss/web/deployers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 10 06:05:11 EST 2010
Author: jaikiran
Date: 2010-11-10 06:05:11 -0500 (Wed, 10 Nov 2010)
New Revision: 109224
Modified:
branches/switchboard-integration/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
Log:
JBAS-8570 Process web environment only if it's present
Modified: branches/switchboard-integration/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- branches/switchboard-integration/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java 2010-11-10 10:34:47 UTC (rev 109223)
+++ branches/switchboard-integration/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java 2010-11-10 11:05:11 UTC (rev 109224)
@@ -764,27 +764,30 @@
deployment.setInjectionManager(injectionManager);
// Setup the Injector
Environment webEnvironment = metaData.getJndiEnvironmentRefsGroup();
- // convert JBMETA metadata to jboss-injection specific metadata
- JndiEnvironmentRefsGroup jndiEnvironment = new JndiEnvironmentImpl(webEnvironment, unit.getClassLoader());
- // For optimization, we'll create an Injector only if there's atleast one InjectionTarget
- if (this.hasInjectionTargets(jndiEnvironment))
+ if (webEnvironment != null)
{
- // create the injector
- LazyEEInjector lazyEEInjector = new LazyEEInjector(jndiEnvironment);
- // add the injector the injection manager
- injectionManager.addInjector(lazyEEInjector);
- // Deploy the Injector as a MC bean (so that the fully populated naming context (obtained via the SwitchBoard
- // Barrier) gets injected.
- String injectorMCBeanName = this.getInjectorMCBeanName(unit);
- BeanMetaData injectorBMD = this.createInjectorBMD(injectorMCBeanName, lazyEEInjector, switchBoard);
- unit.addAttachment(BeanMetaData.class + ":" + injectorMCBeanName, injectorBMD);
-
- // Add the Injector dependency on the deployment (so that the DU doesn't
- // get started till the Injector is available)
- ServiceDependencyMetaData injectorDepdendency = new ServiceDependencyMetaData();
- injectorDepdendency.setIDependOn(injectorMCBeanName);
- dependencies.add(injectorDepdendency);
- log.debug("Added Injector dependency: " + injectorMCBeanName + " for web module: " + name);
+ // convert JBMETA metadata to jboss-injection specific metadata
+ JndiEnvironmentRefsGroup jndiEnvironment = new JndiEnvironmentImpl(webEnvironment, unit.getClassLoader());
+ // For optimization, we'll create an Injector only if there's atleast one InjectionTarget
+ if (this.hasInjectionTargets(jndiEnvironment))
+ {
+ // create the injector
+ LazyEEInjector lazyEEInjector = new LazyEEInjector(jndiEnvironment);
+ // add the injector the injection manager
+ injectionManager.addInjector(lazyEEInjector);
+ // Deploy the Injector as a MC bean (so that the fully populated naming context (obtained via the SwitchBoard
+ // Barrier) gets injected.
+ String injectorMCBeanName = this.getInjectorMCBeanName(unit);
+ BeanMetaData injectorBMD = this.createInjectorBMD(injectorMCBeanName, lazyEEInjector, switchBoard);
+ unit.addAttachment(BeanMetaData.class + ":" + injectorMCBeanName, injectorBMD);
+
+ // Add the Injector dependency on the deployment (so that the DU doesn't
+ // get started till the Injector is available)
+ ServiceDependencyMetaData injectorDepdendency = new ServiceDependencyMetaData();
+ injectorDepdendency.setIDependOn(injectorMCBeanName);
+ dependencies.add(injectorDepdendency);
+ log.debug("Added Injector dependency: " + injectorMCBeanName + " for web module: " + name);
+ }
}
}
More information about the jboss-cvs-commits
mailing list