Stable Spring version release - ajax

Right now I am trying to research on how stable Spring release are right now. I'm having problems determining whether the most current Spring release (3.1.1) is the best choice for a base architecture. Are there any differences between 3.0 and 3.1? If so are there any impact in terms of coding structure just like migrating from spring 2.0 to 3.0. Currently we have a base architecture for Spring 2.0 and we are thinking of migrating to 3.X for integrated AJAX support and integrated REST support as well. Are there any other perks in migrating to 3.X? Is it good idea to migrate to Spring 3.0? If yes are there any drawbacks in migrating also which version is the best to migrate to? Thanks for taking time in reading this, have a nice day.

Are there any differences between 3.0 and 3.1?
http://static.springsource.org/spring/docs/3.1.x/changelog.txt
EDIT:
ok, it that's too technical, try this:
http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/new-in-3.1.html
EDIT 2:
no, you do not have to use annotations. That's just a convenience feature mostly.
EDIT 3:
in Implementing Controllers all annotation based configurations have their XML-schema based counterparts. That said, unless you have very good reasons against annotations, you might try to gradually switch to this paradigm, as it is easier to read thus easier to maintain. (at least in in my opinion)

I've migrated some projects from spring 2.5.6 to spring-3.1 without any major problems. I can't speak to spring-3.1.1, but if its a non-milestone release I would be comfortable upgrading myself.
Here's a link to spring-3.1 features: http://static.springsource.org/spring/docs/3.1.0.M2/spring-framework-reference/html/new-in-3.1.html
If you're moving up from 2.x to 3.x I don't see any reason why you would NOT upgrade to 3.1, even if you don't see immediate use for 3.1 features.

Yes, there are some minor differences between Spring 3.0 and 3.1, some of them are well documented through the book Pro Spring 3, basically the JPA support has been improved with helper features like the spring-data project, the support of some standard compliant Java EE annotations and the possibility to create beans "profiles" inside your xml configuration that can be handy when used alongside with maven, among others features.
Migrating from 2.0 to 3.x shouldn't be problematic if you stick to the old xml based configuration

Related

Does Spring 3.x is still legitimately good for new learners in comparison with 4.x and 5.x versions?

Does Spring 3.x is still legitimately good for new learners in comparison with 4.x and 5.x versions? And does it still covers the most of spring fundamentals? And on high level what one has missed, if he didn't touched the 4.x and 5.x ?
Does Spring 3.x is still legitimately good for new learners in comparison with 4.x and 5.x versions?
No, because you would be learning old ways of implementing for example JSR.
Here are some difference between spring 3 and spring 4.
*RestController annotation
*JSR-335 Lambda expressions
*JSR-310 Date-Time value types for Spring data binding and formatting.
*JSR-343 JMS 2.0.
*JSR-338 JPA 2.1.
*JSR-349 Bean Validation 1.1.
*JSR-236 Java EE 7 Enterprise Concurrency support.
*JSR-356 Spring’s WebSocket endpoint mode.
*Configuring and implementing Spring style application using Groovy 2. Also they specify that first class support for the Groovy applications.
*Also spring plans to add the HATEOS (Hypermedia as the Engine of Application State) support for REST APIs.
Also Spring 4 is the minimum requirement for running spring boot applications.
And does it still covers the most of spring fundamentals?
Yes, you can get a great introduction with Spring framework and MVC approach, but that is also covered in spring 5 courses as well.
And on high level what one has missed, if he didn't touch the 4.x and 5.x ?
Consider the difference between 3 and 4 on top and to add the difference between spring 4 and 5
*JDK baseline update.
*Core framework revision.
*Core container updates.
*Functional programming with Kotlin.
*Reactive Programming Model.
*Testing improvements.
*Library support.
*Discontinued support.

How long will Spring 3.x continue to be supported?

