Tuesday, November 24, 2009

Spring interceptor ordering

SimpleUrlHandlerMapping uses a hashMap to hold the interceptors. Ordering can only be guaranteed by setting  order property.. By default it does a random get from the hashMap.



http://kickjava.com/src/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java.htm
extends
http://kickjava.com/src/org/springframework/web/servlet/handler/AbstractHandlerMapping.java.htm

I was wondering if such things goes live by getting a right value...how do they get caught as their order is  random without explicitly saying so.
Maybe spring should warn us upfront..(or maybe it does?)

Useful link : http://forum.springsource.org/showthread.php?t=51281


Wednesday, November 4, 2009

Subversion patch release

Releasing a patch to an already released (tagged) trunk would need some steps to be done.
Though it would take time it seems like a best practice to keep the code in sync across tags/ branches/ trunk.

The details:
a. Create copy of latest released tag into your branch B.
b. Fix bug in branch B
c. Copy fixed branch B to tag+1
d. Merge branch to trunk.
e. Remove branch.