I have a Spring MVC application. UI makes some asynchronous requests to back end. Backend processes the requests and sends the response. Current implementation is done with the help of queues and listeners.I want to replace it with Web Sockets.I understand that JDK 7 supports websockets out of the box. My application gets deployed on different servers like Tomcat 6.0, WebSphere Application Server etc. Would it make any difference?
Spring MVC does not support WebSocket so what is the work aorund?
There's no support for WebSockets in Spring 3.2 There's a log for it in Spring 4 here
There's also a blog post about how to use it in Spring 4 here
Spring released 4.0 GA which supports Websocket, tomcat 7.0.47+ will be required for the websocket implementation.
http://spring.io/blog/2013/12/12/announcing-spring-framework-4-0-ga-release
Related
Just for context: How to route requests to a different servlet with WebFlux
Shortly, Netty web server is unable to run neither Apache CXF nor Spring WS because they work on top of Servlet API. But what about Tomcat? Tomcat supports newer Servlet API version
which in its turn supports reactive API (webflux).
The question is: Is it possible to run WebFlux with Tomcat server and Spring WS for SOAP ?
One servlet will be used for handling reactive operations, and the other for SOAP actions.
You cannot run webflux on Tomcat using servlet (needed for CXF/Spring WS).
We have have an application who have a service and dao layer. It use spring 3.2
We started to create a new web application who use spring 4 (client side and controller).
What could be the best technology to communicate both application? Both are not on the same server.
I know there is spring remoting, but I don't know if it's still a good solution.
I'd recommend exposing the service layer using contract first SOAP or REST web services. They'll be reusable by any client that can make an HTTP request, including your new app.
Spring remoting is a fine solution and only takes a few minutes get set up.
I want to use Web HTML5 sockets with Spring MVC. A few days ago I heard that Spring 3.2 release will come up with Web Sockets support for real time updates.
http://blog.springsource.org/2012/05/08/spring-mvc-3-2-preview-techniques-for-real-time-updates/
But still not able to find any sample code which provide me the facility of real time update. I am using Tomcat for this purpose now but want to shift to Spring. Please see if you can help me finding a very good example of to use Web HTML5 sockets with Spring MVC.
At the end of the blog post there's this paragraph:
Coming back to Spring MVC 3.2, the Servlet 3 async feature can be used for long-running requests and also for HTTP streaming, techniques Filip Hanik referred to as "the server version of client AJAX calls". As for WebSockets, there is no support yet in Spring 3.2 but it will most likely be included in Spring 3.3. You can watch SPR-9356 for progress updates.
So there is no support for WebSockets in Spring MVC 3.2. The [SPR-9356] issue says that the feature is in the Spring 4.0 backlog. 1
I am migrating a web application based on Apache Tomcat 7.0.35 using the WebSocket Servlets to IBM WebSphere Application Server (WAS). The problem is that I don't think WAS supports WebSockets.
You can try the WebSphere Liberty 8.5.5.4 -- this supports WebSockets. See announcement here.
See also:
Liberty profile: Web Sockets
WAS doesn't support WebSockets as stated on an IBM forum here. What you can do is to investigate if you can deploy in WAS one of the WebSockets server implementations (check this list).
You can also try embedding the Jetty Web Server on the java application to run on your WebSphere Application Server - http://www.eclipse.org/jetty/documentation/current/embedding-jetty.html. Another option is to make use of a WebSockets implementation (e.g. Wabbit), or make use of an Application Server that supports the Java EE 7 specs, like IBM WAS 9.
I have a server which uses spring 2.5.6 and currently my client spring mvc application are also using same version 2.5.6. I use httpinvoker for the connection between the two. I want to update and benefit of spring mvc 3, but I can not do anything with the server.
My questions is:
Will it work to use a different version of spring on the web-application than on the server-side?
And can this have side-effects that can cause problems?