I've recently inherited a project that's built on some older technologies, including iBATIS 2.x, and Struts 1.x. Both of those seem to be supported (though #Deprecated) in Spring 3.2.x, and not at all in Spring 4.x:
org.springframework.orm.ibatis, Object Relational Mapping (ORM) Data Access - iBATIS SQL Maps
org.springframework.web.struts, Integrating with other web frameworks - Apache Struts 1.x and 2.x
However, before I start the effort of migrating to Spring 3, I want to know how much longer I can expect to see it supported by the upstream developers. Would I have enough time to keep running Spring 3 while I migrate other parts of my application to newer tools, and then finally migrate over to Spring 4? Or should I focus on upgrading all of these other things before I can get onto Spring?
I hardly understand your problem. iBATIS 2.x and Struts 1.x are both no longer supported. They can work fine, as does Spring 2.x, but if a security problem is discovered, it will not be fixed.
If you contemplate migrating to Spring 3.x, you should also contemplate the migration to MyBatis and Struts 2.x (or Spring MVC ?) unless you have special requirements.
BTW, Spring 3.0 and 3.1 series are no longer supported either, and support for 3.2 should end when 4.2 will reach General Availability status, as Spring Framework generally offers support for current version, and the 2 previous (legacy) ones.
Spring 3.X will be end-of-life as of Dec 31 2016, but there will only be maintenance releases until that time (no feature development will happen).
I just work on project that uses Spring 4 with MyBatis. There is project MyBatis-Spring that integrates these two. Works like charm.
Don't know how to help with second bullet, cause we are using Spring MVC.
Seems that they've just posted a blog post that includes clarification on this topic:
Furthermore, please note that the 3.2.x line - and therefore the
entire 3.x generation - is approaching its end of life in 2015. We are
still committed to basic maintenance for critical issues; however,
don’t expect more than two or three further 3.2.x releases down the
road.
Source: Spring Framework 4.1.4 & 4.0.9 & 3.2.13 released
So, it seems that I'd have at least a few months of 3.x being supported to work on transitioning everything.
For my current project I'm required to use Struts 1.2.4. But I also wanted to utilize Spring 4.1.x.
To compensate for the missing Struts support since Spring 4, I copied the code from the spring-struts 3.2.13 package and created a Spring 4.1.5 compatible spring-struts-forwardport package.
Obviously this is not the most elegant solution, but maybe this can help you solve your problem.
I guess this package will also work with the next Spring 4.1 releases.

How to implement aspects without using Springs as well as annotations?

I am currently trying to implement aspects for a dynamic web project. The problem is that IBM Websphere 6.0 which supports java version 1.3 and 1.4 only. I cannot implement aspects with annotations because for that I will need java 1.5 or higher. I do not want to use springs also. Is there any way through which I can implement aspects without using Springs and annotations.
OMG, Java 1.4? Even Java 6 is unsupported nowadays. But #geoand is right, you can use AspectJ with compliance level 1.4. I would rather recommend upgrading to a more up to date JVM though.

Using Jersey-spring with Spring 4.0

According to you what are the risks of using Spring 4 with the jersey-spring3 integration module?
I have tried to use Spring 4.0 with the jersey spring example and the example still works but i'm unable to identify risks linked to this usage.
I have started using Jersey 2.7 and Spring 4.0.x recently in a project. I have setup a context hierarchy to inject beans, so far, I have discovered only one limitiation but that does not seem relate to Spring 4 but rather to the module itself or the HK2 Spring Bridge.
To give more insight about my use. I have a XJC/JAXB-backed which is consumed by a common service, repository and exposed through JAX-WS, and now hopefully through JAX-RS.
The multi-context stuff works now with #Autowiredwith 2.8-SNAPSHOT. I have applied my changes and the 2.8-SNAPSHOT to 2.7. Here is the diff.
Edit (Michael-O; 2014-10-17): Here is a modified Spring module based off 2.11 with multi-context support.
Not an answer to original question, just related information
This may be a little premature, but the new Major 3.0 version of Jersey will be using Spring 4, in the new jersey-spring4 module. The new Major version will be built with Java 8. Though a new Major version will be released, the 2.x line will still be actively developed to keep support for Java 7
I'll update this post once 3.0 has been release.
For anyone interested, you can see this mailing list to see what the Jersey team has to say about the new 3.x line.
Not sure if you came across any issues but I currently face one. It is described in other thread.
Simply, using jersey-spring3 2.12 and spring 4.1.0.RELEASE in one maven project leads to following class incompatibility:
2014-09-14 01:15:44.175:WARN:oejuc.AbstractLifeCycle:main: FAILED org.eclipse.jetty.server.handler.HandlerCollection#696
db620[org.eclipse.jetty.server.handler.ContextHandlerCollection#27abb6ca[o.e.j.m.p.JettyWebAppContext#737d100a{/,file:/C
:/Users/Josef/Workspace/TransitCenter/src/main/webapp/,STARTING}{file:/C:/Users/Josef/Workspace/TransitCenter/src/main/w
ebapp/}], org.eclipse.jetty.server.handler.DefaultHandler#6968c1d6, org.eclipse.jetty.server.handler.RequestLogHandler#7
d986d83]: java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependenc
yComparator()Ljava/util/Comparator;
java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparato
r()Ljava/util/Comparator;
at org.springframework.context.annotation.AnnotationConfigUtils.registerAnnotationConfigProcessors(AnnotationCon
figUtils.java:136)

Is it possible to use Struts 1.1 and Spring MVC simultaneously?

As the title states I have in mind using Struts 1.1 and Spring MVC simultaneously.
There's a huge project using Struts 1.1 which is undoubtly outdated, but the effort to completely migrate to Spring MVC would be way too big.
So the plan is to use both of them, making some things easier.
Is this generally possible and how could this be done?
Struts 1.1 support has been removed in version 4.0 but it's supported on 3.2.x
see http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/web-integration.html#struts

Resources