Home » Java » Enterprise Java (page 337)

Enterprise Java

Google Authenticator: Using It With Your Own Java Authentication Server

The Google Authenticator application for mobile devices is a very handy application that implements the TOTP algorithm (specified in RFC 6238). Using Google Authenticator you can generate time passwords that can be used to authorize users in an authentication server that shares the secret key of the requesting users. Google Authenticator is mainly used to access Google services using two-factor ...

Read More »

Single Sign On for the cloud: SAML & OpenId

When accessing different applications owned by different organizations, having to authenticate everytime you go from one application to another is annoying. Not only is it time consuming, but you also have to remember multiple passwords, which are often lost. Single sign on is the ability to authenticate once and be able to move between applications seamlessly using the authenticated identity. ...

Read More »

Spring GWT Integration using the RequestFactory API

Beginning from GWT 2.4 the integration of the RequestFactory API with Spring services on the backend is easy all you need to do is create a custom ServiceLocator on your server which will be used by GWT to locate properly the called services :                 public class SpringServiceLocator implements ServiceLocator { public Object ...

Read More »

The persistence layer with Spring 3.1 and Hibernate

1. Overview This article will show how to implement the DAO with Spring and Hibernate. For the core Hibernate configuration, see the articles about Hibernate 3 and Hibernate 4 with Spring. 2. No More Spring Templates Starting Spring 3.0 and Hibernate 3.0.1, the Spring HibernateTemplate is no longer necessary to manage the Hibernate Session. It is now possible to make ...

Read More »

Configure LogBack Logging with Spring

LogBack is an API for logging created by the same author of Log4j (a newer implementation, it is like a new version), during this article I’m going to show how to integrate it and use it on a Spring project. On this tutorial I assume you are using a simple Spring ROO project which will prepare all the structure of ...

Read More »

Transaction configuration with JPA and Spring 3.1

spring-interview-questions-answers

1. Overview This tutorial will discuss the right way to configure Spring Transactions, use the @Transactional annotation and common pitfalls. For a more in depth discussion on the core persistence configuration, check out the Spring with JPA tutorial. There are two distinct ways to configure Transactions – annotations and AOP – each with their own advantages – we’re going to ...

Read More »

Simplifying the Data Access Layer with Spring and Java Generics

spring-interview-questions-answers

1. Overview This article will focus on simplifying the DAO layer by using a single, generified Data Access Object for all entities in the system, which will result in elegant data access, with no unnecessary clutter or verbosity. 2. The Hibernate and JPA DAOs Most production codebases have some kind of DAO layer. Usually the implementation ranges from multiple classes ...

Read More »

The Persistence Layer with Spring Data JPA

spring-interview-questions-answers

1. Overview This article will focus on the configuration and implementation of the persistence layer with Spring 3.1, JPA and Spring Data. For a step by step introduction about setting up the Spring context using Java based configuration and the basic Maven pom for the project, see this article. The Persistence with Spring series:       Part 1 – ...

Read More »

The Persistence Layer with Spring 3.1 and JPA

1. Overview This is tutorial shows how to set up Spring with JPA, using Hibernate as a persistence provider. For a step by step introduction about setting up the Spring context using Java based configuration and the basic Maven pom for the project, see this article. 2. The JPA Spring Configuration with Java To use JPA in a Spring project, ...

Read More »