felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1802056 - in /felix/trunk/osgi-r7/http: api/ itest/ itest/src/test/java/org/apache/felix/http/itest/ jetty/ jetty/src/main/java/org/apache/felix/http/jetty/internal/
Date Sun, 16 Jul 2017 13:04:05 GMT
Author: cziegeler
Date: Sun Jul 16 13:04:04 2017
New Revision: 1802056

URL: http://svn.apache.org/viewvc?rev=1802056&view=rev
Log:
Remove api copy, sync Jetty changes

Removed:
    felix/trunk/osgi-r7/http/api/
Modified:
    felix/trunk/osgi-r7/http/itest/pom.xml
    felix/trunk/osgi-r7/http/itest/src/test/java/org/apache/felix/http/itest/BaseIntegrationTest.java
    felix/trunk/osgi-r7/http/jetty/pom.xml
    felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
    felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java

Modified: felix/trunk/osgi-r7/http/itest/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/itest/pom.xml?rev=1802056&r1=1802055&r2=1802056&view=diff
==============================================================================
--- felix/trunk/osgi-r7/http/itest/pom.xml (original)
+++ felix/trunk/osgi-r7/http/itest/pom.xml Sun Jul 16 13:04:04 2017
@@ -32,10 +32,10 @@
 
 	<properties>
 	    <felix.java.version>8</felix.java.version>
-		<pax.exam.version>4.4.0</pax.exam.version>
-		<pax.url.aether.version>2.4.1</pax.url.aether.version>
+		<pax.exam.version>4.11.0</pax.exam.version>
+		<pax.url.aether.version>2.5.2</pax.url.aether.version>
 		<http.servlet.api.version>1.1.2</http.servlet.api.version>
-		<http.jetty.version>3.4.3-R7-SNAPSHOT</http.jetty.version>
+		<http.jetty.version>3.4.5-R7-SNAPSHOT</http.jetty.version>
 	</properties>
 
     <build>
@@ -66,13 +66,13 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpcore-osgi</artifactId>
-            <version>4.3.2</version>
+            <version>4.4.6</version>
             <scope>provided</scope>
         </dependency>        
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient-osgi</artifactId>
-            <version>4.3.4</version>
+            <version>4.5.3</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -118,7 +118,7 @@
         <dependency>
             <groupId>org.objenesis</groupId>
             <artifactId>objenesis</artifactId>
-            <version>2.1</version>
+            <version>2.6</version>
             <scope>test</scope>
         </dependency>
 
@@ -137,7 +137,7 @@
 		<dependency>
 			<groupId>org.apache.felix</groupId>
 			<artifactId>org.apache.felix.framework</artifactId>
-			<version>5.6.1</version>
+			<version>5.6.4</version>
 			<scope>test</scope>
 		</dependency>
 	</dependencies>

Modified: felix/trunk/osgi-r7/http/itest/src/test/java/org/apache/felix/http/itest/BaseIntegrationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/itest/src/test/java/org/apache/felix/http/itest/BaseIntegrationTest.java?rev=1802056&r1=1802055&r2=1802056&view=diff
==============================================================================
--- felix/trunk/osgi-r7/http/itest/src/test/java/org/apache/felix/http/itest/BaseIntegrationTest.java
(original)
+++ felix/trunk/osgi-r7/http/itest/src/test/java/org/apache/felix/http/itest/BaseIntegrationTest.java
Sun Jul 16 13:04:04 2017
@@ -247,7 +247,7 @@ public abstract class BaseIntegrationTes
 
     protected static Dictionary<String, ?> createDictionary(Object... entries)
     {
-        Dictionary<String, Object> props = new Hashtable<String, Object>();
+        Dictionary<String, Object> props = new Hashtable<>();
         for (int i = 0; i < entries.length; i += 2)
         {
             String key = (String) entries[i];
@@ -325,21 +325,21 @@ public abstract class BaseIntegrationTes
                 mavenBundle("org.apache.geronimo.specs", "geronimo-json_1.0_spec", "1.0-alpha-1").startLevel(START_LEVEL_SYSTEM_BUNDLES),
                 mavenBundle("org.apache.johnzon", "johnzon-core", "1.0.0").startLevel(START_LEVEL_SYSTEM_BUNDLES),
 
+                mavenBundle("org.apache.felix", "org.apache.felix.configadmin").version("1.8.14").startLevel(START_LEVEL_SYSTEM_BUNDLES),
                 mavenBundle("org.apache.felix", "org.apache.felix.http.servlet-api", System.getProperty("http.servlet.api.version")).startLevel(START_LEVEL_SYSTEM_BUNDLES),
                 mavenBundle("org.apache.felix", ORG_APACHE_FELIX_HTTP_JETTY, System.getProperty("http.jetty.version")).startLevel(START_LEVEL_SYSTEM_BUNDLES),
                 mavenBundle("org.apache.felix", "org.apache.felix.http.whiteboard", "3.0.0").startLevel(START_LEVEL_SYSTEM_BUNDLES),
-                mavenBundle("org.apache.felix", "org.apache.felix.configadmin").version("1.8.8"),
 
-                mavenBundle("org.apache.httpcomponents", "httpcore-osgi", "4.3.2").startLevel(START_LEVEL_SYSTEM_BUNDLES),
-                mavenBundle("org.apache.httpcomponents", "httpclient-osgi", "4.3.4").startLevel(START_LEVEL_SYSTEM_BUNDLES),
+                mavenBundle("org.apache.httpcomponents", "httpcore-osgi", "4.4.6").startLevel(START_LEVEL_SYSTEM_BUNDLES),
+                mavenBundle("org.apache.httpcomponents", "httpclient-osgi", "4.5.3").startLevel(START_LEVEL_SYSTEM_BUNDLES),
                 mavenBundle("org.mockito", "mockito-all", "1.10.19").startLevel(START_LEVEL_SYSTEM_BUNDLES),
-                mavenBundle("org.objenesis", "objenesis", "2.1").startLevel(START_LEVEL_SYSTEM_BUNDLES),
+                mavenBundle("org.objenesis", "objenesis", "2.6").startLevel(START_LEVEL_SYSTEM_BUNDLES),
 
                 junitBundles(),
                 frameworkStartLevel(START_LEVEL_TEST_BUNDLE));
     }
 
