Tag Archives: spring

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 [...]

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 [...]

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

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 [...]

JMX Notifications with Spring 0

The JMX notification API adds a good management aspect to an application. Bypassing the philosophical question of what is management and how does it differ from the rest of my application code here. Once we’ve decided to add management to our application there is a set of concerns that comes with that decision. Minimal impact [...]

XStream, Spring-WS OXM and Generics – Part 2 0

In a previous post I showed how to combine spring-ws and XStream to produce customizable XML format from a Java object using converters. When performing marshaling/unmarshaling with a large number of domain objects the task of defining aliases, defining attributes vs. elements can be cumbersome and difficult to manage.

XStream, Spring-WS OXM and Generics 2

XStream and spring-ws using java 1.5 generics.