Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit 16f8b8a

Browse files
japodGerrit Code Review
authored andcommitted
Merge "JERSEY-2496: "Permgen memory leak when deploy/undeploy multiple times" Used "destructive" create method on HK2 (2.3.0-b05) ServiceLocatorFactory. Direct dependency on ASM instead of HK2 repackaged version."
2 parents 67c874f + 6025fd8 commit 16f8b8a

File tree

13 files changed

+29
-29
lines changed

13 files changed

+29
-29
lines changed

bundles/jaxrs-ri/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@
144144
<scope>provided</scope>
145145
</dependency>
146146
<dependency>
147-
<groupId>org.glassfish.hk2.external</groupId>
148-
<artifactId>asm-all-repackaged</artifactId>
147+
<groupId>org.ow2.asm</groupId>
148+
<artifactId>asm-debug-all</artifactId>
149149
<optional>true</optional>
150150
</dependency>
151151
<dependency>
@@ -291,7 +291,7 @@
291291
<configuration>
292292
<artifactSet>
293293
<includes>
294-
<include>org.glassfish.hk2.external:asm-all-repackaged:*</include>
294+
<include>org.ow2.asm:asm-debug-all:*</include>
295295
</includes>
296296
</artifactSet>
297297
<relocations>

core-common/src/main/java/org/glassfish/jersey/internal/inject/Injections.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
33
*
4-
* Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved.
4+
* Copyright (c) 2012-2014 Oracle and/or its affiliates. All rights reserved.
55
*
66
* The contents of this file are subject to the terms of either the GNU
77
* General Public License Version 2 only ("GPL") or the Common Development
@@ -138,8 +138,7 @@ public static ServiceLocator createLocator(Binder... binders) {
138138
}
139139

