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 [...]
Categories: Java/J2EE
Tagged: Annotation, context, Reflection, Reflections, spring
- Published:
- July 19, 2011 – 3:42 AM
- Author:
- By erez
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 [...]
Categories: Java/J2EE
Tagged: elasticsearch, spring
- Published:
- July 9, 2011 – 8:28 AM
- Author:
- By erez
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 [...]
Categories: Java/J2EE
Tagged: leader election, spring, zokeeper
- Published:
- July 9, 2011 – 4:44 AM
- Author:
- By erez
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 [...]
Categories: Java/J2EE
Tagged: prototype, quartz, spring
- Published:
- June 25, 2010 – 12:15 AM
- Author:
- By erez
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.
Categories: Java/J2EE
Tagged: context, dependency injection, prototype, spring
- Published:
- February 14, 2010 – 2:29 AM
- Author:
- By erez
Setting up spring application context hierarchies in a typical enterprise dependency stack using ContextSingletonBeanFactoryLocator
Categories: Java/J2EE
Tagged: context, spring
- Published:
- February 10, 2010 – 12:20 PM
- Author:
- By erez
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 [...]
Categories: Java/J2EE
Tagged: J2EE, pattern, resolution, resource, spring
- Published:
- January 18, 2010 – 6:54 AM
- Author:
- By erez
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 [...]
Categories: Java/J2EE
Tagged: J2EE, JMX, Notificaitons, spring
- Published:
- January 16, 2010 – 1:29 PM
- Author:
- By erez
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.
Categories: Java/J2EE
Tagged: oxm, spring, spring-ws, xstream
- Published:
- December 30, 2009 – 7:22 AM
- Author:
- By erez
XStream and spring-ws using java 1.5 generics.
Categories: Java/J2EE
Tagged: generics, oxm, spring, spring-ws, xstream
- Published:
- December 26, 2009 – 2:54 AM
- Author:
- By erez