[jboss-cvs] JBossAS SVN: r85930 - trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 16 10:47:47 EDT 2009
Author: alesj
Date: 2009-03-16 10:47:47 -0400 (Mon, 16 Mar 2009)
New Revision: 85930
Modified:
trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
Log:
Fix TD as TomcatInjectionContainer should *not* be class instance,
since it's per deployment unit.
Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java 2009-03-16 14:33:42 UTC (rev 85929)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java 2009-03-16 14:47:47 UTC (rev 85930)
@@ -95,8 +95,6 @@
private ORB orb = null;
- private TomcatInjectionContainer injectionContainer;
-
public ORB getORB()
{
return orb;
@@ -170,11 +168,11 @@
StandardContext context = (StandardContext)Class.forName(config.getContextClassName()).newInstance();
DeploymentUnit depUnit = webApp.getDeploymentUnit();
- injectionContainer = new TomcatInjectionContainer(webApp, depUnit, context, getPersistenceUnitDependencyResolver());
+ TomcatInjectionContainer injectionContainer = new TomcatInjectionContainer(webApp, depUnit, context, getPersistenceUnitDependencyResolver());
Loader webLoader = depUnit.getAttachment(Loader.class);
if (webLoader == null)
- webLoader = getWebLoader(depUnit, metaData, loader, warUrl);
+ webLoader = getWebLoader(depUnit, metaData, loader, warUrl, injectionContainer);
webApp.setName(warUrl.getPath());
webApp.setClassLoader(loader);
@@ -296,7 +294,7 @@
// Set listener
context.setConfigClass("org.jboss.web.tomcat.service.deployers.JBossContextConfig");
- context.addLifecycleListener(new EncListener(loader, webLoader, webApp));
+ context.addLifecycleListener(new EncListener(loader, webLoader, injectionContainer, webApp));
// Pass the metadata to the RunAsListener via a thread local
RunAsListener.metaDataLocal.set(metaData);
@@ -407,10 +405,13 @@
protected DeploymentUnit unit;
- public EncListener(ClassLoader loader, Loader webLoader, WebApplication webApp)
+ protected TomcatInjectionContainer injectionContainer;
+
+ public EncListener(ClassLoader loader, Loader webLoader, TomcatInjectionContainer injectionContainer, WebApplication webApp)
{
this.loader = loader;
this.webLoader = webLoader;
+ this.injectionContainer = injectionContainer;
this.webApp = webApp;
this.metaData = webApp.getMetaData();
this.unit = webApp.getDeploymentUnit();
@@ -496,7 +497,7 @@
}
- public Loader getWebLoader(DeploymentUnit unit, JBossWebMetaData metaData, ClassLoader loader, URL rl) throws MalformedURLException
+ public Loader getWebLoader(DeploymentUnit unit, JBossWebMetaData metaData, ClassLoader loader, URL rl, TomcatInjectionContainer injectionContainer) throws MalformedURLException
{
Loader webLoader = null;
@@ -533,11 +534,6 @@
return webLoader;
}
- public void setInjectionContainer(TomcatInjectionContainer container)
- {
- this.injectionContainer = container;
- }
-
/**
* Called as part of the undeploy() method template to ask the subclass for perform the web container specific
* undeployment steps.
More information about the jboss-cvs-commits
mailing list