Category Archives: Java/J2EE

Java and J2EE related posts

Spring custom annotations using context:component-scan 0

Everyone seems to think annotations are cool and want to use them now days. A lot has been written about the pros and cons of using annotations and personally I think they should be used with caution. Mixing annotation domains to a point of total confusion, spreading configuration related meta-data across large code bases to [...]

Elasticsearch with Spring Comments Off

Elasticsearch is a good abstraction around Lucene Search Engine and an alternative to Solr. ElasticSearch provides out of the box index distribution along with a decent JSON RESTful interface backed by a Java/Groovy API. ElasticSearch also elaborate list of modules for a variety of integrations. I wanted to integrate ElasticSearch in my Spring-based application and [...]

Leader Election with Zookeeper 0

Recently I had to implement an active-passive redundancy of a singleton service in our production environment where the general rule is always have “more than one of anything”. The main motivation is to alleviate the need to manually monitor and manage these services, whose presence is crucial to the overall health of the site. This [...]

Creating a Facebook app with Google App Engine and Google Web Toolkit 26

One of the challenges with writing a presumably successful Facebook application is taking care of scale. with an ever growing user base and the high viral growth potential brought by this social platform you could be looking at a very high traffic if your application is successful. It is wise to plan ahead. Integrating a [...]

Quartz and Spring Integration 4

Quartz is an excellent, open-source scheduler which provides many enterprise features such as job persistence to a variety of job store implementations (e.g., RAM, JDBC, etc.), transactions and clustering. Spring offers good integration for Quartz and provides some nice abstractions for using it within the IoC container such as MethodInvokingJobDetailFactoryBean which allows you to use [...]

TestNG with Cobertura 8

Cobertura is one of the key static analysis tool every developer should work with. I’ve seen numerous project increase their code coverage using this tool and which in turn can and will reduce QA cycles and overall bug counts any given system.

Spring prototype scoped beans and dependency injection 2

Within the typical Spring container most of the beans with dependency on other beans end up being stateless singleton beans. However every once in a while you want a stateful prototype beans with dependencies.

Spring Application Context Hierarchy and ContextSingletonBeanFactoryLocator 1

Setting up spring application context hierarchies in a typical enterprise dependency stack using ContextSingletonBeanFactoryLocator

List of my favorite eclipse plugins 0

Can anyone remember the days when jBuilder was the king of J2EE IDEs? can you imagine what J2EE development look like without Eclipse? However, eclipse truely reveals its power when you add healthy dosage of plugins to the mix. Everyone has their list, here are my favorites:

Pattern based resource matching with Spring’s PathMatchingResourcePatternResolver 0

Spring has a very good resource abstraction mechanism allowing resources to be defined in the application context in a simple fashion, automatic assignment to class members based on type, etc. In addition Spring provides an Ant-like pattern for locating resources, this comes into play in the resource location definition of an application context (when defined [...]