Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,4 @@ nbactions.xml
.classpath
.project
.settings/
modules/bundles/comet/src
modules/bundles/core/src
modules/bundles/http/src
modules/bundles/http-all/src
modules/bundles/http-servlet/src
modules/bundles/websockets/src

42 changes: 5 additions & 37 deletions boms/bom/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2021, 2024 Contributors to the Eclipse Foundation.
Copyright 2021, 2026 Contributors to the Eclipse Foundation.
Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.

This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -33,9 +33,11 @@
<version>5.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>grizzly-bom</name>
<name>Grizzly BOM</name>
<description>Grizzly Bill of Materials (BOM)</description>

<url>https://eclipse-ee4j.github.io/glassfish-grizzly</url>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -169,37 +171,6 @@
</dependencyManagement>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<additionalOptions>
<additionalOption>-Xdoclint:none</additionalOption>
</additionalOptions>
</configuration>
</plugin>
<plugin><!--
Can not use 3.3.0, which triggers:

Presumably you have configured maven-source-plugn to execute twice times in your build. You have to configure a classifier for at least on of them.

-->
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
Expand All @@ -211,11 +182,8 @@
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[11,)</version>
</requireJavaVersion>
<requireMavenVersion>
<version>3.5.4</version>
<version>3.8.9</version>
</requireMavenVersion>
</rules>
</configuration>
Expand Down
35 changes: 11 additions & 24 deletions extras/connection-pool/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2021, 2023 Contributors to the Eclipse Foundation.
Copyright 2021, 2026 Contributors to the Eclipse Foundation.
Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.

This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -29,9 +29,8 @@
</parent>

<artifactId>connection-pool</artifactId>
<packaging>bundle</packaging>

<name>connection-pool</name>
<name>Grizzly Extras: HTTP Endpoint Connection Pool</name>

<dependencies>
<dependency>
Expand All @@ -41,30 +40,19 @@
</dependencies>

<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>
org.glassfish.grizzly*;version=${project.version},
*,
</Import-Package>
<Export-Package>
org.glassfish.grizzly.connectionpool.*;version=${project.version},
</Export-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -82,7 +70,6 @@
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<linkXRef>false</linkXRef>
Expand Down
38 changes: 14 additions & 24 deletions extras/http-server-jaxws/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2021, 2023 Contributors to the Eclipse Foundation.
Copyright 2021, 2026 Contributors to the Eclipse Foundation.
Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.

This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -29,9 +29,8 @@
</parent>

<artifactId>grizzly-http-server-jaxws</artifactId>
<packaging>bundle</packaging>

<name>grizzly-http-server-jaxws</name>
<name>Grizzly Extras: Metro Web Services Integration</name>

<dependencies>
<dependency>
Expand All @@ -41,7 +40,7 @@
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>4.0.2</version>
<version>4.0.3</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -52,39 +51,31 @@
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<version>4.0.5</version>
<version>4.0.6</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-osgi</artifactId>
<version>4.0.3</version>
<version>4.0.4</version>
<type>jar</type>
</dependency>
</dependencies>

<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>
org.glassfish.grizzly*;version=${project.version},
*,
</Import-Package>
<Export-Package>
org.glassfish.grizzly.jaxws.*;version=${project.version},
</Export-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -102,7 +93,6 @@
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<linkXRef>false</linkXRef>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
* Copyright (c) 2011, 2017 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand All @@ -18,77 +19,79 @@

import java.io.IOException;
import java.util.Random;

import org.glassfish.grizzly.http.server.HttpHandler;
import org.glassfish.grizzly.http.server.HttpHandlerRegistration;
import org.glassfish.grizzly.http.server.HttpServer;
import org.glassfish.grizzly.http.server.NetworkListener;
import org.glassfish.grizzly.http.server.StaticHttpHandler;
import org.glassfish.grizzly.jaxws.addclient.AddServiceService;
import org.junit.Test;
import static org.junit.Assert.*;

import static org.junit.Assert.assertEquals;

/**
* Basic Grizzly JAX-WS {@link HttpHandler} test.
*
*
* @author Alexey Stashok
*/
public class JaxwsTest {
private static final int PORT = 19881;

private HttpServer httpServer;

@Test
public void testSync() throws Exception {
startServer(new JaxwsHandler(new AddService(), false));

try {
test(10);
} finally {
stopServer();
}
}

@Test
public void testAsync() throws Exception {
startServer(new JaxwsHandler(new AddService(), true));

try {
test(10);
} finally {
stopServer();
}

}

private void startServer(HttpHandler httpHandler) throws IOException {
httpServer = new HttpServer();
NetworkListener networkListener = new NetworkListener("jaxws-listener", "0.0.0.0", PORT);

httpServer.getServerConfiguration().addHttpHandler(new StaticHttpHandler(), "/add"); // make sure JAX-WS Handler is not default
httpServer.getServerConfiguration().addHttpHandler(httpHandler,
HttpHandlerRegistration.bulder()
.contextPath("/add/a/b")
.urlPattern("/")
.build());
httpServer.addListener(networkListener);
httpServer.start();

httpServer.start();
}

private void stopServer() {
httpServer.shutdownNow();
}

private void test(int n) {
final Random random = new Random();

AddServiceService service = new AddServiceService();
org.glassfish.grizzly.jaxws.addclient.AddService port = service.getAddServicePort();
for (int i=0; i<n; i++) {
final int value1 = random.nextInt(1000);
final int value2 = random.nextInt(1000);
final int result = port.add(value1, value2);

assertEquals(value1 + value2, result);
}
}
Expand Down
Loading