Home » Tag Archives: Spring (page 38)

Tag Archives: Spring

Coherence Event Processing by using Map Trigger Feature

oracle-coherence-logo

This article shows how to process Coherence events by using Map Triggers. Basically, Distributed Data Management in Oracle Coherence is suggested to look over basic configuration and implementation of Oracle Coherence API Map Triggers are one of the most important features of Oracle Coherence to provide a highly customized cache management system. MapTrigger represents a functional agent that allows to ...

Read More »

Spring: Setting Logging Dependencies

spring-interview-questions-answers

This post describes how to set-up logging dependencies in Spring. It is based on information available in a post by Dave Syer’s. A reminder on Java logging frameworks is available here. The code example is available at GitHub in the Spring-Logging-Dependencies directory. Spring uses Jakarta Commons Logging API (JCL). Unfortunately, many people do not like its runtime discovery algorithm. We can disactivate it and ...

Read More »

Method Parameter Names and Spring

spring-interview-questions-answers

Continuing on the previous blog entry about Constructor and method parameters and Java not retaining the parameter names at runtime – the previous entry was about constructor not retaining the parameter names and the implication of this for Contructor injections in Spring, here I will cover a few more scenarios where parameter names not being retained has implications with Spring: 1. ...

Read More »

Spring MVC Form Validation (With Annotations)

spring-interview-questions-answers

This post provides a simple example of a HTML form validation. It is based on the Spring MVC With Annotations example. The code is available on GitHub in the Spring-MVC-Form-Validation directory. Data For this example we will use a bean and JSR303 validation annotations:               public class MyUser { @NotNull @Size(min=1,max=20) private String name; @Min(0) @Max(120) private int ...

Read More »

Spring Constructor Injection and Argument names

spring-interview-questions-answers

At runtime, java classes do not retain the name of the constructor or method parameters, unless classes are compiled with debug options on. This has some interesting implications for Spring Constructor Injection. Consider the following simple class         package dbg; public class Person { private final String first; private final String last; private final Address address; public ...

Read More »

Spring MVC for Atom Feeds

spring-interview-questions-answers

How to add feeds (Atom) to your web application with just two classes? How about Spring MVC? Here are my assumptions: you are using Spring framework you have some entity, say “News”, that you want to publish in your feeds your ‘News’ entity has creationDate, title, and shortDescription you have some repository/dao, say ‘NewsRepository’, that will return the news from ...

Read More »

Clean code with aspects

aspectj-logo

In my previous post I’ve described the alphabet conversion, and I’ve mentioned that we used AspectJ to resolve that task, but i did not mention how AspectJ works and what are aspects generaly. So in the next few lines i will explain: what is Aspect Oriented Programming and why we need it what is AspectJ using AspectJ with Spring (configuring ...

Read More »

Spring MVC Customized User Login Logout Implementation Example

spring-security-logo

This post describes how to implement a customized user access to an Spring MVC web application (login logout). As a prerequisite, readers are advised to read this post which introduces several Spring Security concepts. The code example is available from Github in the Spring-MVC-Login-Logout directory. It is derived from the Spring MVC with annotations example. Customized Authentication Provider In order ...

Read More »

Spring Collection Merging

spring-interview-questions-answers

Spring collection merging is a feature that I first came across as an answer to a StackOverflow question It is a way of creating a base collection (list, set, map or properties) and modifying this base collection in other beans, best explained using an example –             Consider a Person class with a field holding ...

Read More »

Spring3 + JPA2 + Java EE6 App Server = Confusion Over Configuration

java-logo

Spring is great, JavaEE6 is great and latest JavaEE6 Application servers are also great. This post is not a rant on Spring Vs JavaEE6, but my experience of porting a Spring3+JPA2(Hibernate) application on JBoss AS-7.1 App Server. My application requirement is very simple: Developing a couple of SOAP based webservices using Spring3.1 and JPA2(Hibernate) and host it on JBoss 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.