140140
private static ServiceLocator _createLocator(String name, ServiceLocator parent, Binder... binders) {
141-
142-
final ServiceLocator result = factory.create(name, parent, generator);
141+
final ServiceLocator result = factory.create(name, parent, generator, ServiceLocatorFactory.CreatePolicy.DESTROY);
143142

144143
result.setNeutralContextClassLoader(false);
145144
ServiceLocatorUtilities.enablePerThreadScope(result);

core-server/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@
121121
<configuration>
122122
<artifactSet>
123123
<includes>
124-
<include>org.glassfish.hk2.external:asm-all-repackaged:*</include>
124+
<include>org.ow2.asm:asm-debug-all:*</include>
125125
</includes>
126126
</artifactSet>
127127
<relocations>
128128
<relocation>
129129
<pattern>org.objectweb.asm</pattern>
130-
<shadedPattern>${jersey.repackaged.prefix}.objectweb.asm</shadedPattern>
130+
<shadedPattern>${jersey.repackaged.prefix}.org.objectweb.asm</shadedPattern>
131131
</relocation>
132132
</relocations>
133133
</configuration>
@@ -182,8 +182,8 @@
182182
<artifactId>hk2-locator</artifactId>
183183
</dependency>
184184
<dependency>
185-
<groupId>org.glassfish.hk2.external</groupId>
186-
<artifactId>asm-all-repackaged</artifactId>
185+
<groupId>org.ow2.asm</groupId>
186+
<artifactId>asm-debug-all</artifactId>
187187
<optional>true</optional>
188188
</dependency>
189189

examples/extended-wadl-webapp/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@
138138
</dependency>
139139

140140
<dependency>
141-
<groupId>org.glassfish.hk2.external</groupId>
142-
<artifactId>asm-all-repackaged</artifactId>
141+
<groupId>org.ow2.asm</groupId>
142+
<artifactId>asm-debug-all</artifactId>
143143
<scope>test</scope>
144144
</dependency>
145145
<dependency>

examples/extended-wadl-webapp/src/test/java/org/glassfish/jersey/examples/extendedwadl/ExtendedWadlWebappOsgiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ public static Option[] configuration() {
132132
mavenBundle().groupId("org.glassfish.hk2").artifactId("hk2-locator").versionAsInProject(),
133133
mavenBundle().groupId("org.glassfish.hk2").artifactId("hk2-utils").versionAsInProject(),
134134
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("javax.inject").versionAsInProject(),
135-
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("asm-all-repackaged").versionAsInProject(),
136135
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("aopalliance-repackaged").versionAsInProject(),
136+
mavenBundle().groupId("org.ow2.asm").artifactId("asm-debug-all").versionAsInProject(),
137137
mavenBundle().groupId("org.javassist").artifactId("javassist").versionAsInProject(),
138138

139139
// JAX-RS API

examples/osgi-helloworld-webapp/functional-test/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@
9696
</dependency>
9797

9898
<dependency>
99-
<groupId>org.glassfish.hk2.external</groupId>
100-
<artifactId>asm-all-repackaged</artifactId>
99+
<groupId>org.ow2.asm</groupId>
100+
<artifactId>asm-debug-all</artifactId>
101101
<scope>test</scope>
102102
</dependency>
103103
<dependency>

examples/osgi-helloworld-webapp/functional-test/src/test/java/org/glassfish/jersey/examples/helloworld/test/AbstractWebAppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ public List<Option> genericOsgiOptions() {
173173
mavenBundle().groupId("org.glassfish.hk2").artifactId("hk2-locator").versionAsInProject(),
174174
mavenBundle().groupId("org.glassfish.hk2").artifactId("hk2-utils").versionAsInProject(),
175175
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("javax.inject").versionAsInProject(),
176-
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("asm-all-repackaged").versionAsInProject(),
177176
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("aopalliance-repackaged").versionAsInProject(),
177+
mavenBundle().groupId("org.ow2.asm").artifactId("asm-debug-all").versionAsInProject(),
178178
mavenBundle().groupId("org.javassist").artifactId("javassist").versionAsInProject(),
179179
// JAX-RS API
180180
mavenBundle().groupId("javax.ws.rs").artifactId("javax.ws.rs-api").versionAsInProject(),

examples/osgi-http-service/functional-test/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
</dependency>
7777

7878
<dependency>
79-
<groupId>org.glassfish.hk2.external</groupId>
80-
<artifactId>asm-all-repackaged</artifactId>
79+
<groupId>org.ow2.asm</groupId>
80+
<artifactId>asm-debug-all</artifactId>
8181
<scope>test</scope>
8282
</dependency>
8383
<dependency>

examples/osgi-http-service/functional-test/src/test/java/org/glassfish/jersey/examples/osgihttpservice/test/AbstractHttpServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public List<Option> genericOsgiOptions() {
131131
mavenBundle().groupId("org.glassfish.hk2").artifactId("hk2-locator").versionAsInProject(),
132132
mavenBundle().groupId("org.glassfish.hk2").artifactId("hk2-utils").versionAsInProject(),
133133
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("javax.inject").versionAsInProject(),
134-
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("asm-all-repackaged").versionAsInProject(),
135134
mavenBundle().groupId("org.glassfish.hk2.external").artifactId("aopalliance-repackaged").versionAsInProject(),
135+
mavenBundle().groupId("org.ow2.asm").artifactId("asm-debug-all").versionAsInProject(),
136136
mavenBundle().groupId("org.javassist").artifactId("javassist").versionAsInProject(),
137137

138138
// JAX-RS API

pom.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,13 +1047,13 @@
10471047
</dependency>
10481048
<dependency>
10491049
<groupId>org.glassfish.hk2.external</groupId>
1050-
<artifactId>asm-all-repackaged</artifactId>
1050+
<artifactId>aopalliance-repackaged</artifactId>
10511051
<version>${hk2.version}</version>
10521052
</dependency>
10531053
<dependency>
1054-
<groupId>org.glassfish.hk2.external</groupId>
1055-
<artifactId>aopalliance-repackaged</artifactId>
1056-
<version>${hk2.version}</version>
1054+
<groupId>org.ow2.asm</groupId>
1055+
<artifactId>asm-debug-all</artifactId>
1056+
<version>${asm.version}</version>
10571057
</dependency>
10581058
<dependency>
10591059
<groupId>org.javassist</groupId>
@@ -1405,7 +1405,8 @@
14051405
<grizzly.client.version>1.7</grizzly.client.version>
14061406
<grizzly2.version>2.3.8</grizzly2.version>
14071407
<hamcrest.version>1.3</hamcrest.version>
1408-
<hk2.version>2.2.0</hk2.version>
1408+
<hk2.version>2.3.0-b05</hk2.version>
1409+
<asm.version>5.0.2</asm.version>
14091410
<httpclient.version>4.3.1</httpclient.version>
14101411
<jackson.version>1.9.13</jackson.version>
14111412
<jackson2.version>2.2.3</jackson2.version>

0 commit comments

Comments
 (0)