Deprecate remoting technologies support
Because of security and broader industry support, support for several remoting technologies is now deprecated and scheduled for removal in Spring Framework 6.0. This commit deprecates the following remoting technologies: * HTTPInvoker * RMI * Hessian * JMS remoting Other remoting technologies like EJB or JAXWS might be deprecated in the future depending on industry support. Closes gh-25379
This commit is contained in:
@@ -63,7 +63,9 @@ import org.springframework.util.Assert;
|
||||
* @see HessianProxyFactoryBean
|
||||
* @see com.caucho.hessian.client.HessianProxyFactory
|
||||
* @see com.caucho.hessian.server.HessianServlet
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public class HessianClientInterceptor extends UrlBasedRemoteAccessor implements MethodInterceptor {
|
||||
|
||||
private HessianProxyFactory proxyFactory = new HessianProxyFactory();
|
||||
|
||||
@@ -53,7 +53,9 @@ import org.springframework.util.CommonsLogWriter;
|
||||
* @since 2.5.1
|
||||
* @see #invoke(java.io.InputStream, java.io.OutputStream)
|
||||
* @see HessianServiceExporter
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public class HessianExporter extends RemoteExporter implements InitializingBean {
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,7 +40,9 @@ import org.springframework.lang.Nullable;
|
||||
* @see HessianServiceExporter
|
||||
* @see org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean
|
||||
* @see org.springframework.remoting.rmi.RmiProxyFactoryBean
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public class HessianProxyFactoryBean extends HessianClientInterceptor implements FactoryBean<Object> {
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -44,7 +44,9 @@ import org.springframework.web.util.NestedServletException;
|
||||
* @see HessianProxyFactoryBean
|
||||
* @see org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter
|
||||
* @see org.springframework.remoting.rmi.RmiServiceExporter
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public class HessianServiceExporter extends HessianExporter implements HttpRequestHandler {
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.remoting.rmi.CodebaseAwareObjectInputStream;
|
||||
import org.springframework.remoting.support.RemoteInvocation;
|
||||
import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -44,7 +43,9 @@ import org.springframework.util.ClassUtils;
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.1
|
||||
* @see #doExecuteRequest
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class AbstractHttpInvokerRequestExecutor implements HttpInvokerRequestExecutor, BeanClassLoaderAware {
|
||||
|
||||
/**
|
||||
@@ -264,7 +265,7 @@ public abstract class AbstractHttpInvokerRequestExecutor implements HttpInvokerR
|
||||
* @see org.springframework.remoting.rmi.CodebaseAwareObjectInputStream
|
||||
*/
|
||||
protected ObjectInputStream createObjectInputStream(InputStream is, @Nullable String codebaseUrl) throws IOException {
|
||||
return new CodebaseAwareObjectInputStream(is, getBeanClassLoader(), codebaseUrl);
|
||||
return new org.springframework.remoting.rmi.CodebaseAwareObjectInputStream(is, getBeanClassLoader(), codebaseUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -60,7 +60,9 @@ import org.springframework.util.Assert;
|
||||
* @author Stephane Nicoll
|
||||
* @since 3.1
|
||||
* @see org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public class HttpComponentsHttpInvokerRequestExecutor extends AbstractHttpInvokerRequestExecutor {
|
||||
|
||||
private static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 100;
|
||||
|
||||
@@ -25,7 +25,9 @@ import org.springframework.lang.Nullable;
|
||||
* @since 1.1
|
||||
* @see HttpInvokerRequestExecutor
|
||||
* @see HttpInvokerClientInterceptor
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface HttpInvokerClientConfiguration {
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,7 +69,9 @@ import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
* @see HttpInvokerServiceExporter
|
||||
* @see HttpInvokerProxyFactoryBean
|
||||
* @see java.rmi.server.RMIClassLoader
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public class HttpInvokerClientInterceptor extends RemoteInvocationBasedAccessor
|
||||
implements MethodInterceptor, HttpInvokerClientConfiguration {
|
||||
|
||||
|
||||
@@ -53,7 +53,9 @@ import org.springframework.util.Assert;
|
||||
* @see HttpInvokerServiceExporter
|
||||
* @see org.springframework.remoting.rmi.RmiProxyFactoryBean
|
||||
* @see org.springframework.remoting.caucho.HessianProxyFactoryBean
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public class HttpInvokerProxyFactoryBean extends HttpInvokerClientInterceptor implements FactoryBean<Object> {
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -40,7 +40,9 @@ import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.1
|
||||
* @see HttpInvokerClientInterceptor#setHttpInvokerRequestExecutor
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
@FunctionalInterface
|
||||
public interface HttpInvokerRequestExecutor {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.remoting.rmi.RemoteInvocationSerializingExporter;
|
||||
import org.springframework.remoting.support.RemoteInvocation;
|
||||
import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
import org.springframework.web.HttpRequestHandler;
|
||||
@@ -58,8 +57,10 @@ import org.springframework.web.util.NestedServletException;
|
||||
* @see HttpInvokerProxyFactoryBean
|
||||
* @see org.springframework.remoting.rmi.RmiServiceExporter
|
||||
* @see org.springframework.remoting.caucho.HessianServiceExporter
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
public class HttpInvokerServiceExporter extends RemoteInvocationSerializingExporter implements HttpRequestHandler {
|
||||
@Deprecated
|
||||
public class HttpInvokerServiceExporter extends org.springframework.remoting.rmi.RemoteInvocationSerializingExporter implements HttpRequestHandler {
|
||||
|
||||
/**
|
||||
* Reads a remote invocation from the request, executes it,
|
||||
@@ -167,7 +168,7 @@ public class HttpInvokerServiceExporter extends RemoteInvocationSerializingExpor
|
||||
throws IOException {
|
||||
|
||||
try (ObjectOutputStream oos =
|
||||
createObjectOutputStream(new FlushGuardedOutputStream(decorateOutputStream(request, response, os)))) {
|
||||
createObjectOutputStream(new FlushGuardedOutputStream(decorateOutputStream(request, response, os)))) {
|
||||
doWriteRemoteInvocationResult(result, oos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,9 @@ import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.1
|
||||
* @see java.net.HttpURLConnection
|
||||
* @deprecated as of 5.3.0 with no replacement.
|
||||
*/
|
||||
@Deprecated
|
||||
public class SimpleHttpInvokerRequestExecutor extends AbstractHttpInvokerRequestExecutor {
|
||||
|
||||
private int connectTimeout = -1;
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.io.OutputStream;
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import com.sun.net.httpserver.HttpHandler;
|
||||
|
||||
import org.springframework.remoting.rmi.RemoteInvocationSerializingExporter;
|
||||
import org.springframework.remoting.support.RemoteInvocation;
|
||||
import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
|
||||
@@ -58,7 +57,7 @@ import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
*/
|
||||
@Deprecated
|
||||
@org.springframework.lang.UsesSunHttpServer
|
||||
public class SimpleHttpInvokerServiceExporter extends RemoteInvocationSerializingExporter implements HttpHandler {
|
||||
public class SimpleHttpInvokerServiceExporter extends org.springframework.remoting.rmi.RemoteInvocationSerializingExporter implements HttpHandler {
|
||||
|
||||
/**
|
||||
* Reads a remote invocation from the request, executes it,
|
||||
|
||||
Reference in New Issue
Block a user