Skip to content

Commit

Permalink
Allow EE10 JAX-B, CDI, and Servlet APIs (#763)
Browse files Browse the repository at this point in the history
* Allow EE10 JAX-B, CDI, and Servlet APIs

Signed-off-by: jansupol <[email protected]>
  • Loading branch information
jansupol authored Dec 20, 2021
1 parent 6096a77 commit 93d642e
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-api</artifactId>
<version>1.0</version>
<version>2.0</version>
</dependency>

<!-- adds dependency on grizzly based client and server container - just for tests -->
Expand Down
9 changes: 6 additions & 3 deletions bundles/websocket-ri-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,12 @@
org.glassfish.tyrus.*;version=${project.version}
</Export-Package>
<Import-Package>
jakarta.servlet.*;version="${servlet.api.version}",
org.glassfish.grizzly.http.server.*;version=${grizzly.version}
org.glassfish.grizzly.*;version=${grizzly.version},
jakarta.servlet.*;version="[5.0,7)",
jakarta.enterprise.context.spi;version="[3.0,5)",
jakarta.enterprise.inject.spi;version="[3.0,5)",
jakarta.xml.bind.*;version="[3.0,5)",
<!-- org.glassfish.grizzly.http.server.*;version=${grizzly.version}-->
<!-- org.glassfish.grizzly.*;version=${grizzly.version},-->
*
</Import-Package>
</instructions>
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<configuration>
<instructions>
<Export-Package>org.glassfish.tyrus.client;version=${project.version}</Export-Package>
<Import-Package>jakarta.websocket;version=${apijar.bundle.version},*</Import-Package>
<!-- <Import-Package>jakarta.websocket;version=${apijar.bundle.version},*</Import-Package>-->
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion containers/glassfish/cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<configuration>
<instructions>
<Export-Package>org.glassfish.tyrus.gf.cdi;version=${project.version}</Export-Package>
<Import-Package>jakarta.enterprise.context.spi;version="[3.0,4)",jakarta.enterprise.inject.spi;version="[3.0,4)",*</Import-Package>
<Import-Package>jakarta.enterprise.context.spi;version="[3.0,5)",jakarta.enterprise.inject.spi;version="[3.0,5)",*</Import-Package>
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>
Expand Down
7 changes: 6 additions & 1 deletion containers/grizzly-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>org.glassfish.tyrus.container.grizzly.server.*;version=${project.version}
<Export-Package>
org.glassfish.tyrus.container.grizzly.server.*;version=${project.version}
</Export-Package>
<Import-Package>
jakarta.xml.bind.*;version="[3.0,5)",
*
</Import-Package>
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>
Expand Down
7 changes: 5 additions & 2 deletions containers/servlet/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -54,7 +54,10 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>jakarta.servlet.*;version="[5.0,6)",*</Import-Package>
<Import-Package>
jakarta.servlet.*;version="[5.0,7)",
jakarta.xml.bind.*;version="[3.0,5)",
*</Import-Package>
<Export-Package>org.glassfish.tyrus.servlet.*;version=${project.version}</Export-Package>
</instructions>
<unpackBundle>true</unpackBundle>
Expand Down
5 changes: 4 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
org.glassfish.tyrus.core.*;version=${project.version},org.glassfish.tyrus.core.extension.*;version=${project.version},org.glassfish.tyrus.core.cluster.*;version=${project.version},org.glassfish.tyrus.core.coder.*;version=${project.version},org.glassfish.tyrus.core.frame.*;version=${project.version},org.glassfish.tyrus.core.wsadl.model.*;version=${project.version}
</Export-Package>
<Import-Package>
jakarta.websocket;version=${apijar.bundle.version},jakarta.websocket.server;version=${apijar.bundle.version},javax.naming,*
<!-- jakarta.websocket;version=${apijar.bundle.version},-->
<!-- jakarta.websocket.server;version=${apijar.bundle.version},-->
jakarta.xml.bind.*;version="[3.0,5)",
javax.naming,*
</Import-Package>
</instructions>
<unpackBundle>true</unpackBundle>
Expand Down
2 changes: 1 addition & 1 deletion ext/client-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<configuration>
<instructions>
<Export-Package>org.glassfish.tyrus.ext.client.cli;version=${project.version}</Export-Package>
<Import-Package>jakarta.websocket;version=${apijar.bundle.version},*</Import-Package>
<!-- <Import-Package>jakarta.websocket;version=${apijar.bundle.version},*</Import-Package>-->
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion ext/client-java8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<configuration>
<instructions>
<Export-Package>org.glassfish.tyrus.ext.client.java8;version=${project.version}</Export-Package>
<Import-Package>jakarta.websocket;version=${apijar.bundle.version},*</Import-Package>
<!-- <Import-Package>jakarta.websocket;version=${apijar.bundle.version},*</Import-Package>-->
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<configuration>
<instructions>
<Export-Package>org.glassfish.tyrus.server.*;version=${project.version}</Export-Package>
<Import-Package>jakarta.websocket;version=${apijar.bundle.version},jakarta.websocket.server;version=${apijar.bundle.version},*</Import-Package>
<!-- <Import-Package>jakarta.websocket;version=${apijar.bundle.version},jakarta.websocket.server;version=${apijar.bundle.version},*</Import-Package>-->
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ public void testIncreaseFileDescriptorsOnTyrusImplementationInCaseOfUnresolvedAd
}
}

long fileDescriptorsAfter = getOpenFileDescriptorCount();
long fileDescriptorsAfter = 0;
try {
for (int i = 0; i != 10; i++) {
fileDescriptorsAfter = getOpenFileDescriptorCount();
if (fileDescriptorsBefore != fileDescriptorsAfter) {
Thread.sleep(100L);
}
}
} catch (Exception e) {
// ignore
}

//Then
LOG.log(Level.INFO, "END COUNT: {0}", getOpenFileDescriptorCount());
Expand Down
2 changes: 1 addition & 1 deletion tests/tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<configuration>
<instructions>
<Export-Package>org.glassfish.tyrus.test.tools.*;version=${project.version}</Export-Package>
<Import-Package>jakarta.websocket;version=${apijar.bundle.version},jakarta.websocket.server;version=${apijar.bundle.version},*</Import-Package>
<!-- <Import-Package>jakarta.websocket;version=${apijar.bundle.version},jakarta.websocket.server;version=${apijar.bundle.version},*</Import-Package>-->
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>
Expand Down

0 comments on commit 93d642e

Please sign in to comment.