Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lps 72500 http session activation listener #12

Open
wants to merge 73 commits into
base: R4_5_maintenance
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b3f9954
Bug 485234 - [http whiteboard] FilterRegistration objects are not
tjwatson Jan 5, 2016
517a1c7
Bug 479396 - deadlock in class loading when deploying at startup
tjwatson Jan 12, 2016
12f3589
Bug 479396 - deadlock in class loading when deploying at startup
tjwatson Jan 13, 2016
f68ccdc
Bug 479124 - [http] Mars SR1 version of org.eclipse.equinox.http.jett…
rotty3000 Jan 14, 2016
6e77967
Bug 479124 - increment version for Mars SR1
tjwatson Jan 15, 2016
2d1f245
Bug 485532 - [http whiteboard] Only invoke requestInitialized when di…
Jan 11, 2016
0c1dc7f
Bug 486616 - Mars.2 features and bundles that need a service increase
tjwatson Jan 28, 2016
106b27b
Bug 486412 - [http whiteboard] Implement better equality (merged from…
rotty3000 Feb 2, 2016
869d71b
Bug 429620 - What is up with org.eclipse.equinox.http.servlet.tests
rotty3000 Mar 10, 2016
b4d36da
Bug 472479 - [http whiteboard] Proxy servlet not properly initialized.
tjwatson Aug 3, 2015
c5aad48
Bug 474714 - [http whiteboard] regression in accessing parent
tjwatson Aug 11, 2015
a7fa956
Bug 476046 - [http servlet] improve debug-ability and general cleanup
rotty3000 Aug 27, 2015
23f9b7f
Bug 476046 - [http servlet] cleanup
rotty3000 Aug 27, 2015
eb37366
Bug 476051 - [http servlet] rename HttpServletRequestBuilderWrapperIm…
rotty3000 Aug 27, 2015
aaf9f7a
Bug 476060 - [http servlet] use Servlet API constants for dispatcher …
rotty3000 Aug 27, 2015
02458b4
Bug 476808 - [http servlet] not properly handling null parameters in …
rotty3000 Sep 7, 2015
089b359
Bug 485466 - [http whiteboard] HttpContext attributes are not used
tjwatson Jan 8, 2016
e539928
Bug 487944 - [http whiteboard] name only servlets are not supported i…
rotty3000 Feb 17, 2016
63f1aba
Bug 476046 - [http servlet] compat with branch
rotty3000 Mar 10, 2016
fea9c2e
Bug 488191 - Clean request attributes after dispatch
csierra Feb 22, 2016
d0528a4
Bug 429620 - What is up with org.eclipse.equinox.http.servlet.tests
rotty3000 Feb 18, 2016
aba4263
Bug 487944 - [http whiteboard] name only servlets are not supported i…
rotty3000 Feb 17, 2016
f97f124
Bug 470518 - Replace `new Boolean` with `Boolean.valueOf`
alblue Jun 18, 2015
cf1b748
fix debug
rotty3000 Feb 21, 2016
c26880e
Bug 476069 - [http servlet] just tests
rotty3000 Mar 25, 2016
2409bd8
Bug 476069 - [http servlet] various dispatching fixes including named
rotty3000 Mar 29, 2016
9738d16
Bug 476069 - [http servlet] fix error handling
rotty3000 Mar 29, 2016
b2c2f9d
Revert "Bug 429620 - What is up with org.eclipse.equinox.http.servlet…
rotty3000 Mar 30, 2016
1113945
Bug 490644 [http whiteboard] Pass attribute to parent httpSession if …
Mar 30, 2016
4eefff8
Bug 490638 [http whiteboard] Catch exceptions when invoking listener …
Mar 29, 2016
16426da
Bug 476069 - [http servlet] various dispatching fixes including named…
rotty3000 Apr 1, 2016
c06bb01
LPS-66801 HttpSessionAdaptor
shuyangzhou Jun 24, 2016
d877b97
LPS-66813 Make threadlocal static
mtambara Jun 24, 2016
e39933e
LPS-66813 Only create threadlocal for methods that use it
mtambara Jun 24, 2016
edd5368
LPS-66827 Avoid repeated simple name generation
shuyangzhou Jun 24, 2016
12a1175
LPS-66847 Better concurrency handling
shuyangzhou Jun 27, 2016
dd25d52
LPS-66847 Don't repeatedly create the same HttpSessionEvent
shuyangzhou Jun 27, 2016
f77fbdf
LPS-66847 Cache by session id
shuyangzhou Jun 27, 2016
94e335c
LPS-66881 Reuse objects rather than create new ones
mtambara Jun 28, 2016
eb6d8cb
LPS-66881 Use Set instead of array
mtambara Jun 28, 2016
9a21542
LPS-66881 Pull out branching logic
mtambara Jun 28, 2016
6c8a301
LPS-66881 Remove duplicate getAttribute() calls
mtambara Jun 28, 2016
ce3111a
LPS-66903 In normal execution paths, DispatchTargets.toString() is ne…
shuyangzhou Jun 29, 2016
b35078b
LPS-66904 Cache EndpointRegistration's toString
mtambara Jun 29, 2016
7efed00
LPS-66908 Reuse DispatchTargets rather than constantly peek
mtambara Jun 29, 2016
d682850
LPS-66908 Reuse method
mtambara Jun 29, 2016
6abbd98
LPS-66911 Better concurrency handling for inner sessions tracking.
shuyangzhou Jun 29, 2016
aab7a09
LPS-66911 The ParentSessionListener is added as outter session's attr…
shuyangzhou Jun 29, 2016
f2c5790
LPS-66911 Only the concurrent adding needs to be protected, the readi…
shuyangzhou Jun 29, 2016
05be60b
LPS-66959 Use ReadWriteLock to optimzie reading paths in addReference…
shuyangzhou Jul 1, 2016
7d1c817
Revert "LPS-66959 Use ReadWriteLock to optimzie reading paths in addR…
rotty3000 Jul 6, 2016
7b4952e
Revert "LPS-66911 Only the concurrent adding needs to be protected, t…
rotty3000 Jul 6, 2016
c3c1dad
Revert "LPS-66911 The ParentSessionListener is added as outter sessio…
rotty3000 Jul 6, 2016
5f18296
Revert "LPS-66911 Better concurrency handling for inner sessions trac…
rotty3000 Jul 6, 2016
d06b84b
Revert "LPS-66908 Reuse method"
rotty3000 Jul 6, 2016
c192790
Revert "LPS-66908 Reuse DispatchTargets rather than constantly peek"
rotty3000 Jul 6, 2016
97e4aa1
Revert "LPS-66904 Cache EndpointRegistration's toString"
rotty3000 Jul 6, 2016
b6ed087
Revert "LPS-66903 In normal execution paths, DispatchTargets.toString…
rotty3000 Jul 6, 2016
8a477b0
Revert "LPS-66881 Remove duplicate getAttribute() calls"
rotty3000 Jul 6, 2016
4067cc0
Revert "LPS-66881 Pull out branching logic"
rotty3000 Jul 6, 2016
34eae6e
Revert "LPS-66881 Use Set instead of array"
rotty3000 Jul 6, 2016
e989636
Revert "LPS-66881 Reuse objects rather than create new ones"
rotty3000 Jul 6, 2016
7b0828c
Revert "LPS-66847 Cache by session id"
rotty3000 Jul 6, 2016
6c857b1
Revert "LPS-66847 Don't repeatedly create the same HttpSessionEvent"
rotty3000 Jul 6, 2016
35132c6
Revert "LPS-66847 Better concurrency handling"
rotty3000 Jul 6, 2016
80a4184
Revert "LPS-66827 Avoid repeated simple name generation"
rotty3000 Jul 6, 2016
36a2fb0
Revert "LPS-66813 Only create threadlocal for methods that use it"
rotty3000 Jul 6, 2016
f6cb1b4
Revert "LPS-66813 Make threadlocal static"
rotty3000 Jul 6, 2016
bbfc0a2
Revert "LPS-66801 HttpSessionAdaptor"
rotty3000 Jul 6, 2016
7ad0026
Bug 497435 - [http servlet] performance optimizations, CPU and memory
rotty3000 Jul 7, 2016
eb31291
bug 509100 - [http servlet] performance tuning
rotty3000 Jan 9, 2017
ce25858
Bug 510753 [http servlet] Invoke session listeners when unregistering…
juangon Jan 20, 2017
19c6a5f
LPS-72500 Add HttpSessionActivationListener
tinatian May 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public final Map getProperties(String locale) {
}
}
/* replace the container's lock with the application model's lock, that's the correct */
props.put(APPLICATION_LOCKED, new Boolean(locked[0]));
props.put(APPLICATION_LOCKED, Boolean.valueOf(locked[0]));
return props;
}

