Author: rwesten
Date: Sat Jun 30 12:00:08 2012
New Revision: 1355715

URL: http://svn.apache.org/viewvc?rev=1355715&view=rev
Log:
STANBOL-669 and STANBOL-670: The multi threaded test util required to upgrade 
to apache commons http utilitis 4.2. This also required to update test module 
dependencies

Modified:
    incubator/stanbol/trunk/commons/testing/http/pom.xml
    
incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java
    
incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/ServletContextMock.java
    incubator/stanbol/trunk/commons/testing/stanbol/pom.xml
    
incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java
    incubator/stanbol/trunk/entityhub/generic/core/pom.xml
    incubator/stanbol/trunk/entityhub/generic/test/pom.xml
    
incubator/stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
    incubator/stanbol/trunk/launchers/full/pom.xml
    incubator/stanbol/trunk/parent/pom.xml

Modified: incubator/stanbol/trunk/commons/testing/http/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/testing/http/pom.xml?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- incubator/stanbol/trunk/commons/testing/http/pom.xml (original)
+++ incubator/stanbol/trunk/commons/testing/http/pom.xml Sat Jun 30 12:00:08 
2012
@@ -48,38 +48,32 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpcore</artifactId>
-      <version>4.0.1</version>
+      <artifactId>httpcore-osgi</artifactId>
       <scope>compile</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.httpcomponents</groupId>
-      <artifactId>httpclient</artifactId>
-      <version>4.0.1</version>
+        <groupId>org.apache.httpcomponents</groupId>
+        <artifactId>httpclient-osgi</artifactId>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.7</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
-      <version>2.0.1</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
-      <version>2.4</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>org.osgi</groupId>
       <artifactId>org.osgi.core</artifactId>
-      <version>4.1.0</version>
       <scope>compile</scope>
     </dependency>
   </dependencies>

Modified: 
incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java
 (original)
+++ 
incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/RequestExecutor.java
 Sat Jun 30 12:00:08 2012
@@ -115,7 +115,7 @@ public class RequestExecutor {
             // And add request interceptor to have preemptive authentication
             httpClient.addRequestInterceptor(new PreemptiveAuthInterceptor(), 
0);
         } else {
-            httpClient.getCredentialsProvider().setCredentials(AuthScope.ANY, 
null);
+            
//httpClient.getCredentialsProvider().setCredentials(AuthScope.ANY, null);
             
httpClient.removeRequestInterceptorByClass(PreemptiveAuthInterceptor.class);
         }
 

Modified: 
incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/ServletContextMock.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/ServletContextMock.java?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/ServletContextMock.java
 (original)
+++ 
incubator/stanbol/trunk/commons/testing/http/src/main/java/org/apache/stanbol/commons/testing/http/ServletContextMock.java
 Sat Jun 30 12:00:08 2012
