Today I want to talk about Design Patterns, especially Decorator. Here is the story, which gave me a reason to write this post:
Few days ago I was asked to improve performance in one of our web applications (JEE + Spring + Stored Procedures via JDBC). One of the stored procedures is calling on multiple schema, because of big amount of data stored, that operation takes a lot of time. So I have to do some magic with multi-threading in JEE application (I will post about it in the future). During the refactoring I found the object called CrappyBean (standard JavaBean object). It was a new object, based on some old functionality (called NormalBean - also standard POJO object). Because stored procedures are the oldest part of system they are returning old types of objects.










