Unanswered: Calling stored proc from bean or servlet?
Hello, I have a question about general MVC design with J2EE. (Hope I have the right forum). I am new to this, so bear with me.
I am developing a small app - one servlet acting as the "controller", a database connection bean, 4 other beans, 4 DB2 stored procedures.
What is the best design pattern for where to call the database connection and then the stored procs? I am currently invoking a "getConnection" method on the db connection bean from the servlet, which I assume is correct. From there, once I get my connection, do I call the applicable stored procedure from the controller servlet, or invoke methods on the beans to call the stored procs from there.
I guess its possible from any object, I am looking for the most optimal and "best practice" design. Thanks in advance!