Skip to content

Commit

Permalink
Deprecate support classes for Sun's JDK HTTP server
Browse files Browse the repository at this point in the history
Issue: SPR-17143
  • Loading branch information
jhoeller committed Aug 7, 2018
1 parent 34ddb88 commit 2b051b8
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.lang.UsesSunHttpServer;

/**
* {@link org.springframework.beans.factory.FactoryBean} that creates a simple
Expand All @@ -51,8 +50,10 @@
* @since 2.5.1
* @see #setPort
* @see #setContexts
* @deprecated as of Spring Framework 5.1, in favor of embedded Tomcat/Jetty/Undertow
*/
@UsesSunHttpServer
@Deprecated
@org.springframework.lang.UsesSunHttpServer
public class SimpleHttpServerFactoryBean implements FactoryBean<HttpServer>, InitializingBean, DisposableBean {

protected final Log logger = LogFactory.getLog(getClass());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,9 @@
*
* @author Stephane Nicoll
* @since 4.1
* @deprecated as of 5.1, along with Spring's Sun HTTP Server support classes
*/
@Deprecated
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
@Documented
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
* @since 2.5.1
* @see #invoke(java.io.InputStream, java.io.OutputStream)
* @see HessianServiceExporter
* @see SimpleHessianServiceExporter
*/
public class HessianExporter extends RemoteExporter implements InitializingBean {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
* Servlet-API-based HTTP request handler that exports the specified service bean
* as Hessian service endpoint, accessible via a Hessian proxy.
*
* <p><b>Note:</b> Spring also provides an alternative version of this exporter,
* for Sun's JRE 1.6 HTTP server: {@link SimpleHessianServiceExporter}.
*
* <p>Hessian is a slim, binary RPC protocol.
* For information on Hessian, see the
* <a href="http://www.caucho.com/hessian">Hessian website</a>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,7 +22,6 @@
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;

import org.springframework.lang.UsesSunHttpServer;
import org.springframework.util.FileCopyUtils;

/**
Expand All @@ -43,9 +42,10 @@
* @since 2.5.1
* @see org.springframework.remoting.caucho.HessianClientInterceptor
* @see org.springframework.remoting.caucho.HessianProxyFactoryBean
* @see org.springframework.remoting.httpinvoker.SimpleHttpInvokerServiceExporter
* @deprecated as of Spring Framework 5.1, in favor of {@link HessianServiceExporter}
*/
@UsesSunHttpServer
@Deprecated
@org.springframework.lang.UsesSunHttpServer
public class SimpleHessianServiceExporter extends HessianExporter implements HttpHandler {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
* Servlet-API-based HTTP request handler that exports the specified service bean
* as HTTP invoker service endpoint, accessible via an HTTP invoker proxy.
*
* <p><b>Note:</b> Spring also provides an alternative version of this exporter,
* for Sun's JRE 1.6 HTTP server: {@link SimpleHttpInvokerServiceExporter}.
*
* <p>Deserializes remote invocation objects and serializes remote invocation
* result objects. Uses Java serialization just like RMI, but provides the
* same ease of setup as Caucho's HTTP-based Hessian protocol.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,6 @@
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;

import org.springframework.lang.UsesSunHttpServer;
import org.springframework.remoting.rmi.RemoteInvocationSerializingExporter;
import org.springframework.remoting.support.RemoteInvocation;
import org.springframework.remoting.support.RemoteInvocationResult;
Expand Down Expand Up @@ -55,9 +54,10 @@
* @since 2.5.1
* @see org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor
* @see org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean
* @see org.springframework.remoting.caucho.SimpleHessianServiceExporter
* @deprecated as of Spring Framework 5.1, in favor of {@link HttpInvokerServiceExporter}
*/
@UsesSunHttpServer
@Deprecated
@org.springframework.lang.UsesSunHttpServer
public class SimpleHttpInvokerServiceExporter extends RemoteInvocationSerializingExporter implements HttpHandler {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
* @see javax.jws.WebService
* @see javax.xml.ws.Endpoint
* @see SimpleJaxWsServiceExporter
* @see SimpleHttpServerJaxWsServiceExporter
*/
public abstract class AbstractJaxWsServiceExporter implements BeanFactoryAware, InitializingBean, DisposableBean {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.apache.commons.logging.LogFactory;

import org.springframework.lang.Nullable;
import org.springframework.lang.UsesSunHttpServer;
import org.springframework.util.Assert;

/**
Expand All @@ -49,8 +48,10 @@
* @see javax.jws.WebService
* @see javax.xml.ws.Endpoint#publish(Object)
* @see SimpleJaxWsServiceExporter
* @deprecated as of Spring Framework 5.1, in favor of {@link SimpleJaxWsServiceExporter}
*/
@UsesSunHttpServer
@Deprecated
@org.springframework.lang.UsesSunHttpServer
public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceExporter {

protected final Log logger = LogFactory.getLog(getClass());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,12 @@
*
* <p>Note that this exporter will only work if the JAX-WS runtime actually
* supports publishing with an address argument, i.e. if the JAX-WS runtime
* ships an internal HTTP server. This is the case with the JAX-WS runtime
* that's included in Sun's JDK 6 but not with the standalone JAX-WS 2.1 RI.
*
* <p>For explicit configuration of JAX-WS endpoints with Sun's JDK 6
* HTTP server, consider using {@link SimpleHttpServerJaxWsServiceExporter}!
* ships an internal HTTP server.
*
* @author Juergen Hoeller
* @since 2.5
* @see javax.jws.WebService
* @see javax.xml.ws.Endpoint#publish(String)
* @see SimpleHttpServerJaxWsServiceExporter
*/
public class SimpleJaxWsServiceExporter extends AbstractJaxWsServiceExporter {

Expand Down
25 changes: 0 additions & 25 deletions src/docs/asciidoc/integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -442,31 +442,6 @@ servlet name matching the bean name of the target exporter:
</servlet-mapping>
----

If you are running outside of a servlet container and are using Oracle's Java 6, then you
can use the built-in HTTP server implementation. You can configure the
`SimpleHttpServerFactoryBean` together with a `SimpleHttpInvokerServiceExporter` as is
shown in this example:

[source,xml,indent=0]
[subs="verbatim,quotes"]
----
<bean name="accountExporter"
class="org.springframework.remoting.httpinvoker.SimpleHttpInvokerServiceExporter">
<property name="service" ref="accountService"/>
<property name="serviceInterface" value="example.AccountService"/>
</bean>
<bean id="httpServer"
class="org.springframework.remoting.support.SimpleHttpServerFactoryBean">
<property name="contexts">
<util:map>
<entry key="/remoting/AccountService" value-ref="accountExporter"/>
</util:map>
</property>
<property name="port" value="8080"/>
</bean>
----


[[remoting-httpinvoker-client]]
==== Linking in the service at the client
Expand Down

0 comments on commit 2b051b8

Please sign in to comment.