-    private final Map<String, ServiceTracker<?, ?>> trackers = new HashMap<String,
ServiceTracker<?, ?>>();
+    private final Map<String, ServiceTracker<?, ?>> trackers = new HashMap<>();
 
     @Before
     public void setUp() throws Exception

Modified: felix/trunk/osgi-r7/http/jetty/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/jetty/pom.xml?rev=1802056&r1=1802055&r2=1802056&view=diff
==============================================================================
--- felix/trunk/osgi-r7/http/jetty/pom.xml (original)
+++ felix/trunk/osgi-r7/http/jetty/pom.xml Sun Jul 16 13:04:04 2017
@@ -28,7 +28,7 @@
 
     <name>Apache Felix Http Jetty</name>
     <artifactId>org.apache.felix.http.jetty</artifactId>
-    <version>3.4.3-R7-SNAPSHOT</version>
+    <version>3.4.5-R7-SNAPSHOT</version>
     <packaging>jar</packaging>
     
     <scm>
@@ -39,7 +39,7 @@
     
     <properties>
         <felix.java.version>8</felix.java.version>
-        <jetty.version>9.3.15.v20161220</jetty.version>
+        <jetty.version>9.3.20.v20170531</jetty.version>
     </properties>
 
     <build>
@@ -47,7 +47,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>3.2.0</version>
+                <version>3.3.0</version>
                 <configuration>
                     <instructions>
                     	<X-Jetty-Version>
@@ -87,7 +87,7 @@
                         	org.osgi.service.useradmin;resolution:=optional,
                             org.apache.felix.http.api;version="[2.0,2.1)",
                             org.osgi.service.http;version="[1.2.1,1.3)",
-                            org.osgi.service.http.context;version="[1.0,1.1)",
+                            org.osgi.service.http.context;version="[1.1,1.2)",
                             org.osgi.service.http.runtime;version="[1.0,1.1)",
                             org.osgi.service.http.runtime.dto;version="[1.1,1.2)",
                             *
@@ -188,7 +188,7 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.http.api</artifactId>
-            <version>3.0.1-R7-SNAPSHOT</version>
+            <version>3.0.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>

