Sun, 29 May 2005
Re: Neat ThreadLocal TrickThis started out as a comment on a previous post, but I thought it deserved to be lifted to the front page. It is a response to something that my good old friend Anonymous mentioned, in his, as usual, eloquent style:
You blogged about this? This solution has been around since Hibernate 1.x (maybe earlier).!Yes, I blogged about this: have a look here :-) I will be the first to admit that this solution already is around for ages, I remember doing something pretty similar with OJB quite a number of years ago, but after looking at yet another code base with Sessions being passed on through everywhere, I thought it was worth mentioning yet another time. I am sorry if this behaviour offended your intellect in any way.
Furthermore, your logic with regard to not using other projects/libraries is flawed. ... No one said you have to use everything in Spring. And struts?! Jeez, don't get me started!I am not really sure what you mean with "flawed logic". I'll walk you over some of my premises:
- I can get an external Struts developer in a day, introduce him the next and let him be productive around 11AM.
- Some developers, unlike me, use IDE plugins for their mappings: guess which framework has any/the best ones available? See also for the rest of tool support.
- Struts 1.* is aging more and more like Java: it has the potential to become, and maybe already is, a mature legacy framework.
We also have done some pretty cool things as well to ease up Struts/Hibernate development even more: something I will blog about later, check it out: it feels good.
To wrap up: don't get me wrong: I think Spring (IoC, MVC and AOP) is cool: I like it, I use it, but not in this project: move your hammer, slowly, away from the screw.
Apparently, you solely make your determination if something is usable based upon whether it is in the hibernate.jar.Yeah, that jar really annoyes me: it has been dictating out internal code policies for too long. The word 'whatever' materializes once again...