Home » Author Archives: Xavier Padro (page 2)

Author Archives: Xavier Padro

Xavier is a software developer working in a consulting firm based in Barcelona. He is specialized in web application development with experience in both frontend and backend. He is interested in everything related to Java and the Spring framework.

Spring Integration – Configure web service client timeout

spring-interview-questions-answers

Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is handled by this gateway, thus you just need to worry about building the request message and handling the response. However, with this approach it is not obvious how to configure additional options like setting timeouts or ...

Read More »

Thymeleaf integration with Spring (Part 2)

spring-interview-questions-answers

1. Introduction This is the second part of the Thymeleaf integration with Spring tutorial. You can read the first part here, where you will learn how to configure this project. As explained at the beginning of the first part of this tutorial, the web application will send two types of requests:         Insert a new guest: Sends ...

Read More »

Thymeleaf integration with Spring (Part 1)

spring-interview-questions-answers

1.Introduction This article is focused on how Thymeleaf can be integrated with the Spring framework. This will let our MVC web application take advantage of Thymeleaf HTML5 template engine without losing any of the Spring features. The data layer uses Spring Data to interact with a mongoDB database. The example consists in a Hotel’s single page web application from where ...

Read More »

Applying aspect oriented programming

spring-interview-questions-answers

1.Introduction The main target of the aspect oriented programming is the separation of cross-cutting concerns. When we talk about cross-cutting concerns we are referring to generic functionality that is used in several places in our system or application. These concepts are, among others:         Logging Transaction management Error handling Monitoring Security The way to achieve this separation ...

Read More »

Creating contract-first web services with Spring WS

spring-interview-questions-answers

1 Introduction This article explains how to implement and test a SOAP web service using the Spring Web Services project. This example uses JAXB2 for (un)marshalling. To develop the service, I’ll use the contract-first approach, which consists in definning the service contract first, and based on this contract implement the service. The article is divided into the following sections:   ...

Read More »

Spring JMS: Processing messages within transactions

spring-interview-questions-answers

1.Introduction This post will show you how an error in the execution of the consumer during the asynchronous reception of messages with JMS, can lead to the loss of messages. I then will explain how you can solve this problem using local transactions. You will also see that this solution can cause in some cases, message duplication (for example, when ...

Read More »

Retry web service operations with RequestHandlerRetryAdvice

spring-interview-questions-answers

1.Introduction Sometimes when invoking a web service, we may be interested in retrying the operation in case an error occurs. When using Spring Integration, we can achieve this functionality with RequestHandlerRetryAdvice class. This class will allow us to retry the operation for a specified number of times before giving up and throwing an exception. This post will show you how ...

Read More »

How error handling works in Spring Integration

spring-interview-questions-answers

1.Introduction The target of this post is to show you how errors are handled when using the messaging system with Spring Integration. You will see that error handling is different between synchronous and asynchronous messaging. As usual, I’ll skip the chat and proceed with some examples. You can get the source code at github. 2.The sample application I will use ...

Read More »

Spring Integration – Using RMI Channel Adapters

spring-interview-questions-answers

1.Introduction This article explains how to send and receive messages over RMI using Spring Integration RMI channel adapters. It is composed of the following sections: Implementing the service: The first section focuses on creating and exposing a service. Implementing the client: Shows how to invoke the service using the MessagingTemplate class. Abstracting SI logic: Finally, I’ve added another section explaining ...

Read More »

Migrating Spring MVC RESTful web services to Spring 4

spring-interview-questions-answers

1   Introduction Spring 4 brings several improvements for MVC applications. In this post I will focus on restful web services and try these improvements by taking a project implemented with Spring 3.2 and upgrading it to Spring 4. The following points sum up the content of this post: Migration from Spring 3.2 to Spring 4.0 Changes in @ResponseBody and inclusion of ...

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.