diff --git a/spring-remoting-modules/.idea/.gitignore b/spring-remoting-modules/.idea/.gitignore
new file mode 100644
index 0000000000..0a8642fac0
--- /dev/null
+++ b/spring-remoting-modules/.idea/.gitignore
@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Zeppelin ignored files
+/ZeppelinRemoteNotebooks/
diff --git a/spring-remoting-modules/.idea/checkstyle-idea.xml b/spring-remoting-modules/.idea/checkstyle-idea.xml
new file mode 100644
index 0000000000..f0c49846ff
--- /dev/null
+++ b/spring-remoting-modules/.idea/checkstyle-idea.xml
@@ -0,0 +1,16 @@
+
+
+
+ 10.12.2
+ JavaOnly
+ true
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/.idea/compiler.xml b/spring-remoting-modules/.idea/compiler.xml
new file mode 100644
index 0000000000..92b98354bd
--- /dev/null
+++ b/spring-remoting-modules/.idea/compiler.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/.idea/encodings.xml b/spring-remoting-modules/.idea/encodings.xml
new file mode 100644
index 0000000000..9635c68aa3
--- /dev/null
+++ b/spring-remoting-modules/.idea/encodings.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/.idea/jarRepositories.xml b/spring-remoting-modules/.idea/jarRepositories.xml
new file mode 100644
index 0000000000..1067e4c6b5
--- /dev/null
+++ b/spring-remoting-modules/.idea/jarRepositories.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/.idea/jpa-buddy.xml b/spring-remoting-modules/.idea/jpa-buddy.xml
new file mode 100644
index 0000000000..898e07a675
--- /dev/null
+++ b/spring-remoting-modules/.idea/jpa-buddy.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/.idea/misc.xml b/spring-remoting-modules/.idea/misc.xml
new file mode 100644
index 0000000000..a2eb346bb8
--- /dev/null
+++ b/spring-remoting-modules/.idea/misc.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/.idea/vcs.xml b/spring-remoting-modules/.idea/vcs.xml
new file mode 100644
index 0000000000..6c0b863585
--- /dev/null
+++ b/spring-remoting-modules/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/README.md b/spring-remoting-modules/README.md
new file mode 100644
index 0000000000..91db561f83
--- /dev/null
+++ b/spring-remoting-modules/README.md
@@ -0,0 +1,13 @@
+## Spring Remoting
+
+This module contains articles about Spring Remoting
+
+
+### Overview
+This Maven project contains the Java source code for various modules used in the Spring Remoting series of articles.
+
+### Building the Project
+You can build the project using Maven inside your IDE or from the command line:
+```
+mvn clean install
+```
diff --git a/spring-remoting-modules/pom.xml b/spring-remoting-modules/pom.xml
new file mode 100644
index 0000000000..480e7db21d
--- /dev/null
+++ b/spring-remoting-modules/pom.xml
@@ -0,0 +1,58 @@
+
+
+ 4.0.0
+ spring-remoting-modules
+ 1.0-SNAPSHOT
+ spring-remoting-modules
+ pom
+ Parent for all projects related to Spring Remoting, except remoting-hessian-burlap
+
+
+
+
+ com.ossez
+ parent-boot-2
+ 0.0.2-SNAPSHOT
+ parent-boot-2
+
+
+
+
+ remoting-http
+
+ remoting-jms
+
+
+
+
+
+
+
+ ${project.groupId}
+ api
+ ${project.version}
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${maven-compiler-plugin.version}
+
+ ${maven.compiler.source}
+ ${maven.compiler.target}
+
+
+
+
+
+ 11
+ 11
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-amqp/README.md b/spring-remoting-modules/remoting-amqp/README.md
new file mode 100644
index 0000000000..b4367f0cd0
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles
+
+- [Spring Remoting with AMQP](https://www.baeldung.com/spring-remoting-amqp)
diff --git a/spring-remoting-modules/remoting-amqp/pom.xml b/spring-remoting-modules/remoting-amqp/pom.xml
new file mode 100644
index 0000000000..7e1aa83cc5
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/pom.xml
@@ -0,0 +1,21 @@
+
+
+ 4.0.0
+ remoting-amqp
+ remoting-amqp
+ pom
+
+
+ com.baeldung
+ spring-remoting-modules
+ 1.0-SNAPSHOT
+
+
+
+ remoting-amqp-server
+ remoting-amqp-client
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-client/pom.xml b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/pom.xml
new file mode 100644
index 0000000000..1bcab004f1
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+ remoting-amqp-client
+ remoting-amqp-client
+ jar
+ http://maven.apache.org
+
+
+ com.baeldung
+ remoting-amqp
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-amqp
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ com.baeldung
+ remoting-http-api
+ ${project.version}
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/java/com/baeldung/client/AmqpClient.java b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/java/com/baeldung/client/AmqpClient.java
new file mode 100644
index 0000000000..def80f6b5e
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/java/com/baeldung/client/AmqpClient.java
@@ -0,0 +1,46 @@
+package com.baeldung.client;
+
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+import org.springframework.amqp.core.*;
+import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.amqp.remoting.client.AmqpProxyFactoryBean;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+
+import static java.lang.System.out;
+
+@SpringBootApplication public class AmqpClient {
+
+ @Bean Queue queue() {
+ return new Queue("remotingQueue");
+ }
+
+ @Bean AmqpProxyFactoryBean amqpFactoryBean(AmqpTemplate amqpTemplate) {
+ AmqpProxyFactoryBean factoryBean = new AmqpProxyFactoryBean();
+ factoryBean.setServiceInterface(CabBookingService.class);
+ factoryBean.setAmqpTemplate(amqpTemplate);
+ return factoryBean;
+ }
+
+ @Bean Exchange directExchange(Queue someQueue) {
+ DirectExchange exchange = new DirectExchange("remoting.exchange");
+ BindingBuilder.bind(someQueue).to(exchange).with("remoting.binding");
+ return exchange;
+ }
+
+ @Bean RabbitTemplate amqpTemplate(ConnectionFactory factory) {
+ RabbitTemplate template = new RabbitTemplate(factory);
+ template.setRoutingKey("remoting.binding");
+ template.setExchange("remoting.exchange");
+ return template;
+ }
+
+ public static void main(String[] args) throws BookingException {
+ CabBookingService service = SpringApplication.run(AmqpClient.class, args).getBean(CabBookingService.class);
+ out.println(service.bookRide("13 Seagate Blvd, Key Largo, FL 33037"));
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/resources/application.properties b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/resources/application.properties
new file mode 100644
index 0000000000..8df44a7c8d
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/resources/application.properties
@@ -0,0 +1,19 @@
+# This is true to make SpringBoot to automatically register a bean of type 'org.springframework.amqp.core.AmqpAdmin'.
+# Check the org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration javadoc for details.
+spring.rabbitmq.dynamic=true
+
+# The port to which the client should connect defaults to 5672.
+spring.rabbitmq.port=32769
+
+# Username and password
+spring.rabbitmq.username=guest
+spring.rabbitmq.password=guest
+
+# The host, defaults to localhost.
+spring.rabbitmq.host=192.168.99.100
+
+# Logging
+logging.pattern.console=%d{mm:ss.SSS} %-5p [%-31t] [%-54logger{0}] %marker%m%ex{full} - %logger - %F:%L%n
+logging.level.root=WARN
+logging.level.org.springframework.amqp=TRACE
+
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/resources/logback.xml b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/test/java/org/baeldung/SpringContextTest.java b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/test/java/org/baeldung/SpringContextTest.java
new file mode 100644
index 0000000000..fe20382ab4
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-client/src/test/java/org/baeldung/SpringContextTest.java
@@ -0,0 +1,17 @@
+package org.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.client.AmqpClient;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = AmqpClient.class)
+public class SpringContextTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-server/pom.xml b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/pom.xml
new file mode 100644
index 0000000000..6b6c12b41a
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/pom.xml
@@ -0,0 +1,38 @@
+
+
+ 4.0.0
+ remoting-amqp-server
+ remoting-amqp-server
+ jar
+ http://maven.apache.org
+
+
+ com.baeldung
+ remoting-amqp
+ 1.0-SNAPSHOT
+
+
+
+
+ com.baeldung
+ remoting-http-api
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-amqp
+
+
+ com.baeldung
+ remoting-http-server
+ ${remoting-http-server.version}
+
+
+
+
+ 1.0-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/java/com/baeldung/server/AmqpServer.java b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/java/com/baeldung/server/AmqpServer.java
new file mode 100644
index 0000000000..f0155b2141
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/java/com/baeldung/server/AmqpServer.java
@@ -0,0 +1,53 @@
+package com.baeldung.server;
+
+import com.baeldung.api.CabBookingService;
+import org.springframework.amqp.core.AmqpTemplate;
+import org.springframework.amqp.core.Queue;
+import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
+import org.springframework.amqp.remoting.service.AmqpInvokerServiceExporter;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration @ComponentScan @EnableAutoConfiguration
+public class AmqpServer {
+
+ /*
+ Please note that
+ - CachingConnectionFactory
+ - RabbitAdmin
+ - AmqpTemplate
+ are automatically declared by SpringBoot.
+ */
+
+ @Bean CabBookingService bookingService() {
+ return new CabBookingServiceImpl();
+ }
+
+ @Bean Queue queue() {
+ return new Queue("remotingQueue");
+ }
+
+ @Bean AmqpInvokerServiceExporter exporter(CabBookingService implementation, AmqpTemplate template) {
+ AmqpInvokerServiceExporter exporter = new AmqpInvokerServiceExporter();
+ exporter.setServiceInterface(CabBookingService.class);
+ exporter.setService(implementation);
+ exporter.setAmqpTemplate(template);
+ return exporter;
+ }
+
+ @Bean SimpleMessageListenerContainer listener(ConnectionFactory factory, AmqpInvokerServiceExporter exporter, Queue queue) {
+ SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(factory);
+ container.setMessageListener(exporter);
+ container.setQueueNames(queue.getName());
+ return container;
+ }
+
+ public static void main(String[] args) {
+ SpringApplication.run(AmqpServer.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/resources/application.properties b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/resources/application.properties
new file mode 100644
index 0000000000..8df44a7c8d
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/resources/application.properties
@@ -0,0 +1,19 @@
+# This is true to make SpringBoot to automatically register a bean of type 'org.springframework.amqp.core.AmqpAdmin'.
+# Check the org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration javadoc for details.
+spring.rabbitmq.dynamic=true
+
+# The port to which the client should connect defaults to 5672.
+spring.rabbitmq.port=32769
+
+# Username and password
+spring.rabbitmq.username=guest
+spring.rabbitmq.password=guest
+
+# The host, defaults to localhost.
+spring.rabbitmq.host=192.168.99.100
+
+# Logging
+logging.pattern.console=%d{mm:ss.SSS} %-5p [%-31t] [%-54logger{0}] %marker%m%ex{full} - %logger - %F:%L%n
+logging.level.root=WARN
+logging.level.org.springframework.amqp=TRACE
+
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/resources/logback.xml b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/test/java/org/baeldung/SpringContextManualTest.java b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/test/java/org/baeldung/SpringContextManualTest.java
new file mode 100644
index 0000000000..a6ee0b6000
--- /dev/null
+++ b/spring-remoting-modules/remoting-amqp/remoting-amqp-server/src/test/java/org/baeldung/SpringContextManualTest.java
@@ -0,0 +1,17 @@
+package org.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.server.AmqpServer;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = AmqpServer.class)
+public class SpringContextManualTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}
diff --git a/spring-remoting-modules/remoting-hessian-burlap/README.md b/spring-remoting-modules/remoting-hessian-burlap/README.md
new file mode 100644
index 0000000000..cacceddc5a
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/README.md
@@ -0,0 +1,12 @@
+## Spring Remoting with Hessian and Burlap
+
+This module contains articles about Spring Remoting with Hessian and Burlap
+
+### Relevant Articles
+
+- [Spring Remoting with Hessian and Burlap](http://www.baeldung.com/spring-remoting-hessian-burlap)
+
+### Overview
+This Maven project contains the Java source code for the Hessian and Burlap modules
+ used in the [Spring Remoting](https://github.com/eugenp/tutorials/tree/master/spring-remoting)
+ series of articles.
diff --git a/spring-remoting-modules/remoting-hessian-burlap/pom.xml b/spring-remoting-modules/remoting-hessian-burlap/pom.xml
new file mode 100644
index 0000000000..e5975b9f37
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/pom.xml
@@ -0,0 +1,24 @@
+
+
+ 4.0.0
+ remoting-hessian-burlap
+ 1.0-SNAPSHOT
+ remoting-hessian-burlap
+ pom
+
+
+
+ com.baeldung
+ parent-boot-1
+ 0.0.1-SNAPSHOT
+ ../../parent-boot-1
+
+
+
+ remoting-hessian-burlap-server
+ remoting-hessian-burlap-client
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/pom.xml b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/pom.xml
new file mode 100644
index 0000000000..1939e00386
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/pom.xml
@@ -0,0 +1,79 @@
+
+
+ 4.0.0
+ remoting-hessian-burlap-client
+ remoting-hessian-burlap-client
+
+
+ com.baeldung
+ remoting-hessian-burlap
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ ${project.groupId}
+ remoting-http-api
+ ${project.version}
+
+
+ com.caucho
+ hessian
+ ${hessian.version}
+
+
+
+ ${project.groupId}
+ remoting-hessian-burlap-server
+ ${project.version}
+ test
+
+
+ javax.servlet
+ javax.servlet-api
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+ test
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ --add-opens java.base/java.lang=ALL-UNNAMED
+
+
+
+
+
+
+
+ 4.0.38
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/BurlapClient.java b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/BurlapClient.java
new file mode 100644
index 0000000000..1079c4163f
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/BurlapClient.java
@@ -0,0 +1,28 @@
+package com.baeldung.client;
+
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+import org.springframework.boot.SpringApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.remoting.caucho.BurlapProxyFactoryBean;
+
+import static java.lang.System.out;
+
+@Configuration
+public class BurlapClient {
+
+ @Bean
+ public BurlapProxyFactoryBean burlapInvoker() {
+ BurlapProxyFactoryBean invoker = new BurlapProxyFactoryBean();
+ invoker.setServiceUrl("http://localhost:8032/b_booking");
+ invoker.setServiceInterface(CabBookingService.class);
+ return invoker;
+ }
+
+ public static void main(String[] args) throws BookingException {
+ CabBookingService service = SpringApplication.run(BurlapClient.class, args).getBean(CabBookingService.class);
+ out.println(service.bookRide("13 Seagate Blvd, Key Largo, FL 33037"));
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/HessianClient.java b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/HessianClient.java
new file mode 100644
index 0000000000..b2a2f4ffae
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/HessianClient.java
@@ -0,0 +1,28 @@
+package com.baeldung.client;
+
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+import org.springframework.boot.SpringApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.remoting.caucho.HessianProxyFactoryBean;
+
+import static java.lang.System.out;
+
+@Configuration
+public class HessianClient {
+
+ @Bean
+ public HessianProxyFactoryBean hessianInvoker() {
+ HessianProxyFactoryBean invoker = new HessianProxyFactoryBean();
+ invoker.setServiceUrl("http://localhost:8032/booking");
+ invoker.setServiceInterface(CabBookingService.class);
+ return invoker;
+ }
+
+ public static void main(String[] args) throws BookingException {
+ CabBookingService service = SpringApplication.run(HessianClient.class, args).getBean(CabBookingService.class);
+ out.println(service.bookRide("13 Seagate Blvd, Key Largo, FL 33037"));
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/resources/logback.xml b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/java/com/baeldung/client/CabBookingServiceIntegrationTest.java b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/java/com/baeldung/client/CabBookingServiceIntegrationTest.java
new file mode 100644
index 0000000000..a1fed9637f
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/java/com/baeldung/client/CabBookingServiceIntegrationTest.java
@@ -0,0 +1,74 @@
+package com.baeldung.client;
+
+import com.baeldung.api.Booking;
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+import com.baeldung.server.Server;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import static java.lang.Thread.sleep;
+
+@SpringBootTest(classes = {BurlapClient.class, HessianClient.class})
+@RunWith(SpringRunner.class)
+public class CabBookingServiceIntegrationTest {
+
+ static Logger log = LoggerFactory.getLogger(CabBookingServiceIntegrationTest.class);
+ @Autowired @Qualifier("burlapInvoker") CabBookingService burlapClient;
+ @Autowired @Qualifier("hessianInvoker") CabBookingService hessianClient;
+ static Thread serverThread;
+
+ @BeforeClass
+ public static void startServer() throws InterruptedException {
+ serverThread = serverThread();
+ log.info("Starting server.");
+ serverThread.start();
+ // increase this enough to let the server start
+ sleep(6000);
+ }
+
+ @org.junit.Test
+ public void bookACabWithBurlapClient() throws InterruptedException {
+ bookACab(this.burlapClient);
+ }
+
+ @org.junit.Test
+ public void bookACabWithHessianClient() throws InterruptedException {
+ bookACab(this.hessianClient);
+ }
+
+ private void bookACab(CabBookingService burlapClient) {
+ Booking booking;
+ try {
+ booking = burlapClient.bookRide("Duomo place");
+ log.info("Booking success: {}", booking);
+ } catch (BookingException e) {
+ log.info("Booking failed: {}", e.getMessage());
+ }
+ }
+
+ @AfterClass
+ public static void stopServer() throws InterruptedException {
+ serverThread.interrupt();
+ serverThread.join();
+ log.info("Server terminated.");
+ }
+
+ static Thread serverThread() {
+ Thread serverThread = new Thread(()-> {
+ log.info("Starting Burlap and Hessian server");
+ Server.main(new String[]{});
+ log.info("Burlap and Hessian server terminated");
+ });
+ serverThread.setDaemon(true);
+ return serverThread;
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/java/org/baeldung/SpringContextTest.java b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/java/org/baeldung/SpringContextTest.java
new file mode 100644
index 0000000000..4325b0ddef
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/java/org/baeldung/SpringContextTest.java
@@ -0,0 +1,18 @@
+package org.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.client.BurlapClient;
+import com.baeldung.client.HessianClient;
+
+@SpringBootTest(classes = {BurlapClient.class, HessianClient.class})
+@RunWith(SpringRunner.class)
+public class SpringContextTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/resources/application.properties b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/resources/application.properties
new file mode 100644
index 0000000000..13577dc391
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-client/src/test/resources/application.properties
@@ -0,0 +1 @@
+application.properties=9999
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/pom.xml b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/pom.xml
new file mode 100644
index 0000000000..68a70f24b6
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/pom.xml
@@ -0,0 +1,50 @@
+
+
+ 4.0.0
+ remoting-hessian-burlap-server
+ remoting-hessian-burlap-server
+
+
+ com.baeldung
+ remoting-hessian-burlap
+ 1.0-SNAPSHOT
+
+
+
+
+ com.baeldung
+ remoting-http-server
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ com.caucho
+ hessian
+ ${hessian.version}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ --add-opens java.base/java.lang=ALL-UNNAMED
+
+
+
+
+
+
+
+ 4.0.38
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/java/com/baeldung/server/Server.java b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/java/com/baeldung/server/Server.java
new file mode 100644
index 0000000000..9c825a2a80
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/java/com/baeldung/server/Server.java
@@ -0,0 +1,41 @@
+package com.baeldung.server;
+
+import com.baeldung.api.CabBookingService;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.remoting.caucho.BurlapServiceExporter;
+import org.springframework.remoting.caucho.HessianServiceExporter;
+import org.springframework.remoting.support.RemoteExporter;
+
+import java.util.Collections;
+
+@Configuration @ComponentScan @EnableAutoConfiguration public class Server {
+
+ @Bean CabBookingService bookingService() {
+ return new CabBookingServiceImpl();
+ }
+
+ @Bean(name = "/booking") RemoteExporter hessianService(CabBookingService service) {
+ HessianServiceExporter exporter = new HessianServiceExporter();
+ exporter.setService(bookingService());
+ exporter.setServiceInterface(CabBookingService.class);
+ return exporter;
+ }
+
+ @Bean(name = "/b_booking") RemoteExporter burlapService(CabBookingService service) {
+ BurlapServiceExporter exporter = new BurlapServiceExporter();
+ exporter.setService(bookingService());
+ exporter.setServiceInterface(CabBookingService.class);
+ return exporter;
+ }
+
+ public static void main(String[] args) {
+ SpringApplication app = new SpringApplication(Server.class);
+ app.setDefaultProperties(Collections.singletonMap("server.port", "8032"));
+ app.run(args);
+ }
+
+}
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/resources/logback.xml b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/test/java/org/baeldung/SpringContextTest.java b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/test/java/org/baeldung/SpringContextTest.java
new file mode 100644
index 0000000000..e676bb0ff2
--- /dev/null
+++ b/spring-remoting-modules/remoting-hessian-burlap/remoting-hessian-burlap-server/src/test/java/org/baeldung/SpringContextTest.java
@@ -0,0 +1,17 @@
+package org.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.server.Server;
+
+@SpringBootTest(classes = Server.class)
+@RunWith(SpringRunner.class)
+public class SpringContextTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}
diff --git a/spring-remoting-modules/remoting-http/README.md b/spring-remoting-modules/remoting-http/README.md
new file mode 100644
index 0000000000..a4f3ea82a9
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/README.md
@@ -0,0 +1,8 @@
+## Remoting HTTP
+
+This module contains articles about Spring Remoting over HTTP
+
+### Relevant Articles:
+
+- [Intro to Spring Remoting with HTTP Invokers](https://www.baeldung.com/spring-remoting-http-invoker)
+
diff --git a/spring-remoting-modules/remoting-http/pom.xml b/spring-remoting-modules/remoting-http/pom.xml
new file mode 100644
index 0000000000..cee1d82196
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/pom.xml
@@ -0,0 +1,23 @@
+
+
+ 4.0.0
+ remoting-http
+ remoting-http
+ pom
+ Parent for all modules related to HTTP Spring Remoting.
+
+
+ com.ossez
+ spring-remoting-modules
+ 1.0-SNAPSHOT
+
+
+
+ remoting-http-server
+ remoting-http-client
+ remoting-http-api
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-http/remoting-http-api/pom.xml b/spring-remoting-modules/remoting-http/remoting-http-api/pom.xml
new file mode 100644
index 0000000000..d84d942659
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-api/pom.xml
@@ -0,0 +1,16 @@
+
+
+ 4.0.0
+ remoting-http-api
+ remoting-http-api
+ API definition shared between client and server.
+
+
+ com.ossez
+ remoting-http
+ 1.0-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/Booking.java b/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/Booking.java
new file mode 100644
index 0000000000..5d2d3683a1
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/Booking.java
@@ -0,0 +1,17 @@
+package com.baeldung.api;
+
+import java.io.Serializable;
+
+import static java.lang.String.format;
+
+public class Booking implements Serializable {
+ private String bookingCode;
+
+ @Override public String toString() {
+ return format("Ride confirmed: code '%s'.", bookingCode);
+ }
+
+ public Booking(String bookingCode) {
+ this.bookingCode = bookingCode;
+ }
+}
diff --git a/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/BookingException.java b/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/BookingException.java
new file mode 100644
index 0000000000..4099db2908
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/BookingException.java
@@ -0,0 +1,7 @@
+package com.baeldung.api;
+
+public class BookingException extends Exception {
+ public BookingException(String message) {
+ super(message);
+ }
+}
diff --git a/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/CabBookingService.java b/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/CabBookingService.java
new file mode 100644
index 0000000000..b554415e07
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-api/src/main/java/com/baeldung/api/CabBookingService.java
@@ -0,0 +1,5 @@
+package com.baeldung.api;
+
+public interface CabBookingService {
+ Booking bookRide(String pickUpLocation) throws BookingException;
+}
diff --git a/spring-remoting-modules/remoting-http/remoting-http-client/pom.xml b/spring-remoting-modules/remoting-http/remoting-http-client/pom.xml
new file mode 100644
index 0000000000..219319f75d
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-client/pom.xml
@@ -0,0 +1,34 @@
+
+
+ 4.0.0
+ remoting-http-client
+ remoting-http-client
+ Shows how to invoke a remote service using Spring Remoting HTTP.
+
+
+ com.ossez
+ remoting-http
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ ${project.groupId}
+ remoting-http-api
+ ${project.version}
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-http/remoting-http-client/src/main/java/com/baeldug/client/Client.java b/spring-remoting-modules/remoting-http/remoting-http-client/src/main/java/com/baeldug/client/Client.java
new file mode 100644
index 0000000000..90f6736a43
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-client/src/main/java/com/baeldug/client/Client.java
@@ -0,0 +1,28 @@
+package com.baeldug.client;
+
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+import org.springframework.boot.SpringApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;
+
+import static java.lang.System.out;
+
+@Configuration
+public class Client {
+
+ @Bean
+ public HttpInvokerProxyFactoryBean invoker() {
+ HttpInvokerProxyFactoryBean invoker = new HttpInvokerProxyFactoryBean();
+ invoker.setServiceUrl("http://localhost:8080/booking");
+ invoker.setServiceInterface(CabBookingService.class);
+ return invoker;
+ }
+
+ public static void main(String[] args) throws BookingException {
+ CabBookingService service = SpringApplication.run(Client.class, args).getBean(CabBookingService.class);
+ out.println(service.bookRide("13 Seagate Blvd, Key Largo, FL 33037"));
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-http/remoting-http-client/src/main/resources/logback.xml b/spring-remoting-modules/remoting-http/remoting-http-client/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-client/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-http/remoting-http-server/pom.xml b/spring-remoting-modules/remoting-http/remoting-http-server/pom.xml
new file mode 100644
index 0000000000..1dd711aedc
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-server/pom.xml
@@ -0,0 +1,28 @@
+
+
+ 4.0.0
+ remoting-http-server
+ remoting-http-server
+ Shows how to expose a service using Spring Remoting HTTP.
+
+
+ com.ossez
+ remoting-http
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ ${project.groupId}
+ remoting-http-api
+ ${project.version}
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-http/remoting-http-server/readme.md b/spring-remoting-modules/remoting-http/remoting-http-server/readme.md
new file mode 100644
index 0000000000..4a2abb5d03
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-server/readme.md
@@ -0,0 +1,12 @@
+Build and launch with the following command.
+
+ mvn clean package tomcat7:run-war
+
+Exposed service is available at following URL.
+
+ http://localhost:9090/spring-remoting-http-server/account
+
+## References
+
+
+
diff --git a/spring-remoting-modules/remoting-http/remoting-http-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java b/spring-remoting-modules/remoting-http/remoting-http-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java
new file mode 100644
index 0000000000..55ec9c5733
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java
@@ -0,0 +1,16 @@
+package com.baeldung.server;
+
+import com.baeldung.api.Booking;
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+
+import static java.lang.Math.random;
+import static java.util.UUID.randomUUID;
+
+public class CabBookingServiceImpl implements CabBookingService {
+
+ @Override public Booking bookRide(String pickUpLocation) throws BookingException {
+ if (random() < 0.3) throw new BookingException("Cab unavailable");
+ return new Booking(randomUUID().toString());
+ }
+}
diff --git a/spring-remoting-modules/remoting-http/remoting-http-server/src/main/java/com/baeldung/server/Server.java b/spring-remoting-modules/remoting-http/remoting-http-server/src/main/java/com/baeldung/server/Server.java
new file mode 100644
index 0000000000..c6b198507f
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-server/src/main/java/com/baeldung/server/Server.java
@@ -0,0 +1,27 @@
+package com.baeldung.server;
+
+import com.baeldung.api.CabBookingService;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter;
+
+@Configuration
+@ComponentScan
+@EnableAutoConfiguration
+public class Server {
+
+ @Bean(name = "/booking") HttpInvokerServiceExporter accountService() {
+ HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
+ exporter.setService( new CabBookingServiceImpl() );
+ exporter.setServiceInterface( CabBookingService.class );
+ return exporter;
+ }
+
+ public static void main(String[] args) {
+ SpringApplication.run(Server.class, args);
+ }
+
+}
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-http/remoting-http-server/src/main/resources/logback.xml b/spring-remoting-modules/remoting-http/remoting-http-server/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-server/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-http/remoting-http-server/src/test/java/org/baeldung/SpringContextTest.java b/spring-remoting-modules/remoting-http/remoting-http-server/src/test/java/org/baeldung/SpringContextTest.java
new file mode 100644
index 0000000000..e676bb0ff2
--- /dev/null
+++ b/spring-remoting-modules/remoting-http/remoting-http-server/src/test/java/org/baeldung/SpringContextTest.java
@@ -0,0 +1,17 @@
+package org.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.server.Server;
+
+@SpringBootTest(classes = Server.class)
+@RunWith(SpringRunner.class)
+public class SpringContextTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}
diff --git a/spring-remoting-modules/remoting-jms/README.md b/spring-remoting-modules/remoting-jms/README.md
new file mode 100644
index 0000000000..2f48a8f57f
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/README.md
@@ -0,0 +1,8 @@
+## Remoting JMS
+
+This module contains articles about Spring Remoting with Java Message Service (JMS)
+
+### Relevant Articles:
+
+- [Spring Remoting with JMS and ActiveMQ](https://www.baeldung.com/spring-remoting-jms)
+
diff --git a/spring-remoting-modules/remoting-jms/pom.xml b/spring-remoting-modules/remoting-jms/pom.xml
new file mode 100644
index 0000000000..fd63fa01c2
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/pom.xml
@@ -0,0 +1,21 @@
+
+
+ 4.0.0
+ remoting-jms
+ remoting-jms
+ pom
+
+
+ com.ossez
+ spring-remoting-modules
+ 1.0-SNAPSHOT
+
+
+
+ remoting-jms-client
+ remoting-jms-server
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-client/pom.xml b/spring-remoting-modules/remoting-jms/remoting-jms-client/pom.xml
new file mode 100644
index 0000000000..4ef18620bb
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-client/pom.xml
@@ -0,0 +1,33 @@
+
+
+ 4.0.0
+ remoting-jms-client
+ remoting-jms-client
+
+
+ com.ossez
+ remoting-jms
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-activemq
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ com.ossez
+ remoting-http-api
+ ${project.version}
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/java/com/baeldung/client/JmsClient.java b/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/java/com/baeldung/client/JmsClient.java
new file mode 100644
index 0000000000..0c5d728f07
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/java/com/baeldung/client/JmsClient.java
@@ -0,0 +1,39 @@
+package com.baeldung.client;
+
+import com.baeldung.api.Booking;
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.jms.remoting.JmsInvokerProxyFactoryBean;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Queue;
+
+@SpringBootApplication
+public class JmsClient {
+
+ @Bean Queue queue() {
+ return new ActiveMQQueue("remotingQueue");
+}
+
+ @Bean FactoryBean invoker(ConnectionFactory factory, Queue queue) {
+ JmsInvokerProxyFactoryBean factoryBean = new JmsInvokerProxyFactoryBean();
+ factoryBean.setConnectionFactory(factory);
+ factoryBean.setServiceInterface(CabBookingService.class);
+ factoryBean.setQueue(queue);
+ return factoryBean;
+ }
+
+ public static void main(String[] args) throws BookingException {
+ CabBookingService service = SpringApplication.run(JmsClient.class, args).getBean(CabBookingService.class);
+ System.out.println("here");
+ Booking bookingOutcome = service.bookRide("13 Seagate Blvd, Key Largo, FL 33037");
+ System.out.println("there");
+ System.out.println(bookingOutcome);
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/resources/application.properties b/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/resources/application.properties
new file mode 100644
index 0000000000..738b030a59
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/resources/application.properties
@@ -0,0 +1,10 @@
+spring.activemq.broker-url=tcp://127.0.0.1:61616
+spring.activemq.packages.trusted=org.springframework.remoting.support,java.lang,com.baeldung.api
+
+# Logging
+logging.pattern.console=%d{mm:ss.SSS} %-5p [%-31t] [%-54logger{0}] %marker%m%ex{full} - %logger - %F:%L%n
+logging.level.root=WARN
+logging.level.org.apache.activemq=DEBUG
+logging.level.org.springframework.jms=DEBUG
+logging.level.org.springframework=WARN
+
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/resources/logback.xml b/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-client/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-client/src/test/java/org/baeldung/SpringContextTest.java b/spring-remoting-modules/remoting-jms/remoting-jms-client/src/test/java/org/baeldung/SpringContextTest.java
new file mode 100644
index 0000000000..95721b6eaa
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-client/src/test/java/org/baeldung/SpringContextTest.java
@@ -0,0 +1,17 @@
+package org.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.client.JmsClient;
+
+@SpringBootTest(classes = JmsClient.class)
+@RunWith(SpringRunner.class)
+public class SpringContextTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-server/pom.xml b/spring-remoting-modules/remoting-jms/remoting-jms-server/pom.xml
new file mode 100644
index 0000000000..697c0612e3
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-server/pom.xml
@@ -0,0 +1,33 @@
+
+
+ 4.0.0
+ remoting-jms-server
+ remoting-jms-server
+
+
+ com.ossez
+ remoting-jms
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-activemq
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ com.ossez
+ remoting-http-api
+ ${project.version}
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java
new file mode 100644
index 0000000000..55ec9c5733
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java
@@ -0,0 +1,16 @@
+package com.baeldung.server;
+
+import com.baeldung.api.Booking;
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+
+import static java.lang.Math.random;
+import static java.util.UUID.randomUUID;
+
+public class CabBookingServiceImpl implements CabBookingService {
+
+ @Override public Booking bookRide(String pickUpLocation) throws BookingException {
+ if (random() < 0.3) throw new BookingException("Cab unavailable");
+ return new Booking(randomUUID().toString());
+ }
+}
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/java/com/baeldung/server/JmsServer.java b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/java/com/baeldung/server/JmsServer.java
new file mode 100644
index 0000000000..8572718042
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/java/com/baeldung/server/JmsServer.java
@@ -0,0 +1,51 @@
+package com.baeldung.server;
+
+import com.baeldung.api.CabBookingService;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.jms.listener.SimpleMessageListenerContainer;
+import org.springframework.jms.remoting.JmsInvokerServiceExporter;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Queue;
+
+@SpringBootApplication public class JmsServer {
+
+ /*
+ This server needs to be connected to an ActiveMQ server.
+ To quickly spin up an ActiveMQ server, you can use Docker.
+
+ docker run -p 61616:61616 -p 8161:8161 rmohr/activemq:5.14.3
+ */
+
+ @Bean CabBookingService bookingService() {
+ return new CabBookingServiceImpl();
+ }
+
+ @Bean Queue queue() {
+ return new ActiveMQQueue("remotingQueue");
+}
+
+ @Bean JmsInvokerServiceExporter exporter(CabBookingService implementation) {
+ JmsInvokerServiceExporter exporter = new JmsInvokerServiceExporter();
+ exporter.setServiceInterface(CabBookingService.class);
+ exporter.setService(implementation);
+ return exporter;
+ }
+
+ @Bean SimpleMessageListenerContainer listener(ConnectionFactory factory, JmsInvokerServiceExporter exporter) {
+ SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
+ container.setConnectionFactory(factory);
+ container.setDestinationName("remotingQueue");
+ container.setConcurrentConsumers(1);
+ container.setMessageListener(exporter);
+ return container;
+ }
+
+ public static void main(String[] args) {
+ SpringApplication.run(JmsServer.class, args);
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/resources/application.properties b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/resources/application.properties
new file mode 100644
index 0000000000..738b030a59
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/resources/application.properties
@@ -0,0 +1,10 @@
+spring.activemq.broker-url=tcp://127.0.0.1:61616
+spring.activemq.packages.trusted=org.springframework.remoting.support,java.lang,com.baeldung.api
+
+# Logging
+logging.pattern.console=%d{mm:ss.SSS} %-5p [%-31t] [%-54logger{0}] %marker%m%ex{full} - %logger - %F:%L%n
+logging.level.root=WARN
+logging.level.org.apache.activemq=DEBUG
+logging.level.org.springframework.jms=DEBUG
+logging.level.org.springframework=WARN
+
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/resources/logback.xml b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-jms/remoting-jms-server/src/test/java/com/baeldung/SpringContextLiveTest.java b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/test/java/com/baeldung/SpringContextLiveTest.java
new file mode 100644
index 0000000000..4904873be2
--- /dev/null
+++ b/spring-remoting-modules/remoting-jms/remoting-jms-server/src/test/java/com/baeldung/SpringContextLiveTest.java
@@ -0,0 +1,23 @@
+package com.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.server.JmsServer;
+
+/**
+ * This Live Test requires:
+ * * the `com.baeldung:remoting-http-api:jar:1.0-SNAPSHOT` artifact accessible. For that we can run `mvn clean install` in the 'spring-remoting/remoting-http/remoting-http-api' module.
+ * * an ActiveMQ instance running (e.g. `docker run -p 61616:61616 -p 8161:8161 --name bael-activemq rmohr/activemq`)
+ *
+ */
+@SpringBootTest(classes = JmsServer.class)
+@RunWith(SpringRunner.class)
+public class SpringContextLiveTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}
diff --git a/spring-remoting-modules/remoting-rmi/README.md b/spring-remoting-modules/remoting-rmi/README.md
new file mode 100644
index 0000000000..082b5c37ed
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/README.md
@@ -0,0 +1,7 @@
+## Remoting RMI
+
+This module contains articles about Spring Remoting with Remote Method Invocation (RMI)
+
+### Relevant Articles:
+
+- [Spring Remoting with RMI](https://www.baeldung.com/spring-remoting-rmi)
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-rmi/pom.xml b/spring-remoting-modules/remoting-rmi/pom.xml
new file mode 100644
index 0000000000..aece04a64f
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/pom.xml
@@ -0,0 +1,21 @@
+
+
+ 4.0.0
+ remoting-rmi
+ remoting-rmi
+ pom
+
+
+ com.baeldung
+ spring-remoting-modules
+ 1.0-SNAPSHOT
+
+
+
+ remoting-rmi-server
+ remoting-rmi-client
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-client/pom.xml b/spring-remoting-modules/remoting-rmi/remoting-rmi-client/pom.xml
new file mode 100644
index 0000000000..91630a88e9
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-client/pom.xml
@@ -0,0 +1,33 @@
+
+
+ 4.0.0
+ remoting-rmi-client
+ remoting-rmi-client
+
+
+ com.baeldung
+ remoting-rmi
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-activemq
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ com.baeldung
+ remoting-http-api
+ ${project.version}
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/main/java/com/baeldung/client/RmiClient.java b/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/main/java/com/baeldung/client/RmiClient.java
new file mode 100644
index 0000000000..a568b749f9
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/main/java/com/baeldung/client/RmiClient.java
@@ -0,0 +1,26 @@
+package com.baeldung.client;
+
+import com.baeldung.api.Booking;
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.remoting.rmi.RmiProxyFactoryBean;
+
+@SpringBootApplication public class RmiClient {
+
+ @Bean RmiProxyFactoryBean service() {
+ RmiProxyFactoryBean rmiProxyFactory = new RmiProxyFactoryBean();
+ rmiProxyFactory.setServiceUrl("rmi://localhost:1099/CabBookingService");
+ rmiProxyFactory.setServiceInterface(CabBookingService.class);
+ return rmiProxyFactory;
+ }
+
+ public static void main(String[] args) throws BookingException {
+ CabBookingService service = SpringApplication.run(RmiClient.class, args).getBean(CabBookingService.class);
+ Booking bookingOutcome = service.bookRide("13 Seagate Blvd, Key Largo, FL 33037");
+ System.out.println(bookingOutcome);
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/main/resources/logback.xml b/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/test/java/com/baeldung/SpringContextLiveTest.java b/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/test/java/com/baeldung/SpringContextLiveTest.java
new file mode 100644
index 0000000000..73f7592dcc
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-client/src/test/java/com/baeldung/SpringContextLiveTest.java
@@ -0,0 +1,23 @@
+package com.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.client.RmiClient;
+
+/**
+ * This Live Test requires:
+ * * the `com.baeldung:remoting-http-api:jar:1.0-SNAPSHOT` artifact accessible. For that we can run `mvn clean install` in the 'spring-remoting/remoting-http/remoting-http-api' module.
+ * * the 'spring-remoting\remoting-rmi\remoting-rmi-server' service running
+ *
+ */
+@SpringBootTest(classes = RmiClient.class)
+@RunWith(SpringRunner.class)
+public class SpringContextLiveTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-server/pom.xml b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/pom.xml
new file mode 100644
index 0000000000..ecf57018ec
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/pom.xml
@@ -0,0 +1,33 @@
+
+
+ 4.0.0
+ remoting-rmi-server
+ remoting-rmi-server
+
+
+ com.baeldung
+ remoting-rmi
+ 1.0-SNAPSHOT
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ com.baeldung
+ remoting-http-api
+ ${project.version}
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java
new file mode 100644
index 0000000000..55ec9c5733
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/java/com/baeldung/server/CabBookingServiceImpl.java
@@ -0,0 +1,16 @@
+package com.baeldung.server;
+
+import com.baeldung.api.Booking;
+import com.baeldung.api.BookingException;
+import com.baeldung.api.CabBookingService;
+
+import static java.lang.Math.random;
+import static java.util.UUID.randomUUID;
+
+public class CabBookingServiceImpl implements CabBookingService {
+
+ @Override public Booking bookRide(String pickUpLocation) throws BookingException {
+ if (random() < 0.3) throw new BookingException("Cab unavailable");
+ return new Booking(randomUUID().toString());
+ }
+}
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/java/com/baeldung/server/RmiServer.java b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/java/com/baeldung/server/RmiServer.java
new file mode 100644
index 0000000000..7778c65e85
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/java/com/baeldung/server/RmiServer.java
@@ -0,0 +1,34 @@
+package com.baeldung.server;
+
+import com.baeldung.api.CabBookingService;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.remoting.rmi.RmiServiceExporter;
+
+@SpringBootApplication public class RmiServer {
+
+ @Bean CabBookingService bookingService() {
+ return new CabBookingServiceImpl();
+ }
+
+ @Bean RmiServiceExporter exporter(CabBookingService implementation) {
+
+ // Expose a service via RMI. Remote obect URL is:
+ // rmi://:/
+ // 1099 is the default port
+
+ Class serviceInterface = CabBookingService.class;
+ RmiServiceExporter exporter = new RmiServiceExporter();
+ exporter.setServiceInterface(serviceInterface);
+ exporter.setService(implementation);
+ exporter.setServiceName(serviceInterface.getSimpleName());
+ exporter.setRegistryPort(1099);
+ return exporter;
+ }
+
+ public static void main(String[] args) {
+ SpringApplication.run(RmiServer.class, args);
+ }
+
+}
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/resources/logback.xml b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/resources/logback.xml
new file mode 100644
index 0000000000..7d900d8ea8
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/test/java/org/baeldung/SpringContextTest.java b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/test/java/org/baeldung/SpringContextTest.java
new file mode 100644
index 0000000000..6cae1b66fc
--- /dev/null
+++ b/spring-remoting-modules/remoting-rmi/remoting-rmi-server/src/test/java/org/baeldung/SpringContextTest.java
@@ -0,0 +1,17 @@
+package org.baeldung;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.server.RmiServer;
+
+@SpringBootTest(classes = RmiServer.class)
+@RunWith(SpringRunner.class)
+public class SpringContextTest {
+
+ @Test
+ public void whenSpringContextIsBootstrapped_thenNoExceptions() {
+ }
+}