Home » Tag Archives: Spring (page 27)

Tag Archives: Spring

Spring MVC Error handling flow

spring-interview-questions-answers

There are broadly three ways of handling an exception flow using Spring MVC, the objective being to intercept any application exception and present a friendly and informative view back to the user. 1. Using error-page tag in web.xml file: This is a servlet specs driven approach, where the exceptions that bubble up from the application are intercepted based on either ...

Read More »

The Biggest Flaw of Spring Web Applications

spring-interview-questions-answers

The developers who are using Spring Framework in their applications are good to talk about the benefits of dependency injection. Unfortunately, they are not so good to leverage its benefits such as the single responsible principle and separation of concerns in their applications. If we take a look at any Spring powered web application, the odds are that the application ...

Read More »

Spring Integration – Robust Splitter Aggregator

spring-interview-questions-answers

A Robust Splitter Aggregator Design Strategy – Messaging Gateway Adapter Pattern What do we mean by robust? In the context of this article, robustness refers to an ability to manage exception conditions within a flow without immediately returning to the caller. In some processing scenarios n of m responses is good enough to proceed to conclusion. Example processing scenarios that ...

Read More »

Simple Spring Memcached – Spring Caching Abstraction and Memcached

memcached-logo

Caching remains the one of the most basic performance enhancing mechanism in any read heavy database application. Spring 3.1 release came up with a cool new feature called Cache Abstraction. Spring Cache Abstraction provides the application developers an easy, transparent and decoupled way to implement any caching solution. Memcached is one of the most popular distributed caching system used across apps. In ...

Read More »

Spring MVC: Validator and @InitBinder

spring-interview-questions-answers

It’s hard to imagine a web-application which doesn’t has some validation logic for an user data. Almost all user’s data has some constraints, e.g. date of birth should consist of day, month, year etc. Spring MVC has its own solution for the data validation, and it’s become available with the help of Validator interface. Usage of Spring MVC Validator A ...

Read More »

Invoking Async method call using Future object in Spring

spring-interview-questions-answers

The next example will demonstrate an async method call inside the Spring container. Why do we need async method calls? In some cases we don’t really know if replay is expected or when a result supposed to be delivered back. Traditional way In the Java EE world of handling async calls is using Queue/Topic. We could do the same in ...

Read More »

Aggregating async results using Spring Integration

spring-interview-questions-answers

Hi, I came across an issue which has very nice solution using Spring Integration. Many times we have the need for a scenario of dispatching a message to unknown number of destinations. For this purpose we have the Topic methodology. But some times in addition we also want to receive answers from all destinations which received the message and aggregate ...

Read More »

Testing Spring “session” scope

spring-interview-questions-answers

In a Spring based Web application, beans can be scoped to the user “session”. This essentially means that state changes to the session scoped bean are only visible in the scope of the user session. The purpose of this entry is to simply highlight a way provided by Spring Test MVC to test components which have session scoped beans as ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.