Home » Author Archives: Alex Soto (page 4)

Author Archives: Alex Soto

NoSQLUnit 0.3.0 Released

nosqlunit-logo

Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these are Fast, Isolated, Repeatable, Self-Validated and Timely. It is strange to think about a JEE application without persistence layer (typical Relational databases or new NoSQL databases) so should be interesting to write unit tests of ...

Read More »

Testing Abstract Classes and Template Method Pattern

java-interview-questions-answers

From wikipedia “A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to allow differing behaviors while ensuring that the overarching algorithm is still followed”. Typically this pattern is composed by two or more classes, one that is an abstract class providing template methods (non-abstract) that have calls ...

Read More »

Log JDBC operations with Log4jdbc

log4jdbc-logo

When we develop any application, after we finish it or when we end up any of its module, we start optimization process. Most applications contain database access, and if you are using an ORM, probably you will use hibernate. Optimizing hibernate persistence layer,requiresto be prepared to read, understand and evaluate sql. If we take an overview on hibernate configuration, two ...

Read More »

Hibernate Tip: Sort and Order

jboss-hibernate-logo

Let’s introduce another hibernate performance tip. Do you remember the model of previous hibernate post? We had a starship and officer related with a one to many association.                 @Entity public class Starship { @Id @GeneratedValue(strategy=GenerationType.SEQUENCE) private Long id; public Long getId() {return id;} protected void setId(Long id) {this.id = id;} @OneToMany(mappedBy="starship", cascade={CascadeType.ALL}) ...

Read More »

Using slf4j with logback tutorial

logback-logo

In current post I am going to show you how to configure your application to use slf4j and logback as logger solution. The Simple Logging Facade For Java (slf4j) is a simple facade for various logging frameworks, like JDK logging (java.util.logging), log4j, or logback. Even it contains a binding tat will delegate all logger operations to another well known logging ...

Read More »

Hibernate Performance Tips: Dirty Collection Effect

jboss-hibernate-logo

After 8 years developing server and embedded applications using Hibernate as ORM, squeezing my brain seeking solutions to improve Hibernate performance, reading blogs and attending conferences, I decided to share this knowledge acquired during these years with you. This is the first post of many more posts to come: Last year I went to Devoxx as speaker but also I ...

Read More »

Implementing Active Record Pattern with Spring AOP

aspectj-logo

During class design we should take decisions about the assignment of responsibilities that will have every class. If we have chosen well, systems tend to be easier to understand, maintain and extend. Almost all of our projects have a persistence layer, either relational database, document stores, or simply XML files. And typically you will use DAO pattern to implement abstract ...

Read More »

Redmine Installation & Getting Started Guide

redmine-logo

Redmine is a free and open source, flexible web-based project management and bug-tracking tool, written using the Ruby on Rails framework. Redmine supports multiple projects, with its own wiki, forum, time tracker and issues management. Moreover Redmine implements a plugin platform so can be customized depending on your requirements. Exists plugins to work with Kanban, Scrum, notification plugins or reports. ...

Read More »

OAuth with Spring Security

spring-security-logo

From Wikipedia: OAuth (Open Authentication) is an open standard for authentication. It allows users to share their private resources (e.g. photos, videos, contact lists) stored on one site with another site without having to hand out their credentials, typically username and password. There are a lot of posts talking about OAuth from Client Side, for example how to connect to ...

Read More »

Hibernate cache levels tutorial

jboss-hibernate-logo

One of the common problems of people that start using Hibernate is performance, if you don’t have much experience in Hibernate you will find how quickly your application becomes slow. If you enable sql traces, you would see how many queries are sent to database that can be avoided with little Hibernate knowledge. In current post I am going to ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials