Spring
-
Enterprise Java
Spring Profiles and Java Configuration
My last blog introduced Spring 3.1’s profiles and explained both the business case for using them and demonstrated their use…
Read More » -
Enterprise Java
Spring Scoped Proxy
Consider two Spring beans defined this way: @Component class SingletonScopedBean{ @Autowired private PrototypeScopedBean prototypeScopedBean; public String getState(){ return this.prototypeScopedBean.getState(); }…
Read More » -
Enterprise Java
Observer Pattern with Spring Events
INTRODUCTION The essence of the Observer Pattern is to ‘Define a one-to-many dependency between objects so that when one object…
Read More » -
Enterprise Java
Customizing Spring Data JPA Repository
Spring Data is a very convenient library. However, as the project as quite new, it is not well featured. By…
Read More » -
Enterprise Java
Maven Web Project Kickstarter Codebase with Spring, Hibernate, Akka, Twitter Bootstrap, Apache Tiles and jQuery
I am happy to upload my second project to GitHub to help people get started with Java Web App Development…
Read More » -
Enterprise Java
Hibernate native SQL features into your Spring Data Repository
JPA provides @NamedNativeQuery for you to use native SQL. However, the usage is not so convenient, especially when you need…
Read More » -
Enterprise Java
Measure execution time in Java – Spring StopWatch Example
There are two ways to measure elapsed execution time in Java either by using System.currentTimeinMillis() or by using System.nanoTime() .…
Read More » -
Enterprise Java
Spring @Configuration and FactoryBean
Consider a FactoryBean for defining a cache using a Spring configuration file: <cache:annotation-driven /> <context:component-scan base-package='org.bk.samples.cachexml'></context:component-scan> <bean id='cacheManager' class='org.springframework.cache.support.SimpleCacheManager'> <property…
Read More » -
Enterprise Java
Spring JDBC Database connection pool setup
Setting up JDBC Database Connection Pool in Spring framework is easy for any Java application, just matter of changing few…
Read More »