At the meeting today, we decided to change the data access solution of JDBC + stateless sessionbean to the entitybean solution. This means that my module needs to be re-designed. Two lessons have been learned: 1. Do not think you are better than others. When we designed this module, we chose entitybean, which means that the configuration and deployment of entitybean is too complicated, and ejb1.1 does not support local interface, resulting in a reduction in the efficiency of complex data operations. In addition, object-schema mapping is not much simpler than JDBC + SSB. Who knows how to design and find out that once they have to deal with the relationship between complex points, CodeNaturally, it's complicated. Finally, we found that our design repeat a lot of entitybean functions, such as object-level caching (I wrote a single-Write-multiple-write cache module myself, A waste of time), configurable relationship ing, and multi-level proxy design patterns... Think about it later. ProgramThere are more employees than us, so we may not have written manual data storage? Of course, there are a lot of problems, so we invented solution 3 of entitybean, But we naively thought we were better than others, and completely forgot Linus to explain why the Linux kernel didn't need to be written in C ++. Famous saying: Being there, done that. In fact, this lesson has been learned before. In the previous file organization lesson, I spent an hour writing a commonly used implementation method (linked bucket). I had to implement the so-called extendable hashtable that supports maximum flexibility. The result was written for two days, not well written yet. In fact, Eric mentioned the similar mistakes he made in his blog. Why didn't I go to my heart? 2. This is relatively old. Is to sharpen the knife without mistaken cutting back the firewood. At the beginning of the project, countless books mentioned that entitybean is good for data access with complex relationships, but I did not think about why others insisted on it, nor did I go into details, forget the ancient training: the old saying goes, the old saying goes, and the old saying goes, the old saying goes.