Posts Tagged ‘spring 3.0’

New Spring Mock Certification Exam

March 4th, 2012 2 comments
Elric has added a new Spring Mock certification Practice test for our readers . The questions are close to the real exam and will help you in practicing for the test or to test your Spring proficiency
Test Details : 50 questions, 88 minutes to complete and a minimal score of 76% to reach (38 right questions)
Repartition of the questions  by category:
  • Container  (13)
  • Test (5)
  • AOP (10)
  • Data Access (5)
  • Transactions (5)
  • Spring MVC (3)
  • Spring Security (3)
  • Remoting (2)
  • JMS (2)
  • JMX (2)

Please take the test and give your feedback to Elric. Thanks to Elric for taking out time to create the test and share with the community

Spring certifications tests at Skill-guru

May 2nd, 2011 No comments

For users  who have been taking the Spring certification practice tests 1 and  Spring certification practice tests 2 at skill-guru  have raise the concern that

We have contacted the creator of these tests Ikoko , and he has clarified thatthe Spring documentation for the exam syllabus has changed (improved) since he had created the exam so the tests now appear to be different to the syllabus

The historical documentation and support for the certification has been poor from Spring and might even be incorrect.

he also pointed out that Skill-guru test-takers basing their opinions on the Spring documentation and not actually doing the Spring exam are therefore possibly misled by the official documentation

From Ikoko’s email

I sat both the 2.5 exam and 3.0 exam so have experienced both exams first-hand and have been keen to keep my exams accurate based on real exam-experience and not any vague syllabus published by Spring

Having said all, this at a higher topic level I only noticed the category of SpEL (Spring expression language) being a category in my tests that was not in the offical syllabus. I had 1 SpEL question in test 1, and 2 questions in test 2. I have now removed all three questions.

Hope  this clarifies the doubt of our readers and thanks to MaggieL and Shane Mannion for pointing this out

Spring 3 MVC – Using mvc:interceptors

March 30th, 2011 1 comment

One of the new feature in Spring 3 MVC  has been introduction of  mvc  XML configuration namespace that simplifies the setup of Spring MVC inside the web application.

Spring 3 allows you to intercept the request and response headers without writing the filter explicitly .  Spring’s handler mapping mechanism includes handler interceptors.

If you would prefer to write a filter explicitly, it has been covered in Servlet Filter to prevent No Cache.

From Spring MVC docs

Interceptors located in the handler mapping must implement HandlerInterceptor from the org.springframework.web.servlet package. This interface defines three methods: one is called before the actual handler is executed; one is called after the handler is executed; and one is called after the complete request has finished. These three methods should provide enough flexibility to do all kinds of preprocessing and postprocessing

You have an option in which instead of writing your own custom class, you can modify the servlet-Context.xml file to provide no caching feature

Here is what will go inside the file

<bean id=”webContentInterceptor”>
<property name=”cacheSeconds” value=”0″/>
<property name=”useExpiresHeader” value=”true”/>
<property name=”useCacheControlHeader” value=”true”/>
<property name=”useCacheControlNoStore” value=”true”/>
</mvc:interceptors> Read more…

Spring adds JSON support

January 27th, 2010 No comments

We had posted a tutorial example on JSON  Java script sometimes back. It became a pretty popular post and people gave good feedback about it.  Some how the post got deleted and with it all the user’s comment. We apologize to our users. Here is the post JSON JavaScript Tutorial.   JSON is really cool and gives a lot of power in hands of developer.

Spring 3.0 which has come up with a lot of simplification like asynchronous method invocation , have also simplified AJAX calls.  You can now now invoke server side code with JSON and Spring 3 provide support for that. Details on it can be read from Spring Source blog AJAX Simplification in Spring 3

PS: Last time I checked out the spring blog,  the above url was pointing to wrong post. They might have fixed it by now

Asynchronous method invocation in Spring 3.0

January 13th, 2010 24 comments

Spring 3.0  has added  annotation support for both task scheduling and asynchronous method execution.  We will discuss @Async annotation and its uses.

The @Async annotation

The @Async annotation allows invocation of that method to occur asynchronously. In other words, the caller will return immediately upon invocation.

One of the use cases of @Async function can be in situations where in user registers and system has to send confirmation mail or any similar task where you do not want to block user.

We will look at the  example below to explain it more clearly . Since for most of you this will be first Spring 3.0 application, please notice the changes in applicationContext.xml. Read more…

Spring Framework 3.0 M3 released

June 25th, 2009 1 comment

Spring team has released 3.0 version of their popular Spring source framework. This is a third major release  after 2.0 and 2.5 .

What are the new features in Spring 3.0?

1. The Spring Framework is now based on Java 5, and Java 6 is fully supported.

2. The entire framework code has been revised to take advantage of Java 5 features like generics, varargs and other language improvements.  The code is still compatible with older versions of Java

3. Spring Expression Language – Spring has introduced an expression language which is similar to Unified EL in its syntax but offers significantly more features

The following is an example of how the Expression Language can be used to configure some properties of a database setup

<bean class=“mycompany.RewardsTestDatabase”> <property name=“databaseName” value=“#{systemProperties.databaseName}”/> <property name=“keyGenerator” value=“#{strategyBean.databaseKeyGenerator}”/> </bean>

4. Some core features from the JavaConfig project have been added to the Spring Framework now. This means that the following annotations are now directly supported:

  • @Configuration
  • @Bean
  • @Primary
  • @Lazy
  • @Import
  • @Value

5. Additional annotations such as @CookieValue and @RequestHeaders have been added

6. Early support for asynchronous method invocations through the use of the new @Async annotation (or EJB 3.1’s @Asynchronous annotation).

7. The most exciting new feature for the Web Tier is the support for building RESTful web services and web applications

8. Object to XML mapping functionality (OXM) from the Spring Web Services project has been moved to the core Spring Framework now

9. Extended support for meta-annotations: Spring’s @Scope and @Transactional annotations, as well as specialized stereotypes such as @Service and @Controller, can be applied as meta-annotations on custom annotations now. for eg


public @interface MyService {
public class RewardsService {


Source :  Spring 3.0 documentation