Author: manaRH
Date: 2010-01-26 08:48:08 -0500 (Tue, 26 Jan 2010)
New Revision: 11992
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/captcha/CaptchaImage.java
branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/ServletLifecycle.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/AbstractScanner.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ClassDescriptor.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/DeploymentStrategy.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/FileDescriptor.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ForwardingAbstractScanner.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ForwardingDeploymentStrategy.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/GroovyHotDeploymentStrategy.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/StandardDeploymentStrategy.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/TimestampCheckForwardingDeploymentStrategy.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/TimestampScanner.java
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java
branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java
branches/community/Seam_2_2/src/remoting/org/jboss/seam/remoting/Remoting.java
Log:
JBSEAM-4316
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/captcha/CaptchaImage.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/captcha/CaptchaImage.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/captcha/CaptchaImage.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -50,7 +50,7 @@
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
- ServletLifecycle.beginRequest(request);
+ ServletLifecycle.beginRequest(request,getServletContext());
try
{
ImageIO.write( Captcha.instance().renderChallenge(), "jpeg", out );
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/ServletLifecycle.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -46,10 +46,32 @@
public static void beginRequest(HttpServletRequest request)
{
+ beginRequest(request,null);
+ }
+
+ public static void beginRequest(HttpServletRequest request,ServletContext context)
+ {
+
+ ServletContext ctx = context;
+ if(ctx == null)
+ {
+ //try and figure out which servlet context to use
+ //from the request.
+ HttpSession session = request.getSession(false);
+ if(session == null)
+ {
+ ctx = servletContext;
+ }
+ else
+ {
+ ctx = session.getServletContext();
+ }
+ }
+
log.debug( ">>> Begin web request" );
Contexts.eventContext.set( new EventContext( new ServletRequestMap(request) ) );
Contexts.sessionContext.set( new SessionContext( new
ServletRequestSessionMap(request) ) );
- Contexts.applicationContext.set(new ApplicationContext( Lifecycle.getApplication()
) );
+ Contexts.applicationContext.set(new ApplicationContext( new
ServletApplicationMap(ctx) ) );
Contexts.conversationContext.set(null); //in case endRequest() was never called
}
@@ -76,11 +98,16 @@
log.debug( "<<< End web request" );
}
}
-
+ @Deprecated
public static void beginReinitialization(HttpServletRequest request)
{
+ beginReinitialization(request, servletContext);
+ }
+
+ public static void beginReinitialization(HttpServletRequest request,ServletContext
servletContext)
+ {
log.debug(">>> Begin re-initialization");
- Contexts.applicationContext.set( new ApplicationContext( Lifecycle.getApplication()
) );
+ Contexts.applicationContext.set( new ApplicationContext( new
ServletApplicationMap(servletContext) ) );
Contexts.eventContext.set( new BasicContext(ScopeType.EVENT) );
Contexts.sessionContext.set( new SessionContext( new
ServletRequestSessionMap(request) ) );
Contexts.conversationContext.set( new BasicContext(ScopeType.CONVERSATION) );
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/AbstractScanner.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/AbstractScanner.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/AbstractScanner.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -11,6 +11,9 @@
import javassist.bytecode.AnnotationsAttribute;
import javassist.bytecode.ClassFile;
+import javax.servlet.ServletContext;
+
+import org.jboss.seam.contexts.ServletLifecycle;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
@@ -25,6 +28,8 @@
public abstract class AbstractScanner implements Scanner
{
+ protected ServletContext servletContext;
+
private static class Handler
{
@@ -36,12 +41,14 @@
private Set<Entry<String, DeploymentHandler>> deploymentHandlers;
private ClassLoader classLoader;
private String name;
+ private ServletContext servletContext;
- public Handler(String name, Set<Entry<String, DeploymentHandler>>
deploymentHandlers, ClassLoader classLoader)
+ public Handler(String name, Set<Entry<String, DeploymentHandler>>
deploymentHandlers, ClassLoader classLoader,ServletContext servletContext)
{
this.deploymentHandlers = deploymentHandlers;
this.name = name;
this.classLoader = classLoader;
+ this.servletContext=servletContext;
}
/**
@@ -115,7 +122,7 @@
{
if (classDescriptor == null)
{
- classDescriptor = new ClassDescriptor(name, classLoader);
+ classDescriptor = new ClassDescriptor(name, classLoader,servletContext);
}
return classDescriptor;
}
@@ -124,7 +131,7 @@
{
if (fileDescriptor == null)
{
- fileDescriptor = new FileDescriptor(name, classLoader);
+ fileDescriptor = new FileDescriptor(name, classLoader,servletContext);
}
return fileDescriptor;
}
@@ -137,14 +144,20 @@
public AbstractScanner(DeploymentStrategy deploymentStrategy)
{
this.deploymentStrategy = deploymentStrategy;
+ this.servletContext=deploymentStrategy.getServletContext();
ClassFile.class.getPackage(); //to force loading of javassist, throwing an
exception if it is missing
}
-
+ @Deprecated
protected AbstractScanner()
{
-
+ this.servletContext=ServletLifecycle.getCurrentServletContext();
}
+ protected AbstractScanner(ServletContext servletContext)
+ {
+ this.servletContext=servletContext;
+ }
+
protected static boolean hasAnnotations(ClassFile classFile, Set<Class<? extends
Annotation>> annotationTypes)
{
if (annotationTypes.size() > 0)
@@ -209,7 +222,7 @@
protected boolean handle(String name)
{
- return new Handler(name, deploymentStrategy.getDeploymentHandlers().entrySet(),
deploymentStrategy.getClassLoader()).handle();
+ return new Handler(name, deploymentStrategy.getDeploymentHandlers().entrySet(),
deploymentStrategy.getClassLoader(),servletContext).handle();
}
public void scanDirectories(File[] directories, File[] excludedDirectories)
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ClassDescriptor.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ClassDescriptor.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ClassDescriptor.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -2,6 +2,8 @@
import java.net.URL;
+import javax.servlet.ServletContext;
+
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
@@ -18,9 +20,9 @@
this.clazz = clazz;
}
- public ClassDescriptor(String name, ClassLoader classLoader)
+ public ClassDescriptor(String name, ClassLoader classLoader,ServletContext
servletContext)
{
- super(name, classLoader);
+ super(name, classLoader,servletContext);
String classname = filenameToClassname(name);
log.trace("Trying to load class " + classname);
try
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/DeploymentStrategy.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/DeploymentStrategy.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/DeploymentStrategy.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -9,6 +9,8 @@
import java.util.Map;
import java.util.Map.Entry;
+import javax.servlet.ServletContext;
+
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
@@ -65,6 +67,11 @@
* Get the classloader to use
*/
public abstract ClassLoader getClassLoader();
+
+ /**
+ * Get the ServletContext to use
+ */
+ public abstract ServletContext getServletContext();
/**
* Get (or modify) any registered {@link DeploymentHandler}s
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/FileDescriptor.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/FileDescriptor.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/FileDescriptor.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -2,6 +2,8 @@
import java.net.URL;
+import javax.servlet.ServletContext;
+
import org.jboss.seam.contexts.ServletLifecycle;
import org.jboss.seam.util.Resources;
@@ -17,18 +19,26 @@
this.url = url;
}
- public FileDescriptor(String name, ClassLoader classLoader)
+ public FileDescriptor(String name, ClassLoader classLoader,ServletContext
servletContext)
{
+ ServletContext ctx = servletContext;
+ if(ctx == null)
+ {
+ //this should not happen but it could if people have created custom scanners
+ ctx = ServletLifecycle.getCurrentServletContext();
+ }
this.name = name;
if (name == null)
{
throw new NullPointerException("Name cannot be null, loading from " +
classLoader);
}
- this.url = classLoader.getResource(name);
+ this.url = Resources.getResource(name, ctx);
+
if (url == null)
{
- this.url = Resources.getResource(name, ServletLifecycle.getServletContext());
+ this.url = classLoader.getResource(name);
}
+
if (this.url == null)
{
throw new NullPointerException("Cannot find URL from classLoader for "
+ name + ", loading from " + classLoader);
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ForwardingAbstractScanner.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ForwardingAbstractScanner.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ForwardingAbstractScanner.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -2,7 +2,9 @@
import java.io.File;
+import javax.servlet.ServletContext;
+
public abstract class ForwardingAbstractScanner extends AbstractScanner
{
@@ -54,4 +56,16 @@
protected abstract AbstractScanner delegate();
+ @Deprecated
+ public ForwardingAbstractScanner()
+ {
+
+ }
+
+
+ public ForwardingAbstractScanner(ServletContext servletContext)
+ {
+ super(servletContext);
+ }
+
}
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ForwardingDeploymentStrategy.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ForwardingDeploymentStrategy.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/ForwardingDeploymentStrategy.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -4,6 +4,8 @@
import java.util.List;
import java.util.Map;
+import javax.servlet.ServletContext;
+
/**
* A decorator for DeploymentStrategy
*
@@ -18,6 +20,12 @@
{
return delegate().getClassLoader();
}
+
+ @Override
+ public ServletContext getServletContext()
+ {
+ return delegate().getServletContext();
+ }
@Override
protected String getDeploymentHandlersKey()
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/GroovyHotDeploymentStrategy.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/GroovyHotDeploymentStrategy.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/GroovyHotDeploymentStrategy.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -7,6 +7,8 @@
import java.util.HashSet;
import java.util.Set;
+import javax.servlet.ServletContext;
+
import org.codehaus.groovy.control.CompilerConfiguration;
@@ -31,9 +33,9 @@
* groovy Seam components are placed
*
*/
- public GroovyHotDeploymentStrategy(ClassLoader classLoader, File hotDeployDirectory,
boolean enabled)
+ public GroovyHotDeploymentStrategy(ClassLoader classLoader, File hotDeployDirectory,
ServletContext servletContext, boolean enabled)
{
- super(classLoader, hotDeployDirectory, enabled);
+ super(classLoader, hotDeployDirectory,servletContext, enabled);
if (enabled)
{
groovyDeploymentHandler = new
GroovyDeploymentHandler(DEFAULT_SCRIPT_EXTENSION);
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -9,6 +9,8 @@
import java.util.Map;
import java.util.Set;
+import javax.servlet.ServletContext;
+
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.util.Reflections;
@@ -54,15 +56,18 @@
private ClassLoader classLoader;
+ private ServletContext servletContext;
+
/**
* @param classLoader The parent classloader of the hot deployment classloader
* @param hotDeployDirectory The directory in which hot deployable Seam
* components are placed
*/
- public HotDeploymentStrategy(ClassLoader classLoader, File hotDeployDirectory, boolean
enabled)
+ public HotDeploymentStrategy(ClassLoader classLoader, File hotDeployDirectory,
ServletContext servletContext, boolean enabled)
{
if (enabled)
{
+ this.servletContext=servletContext;
this.classLoader = Thread.currentThread().getContextClassLoader();
if (hotDeployDirectory != null && hotDeployDirectory.exists())
{
@@ -140,13 +145,13 @@
* @param hotDeployDirectory The directory which contains hot deployable
* Seam components
*/
- public static HotDeploymentStrategy createInstance(String className, ClassLoader
classLoader, File hotDeployDirectory, boolean enabled)
+ public static HotDeploymentStrategy createInstance(String className, ClassLoader
classLoader, File hotDeployDirectory, ServletContext servletContext, boolean enabled)
{
try
{
Class initializer = Reflections.classForName(className);
- Constructor ctr = initializer.getConstructor(ClassLoader.class, File.class,
boolean.class);
- return (HotDeploymentStrategy) ctr.newInstance(classLoader, hotDeployDirectory,
enabled);
+ Constructor ctr = initializer.getConstructor(ClassLoader.class, File.class,
ServletContext.class, boolean.class);
+ return (HotDeploymentStrategy) ctr.newInstance(classLoader, hotDeployDirectory,
servletContext, enabled);
}
catch (Exception e)
{
@@ -188,5 +193,11 @@
}
return null;
}
+
+ @Override
+ public ServletContext getServletContext()
+ {
+ return servletContext;
+ }
}
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/StandardDeploymentStrategy.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/StandardDeploymentStrategy.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/StandardDeploymentStrategy.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -6,6 +6,8 @@
import java.util.Map;
import java.util.Set;
+import javax.servlet.ServletContext;
+
import org.jboss.seam.contexts.Contexts;
/**
@@ -20,6 +22,8 @@
private ClassLoader classLoader;
+ private ServletContext servletContext;
+
/**
* The files used to identify a Seam archive
*/
@@ -45,12 +49,14 @@
private AnnotationDeploymentHandler annotationDeploymentHandler;
private DotComponentDotXmlDeploymentHandler dotComponentDotXmlDeploymentHandler;
+
/**
* @param classLoader The classloader used to load and handle resources
*/
- public StandardDeploymentStrategy(ClassLoader classLoader)
+ public StandardDeploymentStrategy(ClassLoader classLoader,ServletContext
servletContext)
{
this.classLoader = Thread.currentThread().getContextClassLoader();
+ this.servletContext=servletContext;
componentDeploymentHandler = new ComponentDeploymentHandler();
getDeploymentHandlers().put(ComponentDeploymentHandler.NAME,
componentDeploymentHandler);
componentsXmlDeploymentHandler = new ComponentsXmlDeploymentHandler();
@@ -123,4 +129,10 @@
}
return null;
}
+
+ @Override
+ public ServletContext getServletContext()
+ {
+ return servletContext;
+ }
}
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/TimestampCheckForwardingDeploymentStrategy.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/TimestampCheckForwardingDeploymentStrategy.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/TimestampCheckForwardingDeploymentStrategy.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -22,7 +22,7 @@
if (getScanner() instanceof AbstractScanner)
{
final AbstractScanner delegate = (AbstractScanner) getScanner();
- this.scanner = new TimestampScanner()
+ this.scanner = new TimestampScanner(getServletContext())
{
@Override
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/TimestampScanner.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/TimestampScanner.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/TimestampScanner.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -1,5 +1,7 @@
package org.jboss.seam.deployment;
+import javax.servlet.ServletContext;
+
/**
* A no-op version of the URLScanner that merely returns whether the deployment
* handler would in fact handle this file. It does not process the file
@@ -32,5 +34,17 @@
}
return false;
}
+
+ @Deprecated
+ public TimestampScanner()
+ {
+
+ }
+
+
+ public TimestampScanner(ServletContext servletContext)
+ {
+ super(servletContext);
+ }
}
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -3,6 +3,8 @@
import java.io.File;
import java.util.Set;
+import javax.servlet.ServletContext;
+
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
@@ -20,6 +22,8 @@
private ClassLoader classLoader;
+ private ServletContext servletContext;
+
private File[] warRoot;
private File[] excludedDirectories;
@@ -32,14 +36,15 @@
private PagesDotXmlDeploymentHandler pagesDotXmlDeploymentHandler;
- public WarRootDeploymentStrategy(ClassLoader classLoader, File warRoot)
+ public WarRootDeploymentStrategy(ClassLoader classLoader, File warRoot,ServletContext
servletContext)
{
- this(classLoader, warRoot, new File[0]);
+ this(classLoader, warRoot,servletContext, new File[0]);
}
- public WarRootDeploymentStrategy(ClassLoader classLoader, File warRoot, File[]
excludedDirectories)
+ public WarRootDeploymentStrategy(ClassLoader classLoader, File warRoot,ServletContext
servletContext, File[] excludedDirectories)
{
this.classLoader = classLoader;
+ this.servletContext = servletContext;
this.warRoot = new File[1];
this.excludedDirectories = excludedDirectories;
if (warRoot != null)
@@ -88,4 +93,10 @@
return dotPageDotXmlDeploymentHandler.getResources();
}
+ @Override
+ public ServletContext getServletContext()
+ {
+ return servletContext;
+ }
+
}
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java
===================================================================
---
branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/main/org/jboss/seam/init/Initialization.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -61,6 +61,7 @@
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.navigation.Pages;
+import org.jboss.seam.servlet.ServletApplicationMap;
import org.jboss.seam.util.Conversions;
import org.jboss.seam.util.Naming;
import org.jboss.seam.util.Reflections;
@@ -128,7 +129,7 @@
public Initialization create()
{
- standardDeploymentStrategy = new
StandardDeploymentStrategy(Thread.currentThread().getContextClassLoader());
+ standardDeploymentStrategy = new
StandardDeploymentStrategy(Thread.currentThread().getContextClassLoader(),servletContext);
standardDeploymentStrategy.scan();
addNamespaces();
initComponentsFromXmlDocument("/WEB-INF/components.xml");
@@ -715,7 +716,7 @@
// Add the war root deployment
warRootDeploymentStrategy = new WarRootDeploymentStrategy(
- Thread.currentThread().getContextClassLoader(), warRoot, new File[] {
warClassesDirectory, warLibDirectory, hotDeployDirectory });
+ Thread.currentThread().getContextClassLoader(), warRoot,servletContext, new
File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
Contexts.getEventContext().set(WarRootDeploymentStrategy.NAME,
warRootDeploymentStrategy);
warRootDeploymentStrategy.scan();
init.setWarTimestamp(System.currentTimeMillis());
@@ -744,7 +745,7 @@
public void redeploy(HttpServletRequest request) throws InterruptedException
{
- redeploy(request, (Init) ServletLifecycle.getServletContext().getAttribute(
Seam.getComponentName(Init.class) ));
+ redeploy(request, (Init) servletContext.getAttribute(
Seam.getComponentName(Init.class) ));
}
public void redeploy(HttpServletRequest request, Init init) throws
InterruptedException
@@ -805,7 +806,7 @@
ServletLifecycle.endReinitialization();
}
- final WarRootDeploymentStrategy warRootDeploymentStrategy = new
WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot, new
File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
+ final WarRootDeploymentStrategy warRootDeploymentStrategy = new
WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot,
servletContext, new File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
changed = new TimestampCheckForwardingDeploymentStrategy()
{
@Override
@@ -854,12 +855,12 @@
if (isGroovyPresent())
{
log.debug("Using Java + Groovy hot deploy");
- return
HotDeploymentStrategy.createInstance("org.jboss.seam.deployment.GroovyHotDeploymentStrategy",
classLoader, hotDeployDirectory, hotDeployEnabled);
+ return
HotDeploymentStrategy.createInstance("org.jboss.seam.deployment.GroovyHotDeploymentStrategy",
classLoader, hotDeployDirectory, servletContext, hotDeployEnabled);
}
else
{
log.debug("Using Java hot deploy");
- return new HotDeploymentStrategy(classLoader, hotDeployDirectory,
hotDeployEnabled);
+ return new HotDeploymentStrategy(classLoader, hotDeployDirectory,
servletContext, hotDeployEnabled);
}
}
Modified: branches/community/Seam_2_2/src/remoting/org/jboss/seam/remoting/Remoting.java
===================================================================
---
branches/community/Seam_2_2/src/remoting/org/jboss/seam/remoting/Remoting.java 2010-01-26
12:11:29 UTC (rev 11991)
+++
branches/community/Seam_2_2/src/remoting/org/jboss/seam/remoting/Remoting.java 2010-01-26
13:48:08 UTC (rev 11992)
@@ -68,7 +68,7 @@
{
try
{
- ServletLifecycle.beginRequest(request);
+ ServletLifecycle.beginRequest(request,getServletContext());
StringBuilder sb = new StringBuilder();
sb.append("\nSeam.Remoting.resourcePath = \"");