Il giorno 27/gen/05, alle 17:09, JD Daniels ha scritto:

What's changed WRT to the previous version? I can't see the difference.

var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch();
var bean = bugSearch.findBugById(id);

Ah OK. I'll tell you a story :-) When we started using Hibernate with Cocoon, we used too get a session from a home-grown component that wrapped a SessionFactory and created Sessions on demand. Just like in your first version.

Now we use Spring, which handles SessionFactory configuration, session creation (and guaranteed disposal), transactions and exception handling. Typically we define one (or a few) "Service" facades that are managed by Spring and interact with one or more DAOs in the backend. The flowscript deals exclusively with the service facade.

If you want to develop robust, easily maintained and testable applications, I suggest you look closely at Spring.

        Ugo

--
Ugo Cei - http://agylen.com/blojsom/blog/

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to