Modified: felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java?rev=1802056&r1=1802055&r2=1802056&view=diff
==============================================================================
--- felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
(original)
+++ felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
Sun Jul 16 13:04:04 2017
@@ -25,7 +25,6 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceFactory;
 import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.cm.ManagedServiceFactory;
 
 public final class JettyActivator extends AbstractHttpActivator
 {
@@ -39,7 +38,7 @@ public final class JettyActivator extend
     protected void doStart() throws Exception
     {
         super.doStart();
-        final Dictionary<String, Object> properties = new Hashtable<String, Object>();
+        final Dictionary<String, Object> properties = new Hashtable<>();
         properties.put(Constants.SERVICE_DESCRIPTION, "Metatype provider for Jetty Http Service");
         properties.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
         properties.put("metatype.pid", JettyService.PID);
@@ -63,7 +62,7 @@ public final class JettyActivator extend
         this.jetty = new JettyService(getBundleContext(), getHttpServiceController());
         this.jetty.start();
 
-        final Dictionary<String, Object> propertiesCustomizer = new Hashtable<String,
Object>();
+        final Dictionary<String, Object> propertiesCustomizer = new Hashtable<>();
         propertiesCustomizer.put(Constants.SERVICE_DESCRIPTION, "Load Balancer Customizer
Factory for Jetty Http Service");
         propertiesCustomizer.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
         loadBalancerCustomizerFactoryReg = this.getBundleContext().registerService(LoadBalancerCustomizerFactory.class,

Modified: felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java?rev=1802056&r1=1802055&r2=1802056&view=diff
==============================================================================
--- felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
(original)
+++ felix/trunk/osgi-r7/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
Sun Jul 16 13:04:04 2017
@@ -42,9 +42,9 @@ import javax.servlet.SessionTrackingMode
 import org.apache.felix.http.base.internal.HttpServiceController;
 import org.apache.felix.http.base.internal.logger.SystemLogger;
 import org.eclipse.jetty.http.HttpVersion;
+import org.eclipse.jetty.io.ConnectionStatistics;
 import org.eclipse.jetty.security.HashLoginService;
 import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.ConnectorStatistics;
 import org.eclipse.jetty.server.HttpConfiguration;
 import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.SecureRequestCustomizer;
@@ -54,6 +54,7 @@ import org.eclipse.jetty.server.SessionM
 import org.eclipse.jetty.server.SslConnectionFactory;
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.server.handler.StatisticsHandler;
+import org.eclipse.jetty.server.session.SessionHandler;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.util.component.AbstractLifeCycle;
@@ -111,7 +112,7 @@ public final class JettyService extends
         this.context = context;
         this.config = new JettyConfig(this.context);
         this.controller = controller;
-        this.deployments = new LinkedHashMap<String, Deployment>();
+        this.deployments = new LinkedHashMap<>();
         this.executor = Executors.newSingleThreadExecutor(new ThreadFactory()
         {
             @Override
@@ -139,13 +140,13 @@ public final class JettyService extends
         startJetty();
 
         if (this.registerManagedService) {
-			final Dictionary<String, Object> props = new Hashtable<String, Object>();
+			final Dictionary<String, Object> props = new Hashtable<>();
 			props.put(Constants.SERVICE_PID, PID);
 			this.configServiceReg = this.context.registerService("org.osgi.service.cm.ManagedService",
 			        new JettyManagedService(this), props);
         }
 
-        this.eventAdmintTracker = new ServiceTracker<EventAdmin, EventAdmin>(this.context,
EventAdmin.class,
+        this.eventAdmintTracker = new ServiceTracker<>(this.context, EventAdmin.class,
                 new ServiceTrackerCustomizer<EventAdmin, EventAdmin>()
         {
             @Override
@@ -171,7 +172,7 @@ public final class JettyService extends
         });
         this.eventAdmintTracker.open();
 
-        this.bundleTracker = new BundleTracker<Deployment>(this.context, Bundle.ACTIVE
| Bundle.STARTING,
+        this.bundleTracker = new BundleTracker<>(this.context, Bundle.ACTIVE | Bundle.STARTING,
                 new BundleTrackerCustomizer<Deployment>() {
 
             @Override
@@ -253,7 +254,7 @@ public final class JettyService extends
 
     private Hashtable<String, Object> getServiceProperties()
     {
-        Hashtable<String, Object> props = new Hashtable<String, Object>();
+        Hashtable<String, Object> props = new Hashtable<>();
         // Add some important configuration properties...
         this.config.setServiceProperties(props);
         addEndpointProperties(props, null);
@@ -340,7 +341,9 @@ public final class JettyService extends
 
             this.parent = new ContextHandlerCollection();
 
-            ServletContextHandler context = new ServletContextHandler(this.parent, this.config.getContextPath(),
ServletContextHandler.SESSIONS);
+            ServletContextHandler context = new ServletContextHandler(this.parent,
+                    this.config.getContextPath(),
+                    ServletContextHandler.SESSIONS);
 
             configureSessionManager(context);
             this.controller.getEventDispatcher().setActive(true);
@@ -559,7 +562,7 @@ public final class JettyService extends
 
         if (this.config.isRegisterMBeans())
         {
-            connector.addBean(new ConnectorStatistics());
+            connector.addBean(new ConnectionStatistics());
         }
     }
 
@@ -580,19 +583,18 @@ public final class JettyService extends
         //Changed from 8.x to 9.x
         //maxIdleTime -> ServerConnector.setIdleTimeout
         //requestBufferSize -> HttpConnectionFactory.setInputBufferSize
-        //statsOn -> ServerConnector.addBean(new ConnectorStatistics());
+        //statsOn -> ServerConnector.addBean(new ConnectionStatistics());
     }
 
     private void configureSessionManager(final ServletContextHandler context)
     {
-        final SessionManager manager = context.getSessionHandler().getSessionManager();
+        final SessionHandler sessionHandler = context.getSessionHandler();
+        sessionHandler.getSessionManager().setMaxInactiveInterval(this.config.getSessionTimeout()
* 60);
+        sessionHandler.getSessionManager().setSessionIdPathParameterName(this.config.getProperty(JettyConfig.FELIX_JETTY_SERVLET_SESSION_ID_PATH_PARAMETER_NAME,
SessionManager.__DefaultSessionIdPathParameterName));
+        sessionHandler.getSessionManager().setCheckingRemoteSessionIdEncoding(this.config.getBooleanProperty(JettyConfig.FELIX_JETTY_SERVLET_CHECK_REMOTE_SESSION_ENCODING,
true));
+        sessionHandler.getSessionManager().setSessionTrackingModes(Collections.singleton(SessionTrackingMode.COOKIE));
 
-        manager.setMaxInactiveInterval(this.config.getSessionTimeout() * 60);
-        manager.setSessionIdPathParameterName(this.config.getProperty(JettyConfig.FELIX_JETTY_SERVLET_SESSION_ID_PATH_PARAMETER_NAME,
SessionManager.__DefaultSessionIdPathParameterName));
-        manager.setCheckingRemoteSessionIdEncoding(this.config.getBooleanProperty(JettyConfig.FELIX_JETTY_SERVLET_CHECK_REMOTE_SESSION_ENCODING,
true));
-        manager.setSessionTrackingModes(Collections.singleton(SessionTrackingMode.COOKIE));
-
-        SessionCookieConfig cookieConfig = manager.getSessionCookieConfig();
+        final SessionCookieConfig cookieConfig = sessionHandler.getSessionManager().getSessionCookieConfig();
         cookieConfig.setName(this.config.getProperty(JettyConfig.FELIX_JETTY_SERVLET_SESSION_COOKIE_NAME,
SessionManager.__DefaultSessionCookie));
         cookieConfig.setDomain(this.config.getProperty(JettyConfig.FELIX_JETTY_SERVLET_SESSION_DOMAIN,
SessionManager.__DefaultSessionDomain));
         cookieConfig.setPath(this.config.getProperty(JettyConfig.FELIX_JETTY_SERVLET_SESSION_PATH,
context.getContextPath()));
@@ -677,7 +679,7 @@ public final class JettyService extends
 
     private List<String> getEndpoints(final Connector connector, final List<NetworkInterface>
interfaces)
     {
-        final List<String> endpoints = new ArrayList<String>();
+        final List<String> endpoints = new ArrayList<>();
         for (final NetworkInterface ni : interfaces)
         {
             final Enumeration<InetAddress> ias = ni.getInetAddresses();
@@ -696,7 +698,7 @@ public final class JettyService extends
 
     private void addEndpointProperties(final Hashtable<String, Object> props, Object
container)
     {
-        final List<String> endpoints = new ArrayList<String>();
+        final List<String> endpoints = new ArrayList<>();
 
         final Connector[] connectors = this.server.getConnectors();
         if (connectors != null)
@@ -709,8 +711,8 @@ public final class JettyService extends
                 {
                     try
                     {
-                        final List<NetworkInterface> interfaces = new ArrayList<NetworkInterface>();
-                        final List<NetworkInterface> loopBackInterfaces = new ArrayList<NetworkInterface>();
+                        final List<NetworkInterface> interfaces = new ArrayList<>();
+                        final List<NetworkInterface> loopBackInterfaces = new ArrayList<>();
                         final Enumeration<NetworkInterface> nis = NetworkInterface.getNetworkInterfaces();
                         while (nis.hasMoreElements())
                         {
@@ -817,7 +819,7 @@ public final class JettyService extends
                     JettyService.this.parent.addHandler(context);
                     context.start();
 
-                    Dictionary<String, Object> props = new Hashtable<String, Object>();
+                    Dictionary<String, Object> props = new Hashtable<>();
                     props.put(WEB_SYMBOLIC_NAME, webAppBundle.getSymbolicName());
                     props.put(WEB_VERSION, webAppBundle.getVersion());
                     props.put(WEB_CONTEXT_PATH, deployment.getContextPath());



Mime
View raw message