@@ -62,112 +62,96 @@ public class ServletContextMock implemen
     }
 
     public ServletContext getContext(String uripath) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public String getInitParameter(String name) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public Enumeration getInitParameterNames() {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public int getMajorVersion() {
-        // TODO Auto-generated method stub
-        return 0;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public String getMimeType(String file) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public int getMinorVersion() {
-        // TODO Auto-generated method stub
-        return 0;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public RequestDispatcher getNamedDispatcher(String name) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public String getRealPath(String path) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public RequestDispatcher getRequestDispatcher(String path) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public URL getResource(String path) throws MalformedURLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public InputStream getResourceAsStream(String path) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public Set getResourcePaths(String path) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public String getServerInfo() {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public Servlet getServlet(String name) throws ServletException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public String getServletContextName() {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public Enumeration getServletNames() {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public Enumeration getServlets() {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public void log(String msg) {
-    // TODO Auto-generated method stub
-
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public void log(Exception exception, String msg) {
-    // TODO Auto-generated method stub
-
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public void log(String message, Throwable throwable) {
-    // TODO Auto-generated method stub
-
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public void removeAttribute(String name) {
-    // TODO Auto-generated method stub
-
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
     }
 
     public void setAttribute(String name, Object object) {
         this.putAttribute(name, object);
     }
 
+    @Override
+    public String getContextPath() {
+        throw new UnsupportedOperationException("not included in the mock 
implementation");
+    }
+
 }

Modified: incubator/stanbol/trunk/commons/testing/stanbol/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/testing/stanbol/pom.xml?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- incubator/stanbol/trunk/commons/testing/stanbol/pom.xml (original)
+++ incubator/stanbol/trunk/commons/testing/stanbol/pom.xml Sat Jun 30 12:00:08 
2012
@@ -54,7 +54,7 @@
     <dependency>
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.commons.testing.http</artifactId>
-      <version>0.9.0-incubating</version>
+      <version>0.10.0-incubating-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
     <dependency>

Modified: 
incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java
 (original)
+++ 
incubator/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/JerseyEndpoint.java
 Sat Jun 30 12:00:08 2012
@@ -148,12 +148,14 @@ public class JerseyEndpoint {
     private synchronized void initJersey() throws NamespaceException, 
ServletException {
 
         if (componentContext == null) {
-            throw new IllegalStateException("Null ComponentContext, not 
activated?");
+            log.debug(" ... can not init Jersey Endpoint - Component not yet 
activated!");
+            //throw new IllegalStateException("Null ComponentContext, not 
activated?");
+            return;
         }
 
         shutdownJersey();
 
-        log.info("Initializing the Jersey subsystem");
+        log.info("(Re)initializing the Stanbol Jersey subsystem");
 
         // register all the JAX-RS resources into a a JAX-RS application and 
bind it to a configurable URL
         // prefix
@@ -167,7 +169,7 @@ public class JerseyEndpoint {
         List<ScriptResource> scriptResources = new ArrayList<ScriptResource>();
         List<NavigationLink> navigationLinks = new ArrayList<NavigationLink>();
         for (WebFragment fragment : webFragments) {
-            log.info("Registering web fragment '{}' into jaxrs application", 
fragment.getName());
+            log.debug("Registering web fragment '{}' into jaxrs application", 
fragment.getName());
             linkResources.addAll(fragment.getLinkResources());
             scriptResources.addAll(fragment.getScriptResources());
             navigationLinks.addAll(fragment.getNavigationLinks());
@@ -213,7 +215,7 @@ public class JerseyEndpoint {
 
     /** Shutdown Jersey, if there's anything to do */
     private synchronized void shutdownJersey() {
-        log.info("Unregistering aliases {}", registeredAliases);
+        log.debug("Unregistering aliases {}", registeredAliases);
         for (String alias : registeredAliases) {
             httpService.unregister(alias);
         }

Modified: incubator/stanbol/trunk/entityhub/generic/core/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/generic/core/pom.xml?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/generic/core/pom.xml (original)
+++ incubator/stanbol/trunk/entityhub/generic/core/pom.xml Sat Jun 30 12:00:08 
2012
@@ -134,7 +134,7 @@
     <dependency>
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.entityhub.test</artifactId>
-      <version>0.9.0-incubating</version>
+      <version>0.10.1-incubating-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: incubator/stanbol/trunk/entityhub/generic/test/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/generic/test/pom.xml?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/generic/test/pom.xml (original)
+++ incubator/stanbol/trunk/entityhub/generic/test/pom.xml Sat Jun 30 12:00:08 
2012
@@ -65,7 +65,7 @@
     <dependency>
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.commons.testing.stanbol</artifactId>
-      <version>0.9.0-incubating</version>
+      <version>0.10.0-incubating-SNAPSHOT</version>
     </dependency>
 
     <dependency>

Modified: 
incubator/stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
 (original)
+++ 
incubator/stanbol/trunk/launchers/bundlelists/stanbolcommons/src/main/bundles/list.xml
 Sat Jun 30 12:00:08 2012
@@ -119,7 +119,7 @@
     <bundle>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpcore-osgi</artifactId>
-      <version>4.1.4</version>
+      <version>4.2</version>
     </bundle>
     <bundle> <!-- Bundle for org.json -->
         <!-- this bundle was suggested in the release vote of felix.webconsole 
4.0.0 -->

Modified: incubator/stanbol/trunk/launchers/full/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/pom.xml?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full/pom.xml (original)
+++ incubator/stanbol/trunk/launchers/full/pom.xml Sat Jun 30 12:00:08 2012
@@ -166,14 +166,14 @@
       <scope>provided</scope>
     </dependency>
     
-    <!-- zz> Shell Bundle List -->
+    <!-- zz> Shell Bundle List 
     <dependency>
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.launchers.bundlelists.zzshell</artifactId>
       <version>0.10.0-incubating-SNAPSHOT</version>
       <type>partialbundlelist</type>
       <scope>provided</scope>
-    </dependency>
+    </dependency> -->
 
     <!-- Stanbol CMS Adapter Bundle List -->
     <dependency>

Modified: incubator/stanbol/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/parent/pom.xml?rev=1355715&r1=1355714&r2=1355715&view=diff
==============================================================================
--- incubator/stanbol/trunk/parent/pom.xml (original)
+++ incubator/stanbol/trunk/parent/pom.xml Sat Jun 30 12:00:08 2012
@@ -712,17 +712,17 @@
       <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpclient-osgi</artifactId>
-        <version>4.1.3</version>
+        <version>4.2</version>
       </dependency>
       <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpcore-osgi</artifactId>
-        <version>4.1.4</version>
+        <version>4.2</version>
       </dependency>
       <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpmime</artifactId>
-        <version>4.1.2</version>
+        <version>4.2</version>
       </dependency>
 
       <!-- Joda Time -->


Reply via email to