Expand Down Expand Up @@ -551,4 +551,4 @@ private static void validateValue(Map.Entry entry, Map copy) throws ApplicationE
}
throw new ApplicationException(ApplicationException.APPLICATION_INVALID_STARTUP_ARGUMENT, "The value for key \"" + entry.getKey() + "\" is an invalid type \"" + clazz.getName() + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ public boolean isProcessingNeeded() {
"ar".equals(language) || //$NON-NLS-1$
"fa".equals(language) || //$NON-NLS-1$
"ur".equals(language); //$NON-NLS-1$
processingNeeded = new Boolean(isBidi);
processingNeeded = Boolean.valueOf(isBidi);
} else {
processingNeeded = new Boolean(false);
processingNeeded = Boolean.FALSE;
}
}
return processingNeeded.booleanValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void testGoodConfigProperties() throws Exception {
dict.put("6", new Byte((byte) 1));
dict.put("7", new Short((short) 1));
dict.put("8", new Character('a'));
dict.put("9", new Boolean(true));
dict.put("9", Boolean.TRUE);
dict.put("10", new String[] {"x"});
dict.put("11", new Integer[] {new Integer(1)});
dict.put("12", new Long[] {new Long(1)});
Expand All @@ -61,7 +61,7 @@ public void testGoodConfigProperties() throws Exception {
dict.put("15", new Byte[] {new Byte((byte) 1)});
dict.put("16", new Short[] {new Short((short) 1)});
dict.put("17", new Character[] {new Character('a')});
dict.put("18", new Boolean[] {new Boolean(true)});
dict.put("18", new Boolean[] {Boolean.TRUE});
dict.put("19", new int[] {1});
dict.put("20", new long[] {1});
dict.put("21", new float[] {1});
Expand All @@ -80,7 +80,7 @@ public void testGoodConfigProperties() throws Exception {
v.add(new Byte((byte) 1));
v.add(new Short((short) 1));
v.add(new Character('a'));
v.add(new Boolean(true));
v.add(Boolean.TRUE);
dict.put("28", v);
Collection c = new ArrayList();
c.add(new String("x"));
Expand All @@ -91,7 +91,7 @@ public void testGoodConfigProperties() throws Exception {
c.add(new Byte((byte) 1));
c.add(new Short((short) 1));
c.add(new Character('a'));
c.add(new Boolean(true));
c.add(Boolean.TRUE);
dict.put("29", c);
} catch (IllegalArgumentException e) {
fail(e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-Name: %bundleName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.equinox.http.jetty
Bundle-Version: 3.1.1.qualifier
Bundle-Version: 3.1.2.qualifier
Bundle-Activator: org.eclipse.equinox.http.jetty.internal.Activator
Import-Package: javax.servlet;version="[2.6.0,4.0.0)",
javax.servlet.http;version="[2.6.0,4.0.0)",
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.equinox.http.jetty9/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.http.jetty</artifactId>
<version>3.1.1-SNAPSHOT</version>
<version>3.1.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2005, 2011 Cognos Incorporated, IBM Corporation and others.
* Copyright (c) 2005, 2016 Cognos Incorporated, IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -8,6 +8,7 @@
* Contributors:
* Cognos Incorporated - initial API and implementation
* IBM Corporation - bug fixes and enhancements
* Raymond Augé - bug fixes
*******************************************************************************/

package org.eclipse.equinox.http.jetty.internal;
Expand Down Expand Up @@ -42,6 +43,9 @@ public class Activator implements BundleActivator {
// (default threshold is "warn")
private static final String LOG_STDERR_THRESHOLD = "org.eclipse.equinox.http.jetty.log.stderr.threshold"; //$NON-NLS-1$

// Jetty will not have Servlet 3 multipart
private static final String SERVLET3_MULTIPART = "org.eclipse.equinox.http.jetty.servlet3.multipart"; //$NON-NLS-1$

// The staticServerManager is use by the start and stopServer methods and must be accessed in a static synchronized block
// to ensure it is correctly handled in terms of the bundle life-cycle.
private static HttpServerManager staticServerManager;
Expand All @@ -51,11 +55,16 @@ public class Activator implements BundleActivator {
private ServiceRegistration registration;

public void start(BundleContext context) throws Exception {
File jettyWorkDir = new File(context.getDataFile(""), JETTY_WORK_DIR); //$NON-NLS-1$
File jettyWorkDir = new File(context.getDataFile(""), JETTY_WORK_DIR); //$NON-NLS-1$
jettyWorkDir.mkdir();
EquinoxStdErrLog.setThresholdLogger(context.getProperty(LOG_STDERR_THRESHOLD));
httpServerManager = new HttpServerManager(jettyWorkDir);

String servlet3multipart = context.getProperty(SERVLET3_MULTIPART);
if ((servlet3multipart != null) && Boolean.valueOf(servlet3multipart).booleanValue()) {
httpServerManager.setServlet3multipart(Boolean.valueOf(servlet3multipart).booleanValue());
}

String autostart = context.getProperty(AUTOSTART);
if ((autostart == null || Boolean.valueOf(autostart).booleanValue()) && !isBundleActivationPolicyUsed(context)) {
Dictionary<String, Object> defaultSettings = createDefaultSettings(context);
Expand Down Expand Up @@ -108,7 +117,7 @@ private Dictionary<String, Object> createDefaultSettings(BundleContext context)

// HTTP Enabled (default is true)
String httpEnabledProperty = context.getProperty(PROPERTY_PREFIX + JettyConstants.HTTP_ENABLED);
Boolean httpEnabled = (httpEnabledProperty == null) ? Boolean.TRUE : new Boolean(httpEnabledProperty);
Boolean httpEnabled = (httpEnabledProperty == null) ? Boolean.TRUE : Boolean.valueOf(httpEnabledProperty);
defaultSettings.put(JettyConstants.HTTP_ENABLED, httpEnabled);

// HTTP Port
Expand All @@ -132,7 +141,7 @@ private Dictionary<String, Object> createDefaultSettings(BundleContext context)
defaultSettings.put(JettyConstants.HTTP_HOST, httpHost);

// HTTPS Enabled (default is false)
Boolean httpsEnabled = new Boolean(context.getProperty(PROPERTY_PREFIX + JettyConstants.HTTPS_ENABLED));
Boolean httpsEnabled = Boolean.valueOf(context.getProperty(PROPERTY_PREFIX + JettyConstants.HTTPS_ENABLED));
defaultSettings.put(JettyConstants.HTTPS_ENABLED, httpsEnabled);

if (httpsEnabled.booleanValue()) {
Expand Down Expand Up @@ -171,11 +180,11 @@ private Dictionary<String, Object> createDefaultSettings(BundleContext context)

String needclientauth = context.getProperty(PROPERTY_PREFIX + JettyConstants.SSL_NEEDCLIENTAUTH);
if (needclientauth != null)
defaultSettings.put(JettyConstants.SSL_NEEDCLIENTAUTH, new Boolean(needclientauth));
defaultSettings.put(JettyConstants.SSL_NEEDCLIENTAUTH, Boolean.valueOf(needclientauth));

String wantclientauth = context.getProperty(PROPERTY_PREFIX + JettyConstants.SSL_WANTCLIENTAUTH);
if (wantclientauth != null)
defaultSettings.put(JettyConstants.SSL_WANTCLIENTAUTH, new Boolean(wantclientauth));
defaultSettings.put(JettyConstants.SSL_WANTCLIENTAUTH, Boolean.valueOf(wantclientauth));

String protocol = context.getProperty(PROPERTY_PREFIX + JettyConstants.SSL_PROTOCOL);
if (protocol != null)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2013 IBM Corporation and others.
* Copyright (c) 2007, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Red Hat, Inc. - Jetty 9 adoption.
* Raymond Augé - bug fixes
*******************************************************************************/

package org.eclipse.equinox.http.jetty.internal;
Expand Down Expand Up @@ -42,6 +43,7 @@ public class HttpServerManager implements ManagedServiceFactory {

private Map<String, Server> servers = new HashMap<String, Server>();
private File workDir;
private boolean servlet3multipart = false;

public HttpServerManager(File workDir) {
this.workDir = workDir;
Expand Down Expand Up @@ -148,6 +150,10 @@ public synchronized void updated(String pid, @SuppressWarnings("rawtypes") Dicti
servers.put(pid, server);
}

public void setServlet3multipart(boolean servlet3multipart) {
this.servlet3multipart = servlet3multipart;
}

private ServerConnector createHttpsConnector(@SuppressWarnings("rawtypes") Dictionary dictionary, Server server, HttpConfiguration http_config) {
ServerConnector httpsConnector = null;
if (isHttpsEnabled(dictionary)) {
Expand Down Expand Up @@ -402,6 +408,10 @@ private static boolean deleteDirectory(File directory) {
}

private void setupMultiPartConfig(@SuppressWarnings("rawtypes") Dictionary dictionary, ServletHolder holder) {
if (!servlet3multipart) {
return;
}

MultipartConfigElement multipartConfigElement = new MultipartConfigElement(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$
holder.getRegistration().setMultipartConfig(multipartConfigElement);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void added(IExtension extension) {
initparams.put(paramName, paramValue);
}

boolean loadOnStartup = new Boolean(filterElement.getAttribute(LOAD_ON_STARTUP)).booleanValue();
boolean loadOnStartup = Boolean.valueOf(filterElement.getAttribute(LOAD_ON_STARTUP)).booleanValue();
if (loadOnStartup)
wrapper.setLoadOnStartup();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void added(IExtension extension) {
initparams.put(paramName, paramValue);
}

boolean loadOnStartup = new Boolean(servletElement.getAttribute(LOAD_ON_STARTUP)).booleanValue();
boolean loadOnStartup = Boolean.valueOf(servletElement.getAttribute(LOAD_ON_STARTUP)).booleanValue();
if (loadOnStartup)
wrapper.setLoadOnStartup();

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

59 changes: 59 additions & 0 deletions bundles/org.eclipse.equinox.http.servlet.tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 Raymond Augé and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php

Contributors:
Raymond Augé - initial implementation
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>tests-pom</artifactId>
<groupId>org.eclipse.equinox.bundles</groupId>
<version>4.5.2-SNAPSHOT</version>
<relativePath>../../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.http.servlet.tests</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>org.eclipse.core.jobs</id>
<versionRange>[3.7.0,3.8.0)</versionRange>
</requirement>
<requirement>
<type>eclipse-plugin</type>
<id>org.eclipse.equinox.ds</id>
<versionRange>1.4.0</versionRange>
</requirement>
<requirement>
<type>eclipse-plugin</type>
<id>org.eclipse.equinox.http.jetty</id>
<versionRange>[3.1.0,3.2.0)</versionRange>
</requirement>
<requirement>
<type>eclipse-plugin</type>
<id>org.eclipse.equinox.http.servlet</id>
<versionRange>[1.2.2,1.2.100)</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</build>
</project>

This file was deleted.

Loading