You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by es...@apache.org on 2007/02/21 23:55:19 UTC

svn commit: r510284 - in /portals/pluto/trunk/pluto-container: pom.xml src/main/java/org/apache/pluto/core/ContainerInvocation.java src/test/java/org/apache/pluto/core/ContainerInvocationTest.java

Author: esm
Date: Wed Feb 21 14:55:19 2007
New Revision: 510284

URL: http://svn.apache.org/viewvc?view=rev&rev=510284
Log:
[PLUTO-313]: Proposed workaround for the Java 1.5 specific InheritedThreadLocal.remove() method.  Includes testcase.

Added:
    portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java   (with props)
Modified:
    portals/pluto/trunk/pluto-container/pom.xml
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java

Modified: portals/pluto/trunk/pluto-container/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/pom.xml?view=diff&rev=510284&r1=510283&r2=510284
==============================================================================
--- portals/pluto/trunk/pluto-container/pom.xml (original)
+++ portals/pluto/trunk/pluto-container/pom.xml Wed Feb 21 14:55:19 2007
@@ -29,7 +29,12 @@
             <version>${pom.version}</version>
             <scope>runtime</scope>
         </dependency>
-
+        <dependency>
+            <groupId>org.apache.pluto</groupId>
+            <artifactId>pluto-portal-driver</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
         <!-- Other Support Libraries =========================================== -->
         <dependency>
             <groupId>commons-logging</groupId>

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java?view=diff&rev=510284&r1=510283&r2=510284
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java Wed Feb 21 14:55:19 2007
@@ -61,7 +61,7 @@
     }
 
     public static void clearInvocation() {
-        CONTAINERS.remove();
+        CONTAINERS.set(null);
     }
 
 

Added: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java?view=auto&rev=510284
==============================================================================
--- portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java (added)
+++ portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java Wed Feb 21 14:55:19 2007
@@ -0,0 +1,24 @@
+package org.apache.pluto.core;
+
+import junit.framework.TestCase;
+
+import org.apache.pluto.driver.core.PortletWindowImpl;
+
+public class ContainerInvocationTest extends TestCase
+{
+    private static PortletContainerImpl container = 
+        new PortletContainerImpl("test", null, null);
+    private static PortletWindowImpl window = 
+        new PortletWindowImpl(null, null);
+
+    public void testSetInvocation()
+    {
+        ContainerInvocation.setInvocation(container, window);
+    }
+
+    public void testClearInvocation()
+    {
+        ContainerInvocation.clearInvocation();
+    }
+
+}

Propchange: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
------------------------------------------------------------------------------
    svn:group = yes

Propchange: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
------------------------------------------------------------------------------
    svn:owner = yes

Propchange: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
------------------------------------------------------------------------------
    svn:text-time = yes

Propchange: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/ContainerInvocationTest.java
------------------------------------------------------------------------------
    svn:unix-mode = yes



Re: svn commit: r510284 - in /portals/pluto/trunk/pluto-container: pom.xml src/main/java/org/apache/pluto/core/ContainerInvocation.java src/test/java/org/apache/pluto/core/ContainerInvocationTest.java

Posted by "David H. DeWolf" <dd...@apache.org>.
I've reimplemented the test so it doesn't require this.  I'd rather 
leave the dependencies clear since the container's not really dependent. 
    check out what I'm about to commit and let me know what you think.


D

Elliot Metsger wrote:
> I didn't see that it causes a problem - it is scoped to test.
> 
> It was to support the ContainerInvoker test.  we can take it out if you 
> want.
> 
> David H. DeWolf wrote:
>> I'm assuming this change was a mistake?  It creates a cyclical 
>> dependency.  The container should NOT depend on the driver.
>>
>> esm@apache.org wrote:
>>
>>> -
>>> +        <dependency>
>>> +            <groupId>org.apache.pluto</groupId>
>>> +            <artifactId>pluto-portal-driver</artifactId>
>>> +            <version>${pom.version}</version>
>>> +            <scope>test</scope>
>>> +        </dependency>
>>>          <!-- Other Support Libraries 
>>> =========================================== -->
>>>          <dependency>
>>>              <groupId>commons-logging</groupId>
>>>
> 

Re: svn commit: r510284 - in /portals/pluto/trunk/pluto-container: pom.xml src/main/java/org/apache/pluto/core/ContainerInvocation.java src/test/java/org/apache/pluto/core/ContainerInvocationTest.java

Posted by Elliot Metsger <em...@jhu.edu>.
I didn't see that it causes a problem - it is scoped to test.

It was to support the ContainerInvoker test.  we can take it out if you 
want.

David H. DeWolf wrote:
> I'm assuming this change was a mistake?  It creates a cyclical 
> dependency.  The container should NOT depend on the driver.
> 
> esm@apache.org wrote:
> 
>> -
>> +        <dependency>
>> +            <groupId>org.apache.pluto</groupId>
>> +            <artifactId>pluto-portal-driver</artifactId>
>> +            <version>${pom.version}</version>
>> +            <scope>test</scope>
>> +        </dependency>
>>          <!-- Other Support Libraries 
>> =========================================== -->
>>          <dependency>
>>              <groupId>commons-logging</groupId>
>>

Re: svn commit: r510284 - in /portals/pluto/trunk/pluto-container: pom.xml src/main/java/org/apache/pluto/core/ContainerInvocation.java src/test/java/org/apache/pluto/core/ContainerInvocationTest.java

Posted by "David H. DeWolf" <dd...@apache.org>.
I'm assuming this change was a mistake?  It creates a cyclical 
dependency.  The container should NOT depend on the driver.

esm@apache.org wrote:

> -
> +        <dependency>
> +            <groupId>org.apache.pluto</groupId>
> +            <artifactId>pluto-portal-driver</artifactId>
> +            <version>${pom.version}</version>
> +            <scope>test</scope>
> +        </dependency>
>          <!-- Other Support Libraries =========================================== -->
>          <dependency>
>              <groupId>commons-logging</groupId>
>