I recently attempted manipulating entity beans using the GoF Strategy Pattern, and it worked! Instead of hiding my entities behind a stateless session facade, I used a stateful session strategy. My question is: "How will this impact performance, and by how much?" Naturally, it will be much easier to add and/or remove entity beans; however, if there is a significant performance cut associated with this then I would not bother. I have posted the bean class below. Thanks in advance!
Originally posted by James MacLean: "How will this impact performance, and by how much?"
Use a profiling tool to measure performance rather than guessing. That said, I prefer the stateless session bean facade, since they hold no conversational state and are not tied to a particular client. I am not averse to the design patterns... there is a time and place for everything. Of course YMMV.
Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
subject: Manipulating Entity Beans: Strategy vs. Facade