Questions tagged [spring-remoting]

Spring Remoting exposes services over the web for Spring clients to consume as easily as though they were locally instantiated. Commonly, Spring Remoting is used to expose a published interface over HTTP and with data serialized between the client and server using Java serialization.

Spring features integration classes for remoting support using various technologies. The remoting support eases the development of remote-enabled services, implemented by your usual (Spring) POJOs. Currently, Spring supports the following remoting technologies:

  • Remote Method Invocation (RMI). Through the use of the RmiProxyFactoryBean and the RmiServiceExporter Spring supports both traditional RMI (with java.rmi.Remote interfaces and java.rmi.RemoteException) and transparent remoting via RMI invokers (with any Java interface).
  • Spring’s HTTP invoker. Spring provides a special remoting strategy which allows for Java serialization via HTTP, supporting any Java interface (just like the RMI invoker). The corresponding support classes are HttpInvokerProxyFactoryBean and HttpInvokerServiceExporter.
  • Hessian. By using Spring’s HessianProxyFactoryBean and the HessianServiceExporter you can transparently expose your services using the lightweight binary HTTP-based protocol provided by Caucho. (Note that Burlap, Caucho’s XML-based alternative to Hessian, is also supported but in a deprecated form).
  • JAX-WS. Spring provides remoting support for web services via JAX-WS
  • JMS. Remoting using JMS as the underlying protocol is supported via the JmsInvokerServiceExporter and JmsInvokerProxyFactoryBean classes.
  • AMQP. Remoting using AMQP as the underlying protocol is supported by the Spring AMQP project.

Useful links:

89 questions
12
votes
6 answers

Is it possible to remotely expose a bean in spring boot using REST and httpInvoker

I need to expose some service for remote use by Java clients (they shall use httpinvoker) and other languages (they shall use REST). Can I configure spring boot to expose both ? (I would not mind if two separate instances with different ports would…
Marged
  • 10,577
  • 10
  • 57
  • 99
12
votes
1 answer

Getting ConnectionTimeoutException with the host did not accept the connection within timeout

Can Some one Help me, how we can solve the following problem. nested exception is org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 10000 ms …
Sanjana
  • 121
  • 1
  • 1
  • 4
10
votes
3 answers

Load spring context in an EJB based application

The following is the situation : I have a business layer, that is an EJB project. In fact, there is only one EJB that is created. This EJB is responsible to expose the service classes to other layers, that calls the EJB. I want to introduce spring…
dash27
  • 131
  • 1
  • 1
  • 6
8
votes
1 answer

Spring HttpRemoting client as a Java Configuration Bean

I'm trying to migrate Spring from XmlApplicationContext to AnnotationConfigApplicationContext (more info: Java-based container configuration). Everything works perfectly but I don't know how to create a HttpInvoker client. The XML configuration is…
Mike Minicki
  • 8,216
  • 11
  • 39
  • 43
7
votes
3 answers

Spring: Properly setup @ComponentScan

I have following set up for my Spring Application Context. @Configuration public class RmiContext { @Bean public RmiProxyFactoryBean service() { RmiProxyFactoryBean rmiProxy = new RmiProxyFactoryBean(); …
TheKojuEffect
  • 20,103
  • 19
  • 89
  • 125
6
votes
4 answers

BigDecimal value is always zero when transfered with Spring remoting via Hessian

When I call a remote method that returns a BigDecimal value via Spring's Hessian functionality, it always returns zero. Calling the method directly or using the plain Hessian servlet (non Spring) works normally. What can be done to fix this? Server…
Vedran
  • 10,369
  • 5
  • 50
  • 57
5
votes
2 answers

Thread is blocked when use restTemplate

I encounter a problem that threads of my app has locked/blocked when communicate with a remote server using Spring's RestTemplate. Here is the jstack info of one blocked thread: "pool-1-thread-8" prio=10 tid=0x00007fbfd012d800 nid=0x27b1 runnable…
Wuaner
  • 929
  • 2
  • 14
  • 31
4
votes
0 answers

RMI Spring on Tomcat

I have a RMI Server application and a RMI Client Application. Both configured with Spring Remoting. Running the client as Java Application runs fine, connecting to the server. I want to add the RMI Client .jar to a Spring MVCapplication running in…
AdrianS
  • 1,980
  • 7
  • 33
  • 51
4
votes
1 answer

Can I wire a URI to every method of a Camel proxy class?

With Camel proxy I can do the following: public class MyBean { @Produce(uri = "direct:mybean") private MyProxy producer; public void doSomething() { String response = producer.sayHello("James"); } } where MyProxy is…
Emil Gotsev
  • 223
  • 2
  • 12
4
votes
0 answers

Couldn't create SOAP message due to exception: Unable to create StAX reader or writer

I'm changing the whole question now. I'm trying to connect to a SOAP service. On windows it works all right, in the application and on SoapUI. On Linux neither of them work. The output to the same request on Linux comes:
digao_mb
  • 1,294
  • 16
  • 23
3
votes
1 answer

Spring security and remoting

i am using spring remoting alongside spring security I have 2 servers (let's call them "front" and "back") The "front" server is exposed to the outside world and receives, along with the rest of the request, the "Authorization" header. However, i…
ShinySpiderdude
  • 1,170
  • 4
  • 14
  • 18
3
votes
1 answer

RmiProxyFactoryBean + Autowired(required=false)

I have 5 projects - 4 of which are run on the console (say A,B,C and D) with java -jar A.jar etc and 1 web application (E). The web application is deployed on a number of isolated servers some of which also have a combination of A, B, C and D…
James
  • 1,720
  • 5
  • 29
  • 50
3
votes
2 answers

How do I get the size of a response from a Spring 2.5 HTTP remoting call?

I've been poking around the org.springframework.remoting.httpinvoker package in Spring 2.5 trying to find a way to get visibility into the size of the response, but I keep going around in circles. Via another question I saw here, I think what I…
aarestad
  • 586
  • 1
  • 5
  • 19
3
votes
1 answer

Apache Camel - JMS Remoting: Exception not thrown back to the producer

I'm looking for a solution to make the exception thrown on the consumer side returned to the producer side when using Apache Camel - JMS Remoting. I found there is a similar question asked already at Apache Camel JMS - Exceptions not returned to…
3
votes
1 answer

org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service occurs when starting tasks from anbother thread

I have spring application with JavaFX client, and I get this exception when ever come method is called which runs in another thread (for background tasks) - which is not the main JavaFx thread. org.springframework.remoting.RemoteAccessException:…
Julia
  • 1,217
  • 8
  • 23
  • 46
1
2 3 4 5 6