Author: germuska
Date: Thu Feb 10 19:16:04 2005
New Revision: 153329
URL: http://svn.apache.org/viewcvs?view=rev&rev=153329
Log:
Add 'release()' method to ActionContext; adjust constructor of
ServletActionContext so that it can be created without a ServletWebContext: we
could probably remove ServletWebContext from the API completely.
Modified:
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ServletActionContext.java
struts/core/trunk/src/share/org/apache/struts/chain/contexts/WebActionContext.java
Modified:
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java
URL:
http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java?view=diff&r1=153328&r2=153329
==============================================================================
---
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java
(original)
+++
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContext.java
Thu Feb 10 19:16:04 2005
@@ -49,6 +49,12 @@
// General Application Support
// -------------------------------
/**
+ * Signal to the instance that it will not be used any more, so that any
resources which should
+ * be cleaned up can be cleaned up.
+ */
+ void release();
+
+ /**
* <p>Return a <code>Map</code> of Application scoped values.</p>
*
* <p>This is implemented in analogy with the Application scope in
Modified:
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java
URL:
http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java?view=diff&r1=153328&r2=153329
==============================================================================
---
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java
(original)
+++
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ActionContextBase.java
Thu Feb 10 19:16:04 2005
@@ -93,6 +93,10 @@
// General Application Support
// -------------------------------
+ public void release() {
+ this.token = null;
+ };
+
public abstract Map getApplicationScope();
public abstract Map getRequestScope();
Modified:
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ServletActionContext.java
URL:
http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/contexts/ServletActionContext.java?view=diff&r1=153328&r2=153329
==============================================================================
---
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ServletActionContext.java
(original)
+++
struts/core/trunk/src/share/org/apache/struts/chain/contexts/ServletActionContext.java
Thu Feb 10 19:16:04 2005
@@ -39,8 +39,17 @@
super(context);
}
+ public ServletActionContext(ServletContext context, HttpServletRequest
request, HttpServletResponse response) {
+ this(new ServletWebContext(context, request, response));
+ }
+
protected ServletWebContext swcontext() {
return (ServletWebContext) this.getBaseContext();
+ }
+
+ public void release() {
+ this.swcontext().release();
+ super.release();
}
// -------------------------------
Modified:
struts/core/trunk/src/share/org/apache/struts/chain/contexts/WebActionContext.java
URL:
http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/contexts/WebActionContext.java?view=diff&r1=153328&r2=153329
==============================================================================
---
struts/core/trunk/src/share/org/apache/struts/chain/contexts/WebActionContext.java
(original)
+++
struts/core/trunk/src/share/org/apache/struts/chain/contexts/WebActionContext.java
Thu Feb 10 19:16:04 2005
@@ -38,6 +38,10 @@
return (WebContext) this.getBaseContext();
}
+ public void release() {
+ super.release();
+ }
+
public Map getApplicationScope()
{
return wcontext().getApplicationScope();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]