Skip to content

Commit 1f6225b

Browse files
garyrussellartembilan
authored andcommitted
GH-1383: Deprecate Remoting
Resolves #1383
1 parent 18d58b5 commit 1f6225b

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

spring-amqp/src/main/java/org/springframework/amqp/remoting/client/AmqpClientInterceptor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
* @see org.springframework.amqp.remoting.service.AmqpInvokerServiceExporter
3939
* @see AmqpProxyFactoryBean
4040
* @see org.springframework.remoting.RemoteAccessException
41+
* @deprecated will be removed in 3.0.0.
4142
*/
43+
@Deprecated
4244
public class AmqpClientInterceptor extends RemoteAccessor implements MethodInterceptor {
4345

4446
private AmqpTemplate amqpTemplate;

spring-amqp/src/main/java/org/springframework/amqp/remoting/client/AmqpProxyFactoryBean.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
* @see AmqpClientInterceptor
4141
* @see org.springframework.remoting.rmi.RmiServiceExporter
4242
* @see org.springframework.remoting.RemoteAccessException
43+
* @deprecated will be removed in 3.0.0.
4344
*/
45+
@Deprecated
4446
public class AmqpProxyFactoryBean extends AmqpClientInterceptor implements FactoryBean<Object>, InitializingBean {
4547

4648
private Object serviceProxy;

spring-amqp/src/main/java/org/springframework/amqp/remoting/service/AmqpInvokerServiceExporter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@
5353
* @author Gary Russell
5454
* @author Artem Bilan
5555
* @since 1.2
56+
* @deprecated will be removed in 3.0.0.
5657
*/
58+
@Deprecated
5759
public class AmqpInvokerServiceExporter extends RemoteInvocationBasedExporter implements MessageListener {
5860

5961
private AmqpTemplate amqpTemplate;

spring-amqp/src/test/java/org/springframework/amqp/remoting/RemotingTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import org.springframework.amqp.core.AmqpTemplate;
3030
import org.springframework.amqp.core.Message;
3131
import org.springframework.amqp.core.MessageProperties;
32-
import org.springframework.amqp.remoting.client.AmqpProxyFactoryBean;
33-
import org.springframework.amqp.remoting.service.AmqpInvokerServiceExporter;
3432
import org.springframework.amqp.remoting.testhelper.AbstractAmqpTemplate;
3533
import org.springframework.amqp.remoting.testhelper.SentSavingTemplate;
3634
import org.springframework.amqp.remoting.testservice.GeneralException;
@@ -49,11 +47,12 @@
4947
* @author Gary Russell
5048
* @since 1.2
5149
*/
50+
@SuppressWarnings("deprecation")
5251
public class RemotingTest {
5352

5453
private TestServiceInterface riggedProxy;
5554

56-
private AmqpInvokerServiceExporter serviceExporter;
55+
private org.springframework.amqp.remoting.service.AmqpInvokerServiceExporter serviceExporter;
5756

5857
/**
5958
* Set up a rig of directly wired-up proxy and service listener so that both can be tested together without needing
@@ -63,14 +62,15 @@ public class RemotingTest {
6362
public void initializeTestRig() {
6463
// Set up the service
6564
TestServiceInterface testService = new TestServiceImpl();
66-
this.serviceExporter = new AmqpInvokerServiceExporter();
65+
this.serviceExporter = new org.springframework.amqp.remoting.service.AmqpInvokerServiceExporter();
6766
final SentSavingTemplate sentSavingTemplate = new SentSavingTemplate();
6867
this.serviceExporter.setAmqpTemplate(sentSavingTemplate);
6968
this.serviceExporter.setService(testService);
7069
this.serviceExporter.setServiceInterface(TestServiceInterface.class);
7170

7271
// Set up the client
73-
AmqpProxyFactoryBean amqpProxyFactoryBean = new AmqpProxyFactoryBean();
72+
org.springframework.amqp.remoting.client.AmqpProxyFactoryBean amqpProxyFactoryBean =
73+
new org.springframework.amqp.remoting.client.AmqpProxyFactoryBean();
7474
amqpProxyFactoryBean.setServiceInterface(TestServiceInterface.class);
7575
AmqpTemplate directForwardingTemplate = new AbstractAmqpTemplate() {
7676
@Override

src/reference/asciidoc/amqp.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4581,6 +4581,10 @@ See <<json-complex>> for more information.
45814581
[[remoting]]
45824582
===== Spring Remoting with AMQP
45834583

4584+
IMPORTANT: This feature is deprecated and will be removed in 3.0.
4585+
It has been superseded for a long time by <<annotation-error-handling>> with the `returnExceptions` being set to true, and configuring a `RemoteInvocationAwareMessageConverterAdapter` on the sending side.
4586+
See <<annotation-error-handling>> for more information.
4587+
45844588
The Spring Framework has a general remoting capability, allowing https://docs.spring.io/spring/docs/current/spring-framework-reference/html/remoting.html[Remote Procedure Calls (RPC)] that use various transports.
45854589
Spring-AMQP supports a similar mechanism with a `AmqpProxyFactoryBean` on the client and a `AmqpInvokerServiceExporter` on the server.
45864590
This provides RPC over AMQP.

src/reference/asciidoc/whats-new.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ See <<async-annotation-driven-enable-signature>> for more information.
1515

1616
A new property `recoverManualDeclarations` allows recovery of manually declared queues/exchanges/bindings.
1717
See <<declarable-recovery>> for more information.
18+
19+
==== Remoting Support
20+
21+
Support remoting using Spring Framework's RMI support is deprecated and will be removed in 3.0.
22+
See <<remoting>> for more information.

0 commit comments

Comments
 (0)