Home » Tag Archives: Spring (page 25)

Tag Archives: Spring

Auditing a Spring MVC Webapp with AspectJ. Part 1

aspectj-logo

If you’re like me, then you’ll have those kinds of programming days where everything seems to go incredibly well. You write the code and the tests and it just works. And then and there are those other kinds of days, the really bad ones, where you know that everything you’ve written is as right as it can be and the ...

Read More »

Spring from the Trenches: Using Environment Specific Cron Expressions with the @Scheduled Annotation

spring-interview-questions-answers

The @Scheduled annotation offers an easy way to create scheduled tasks in Spring powered applications. We can use it to schedule our tasks by using either periodic scheduling or cron expressions. Although period scheduling can also be useful, the cron expressions give us much more control over the invocation of the scheduled tasks. That is why they are very useful ...

Read More »

Spring JTA multiple resource transactions in Tomcat with Atomikos example

atomikos-logo

In this tutorial we shall show you how to implement JTA multiple resource transactions in a Tomcat server, using Atomikos Transaction Manager. Atomicos transaction manager provides support for distributed transactions. These are multi-phased transactions, often using multiple databases, that must be committed in a coordinated way. The distributed transactions are described by the XA standard. XA governs how a transaction ...

Read More »

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 »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close