Archive for the ‘spring’ Category
Tuesday, May 29th, 2007
Spring-AOP is implemented by creating proxies decorating the target bean. One typical gotcha from using these proxies, for instance, in declarative transaction management, is the proxy can’t intercept a call made from one method to another on the same target object (typically a service bean), even though both methods are supposed to be wrapped by the proxy. more…
Posted in aop, java, spring | 2 Comments »
Sunday, January 14th, 2007
The new BeanDefinitionBuilder class added in Spring 2.0 allows an XML-less way to build application contexts programmatically. Can be very useful for, say, creating quick testing setups in one of those script languages. more…
Posted in java, spring | 12 Comments »
Monday, October 9th, 2006
Most of the time, we configure the controllers in our Spring MVC application to be singletons, because of the their stateless nature. However, being configured as normal Spring beans, Spring controllers can also be declared with the prototype scope. more…
Posted in java, spring | 3 Comments »
Thursday, September 14th, 2006
OK, I know this sounds like another one of those “a white horse is not a horse” arguments, but from my observation on the Spring forums and other blog reading, some clear distinction between the semantics of a Spring singleton and a classical Java singleton has become much necessary. The overloaded term has caused quite some confusion, especially for someone who has just started picking up Spring. more…
Posted in java, spring | 11 Comments »
Sunday, May 7th, 2006
Spring 2.0 supports injecting beans into an arbitrary POJO, which isn’t necessarily instantiated by a Spring bean factory. This powerful feature is mostly used in injecting into domain objects whose life cycle is usually managed by ORM tools such as Hibernate. But we don’t have to stop here, e.g., JSP tags can also be injected the same way. Here’s how: more…
Posted in aop, java, spring | 7 Comments »
Monday, February 6th, 2006
Spring 2.0 has an exciting new feature that, with AspectJ’s powerful AOP support, allows arbitrary domain objects to be injected with dependencies at the time of creation, even when the domain object is not created by Spring. This feature helps developers avoiding the “Anemic Domain Model” because now domain objects can have references to services or even DAO’s, instead of just some other domain objects. more…
Posted in aop, hibernate, java, spring | 2 Comments »
Monday, January 30th, 2006
I was reading Bob Lee’s Spring bashing blog entry, and, while realizing how high the flaming index the article carries, being a long-time Spring advocate, felt that I had to respond. more…
Posted in java, spring | 2 Comments »
Friday, January 20th, 2006
One often overlooked feature in Spring bean definitions is the ability to add a <description> element to almost everything: beans, properties, or constructor arguments. It makes a lot of sense especially in the case of <constructor-arg>, because usually setting a bean property is fairly obvious: more…
Posted in java, spring | No Comments »
Monday, January 16th, 2006
This is mostly triggered by Diego Parrilla’s post Spring is not designed for scalability, in which he goes, “…Basically you have two options if you want to scale with pure web applications…”, and then gives two options to scale, both of which involves state replicating clustering schemes. There, Diego, you got on my pedantic nerve.
I can’t help but wondering this question – what, exactly is Scalability? more…
Posted in fisheye, hibernate, java, spring | 4 Comments »
Monday, October 17th, 2005
My wife, despite all of her loveliness, does have her own ways of annoying me from time to time, one of which being how she cleans up our office desks – she would sweep everything off the surface of the desk and into the two top drawers, shut them close, and claim “Ta-da! See how neat it looks now!” more…
Posted in java, spring | 3 Comments »