I sincerley appreciate the info you guys have shared with me :) thank you.

that was where i was stuck - I knew I had to separate my concerns, but all the tutorials I found had a cocoon component dealing with hibernate stuff. Hibernate itself is rather nice. I have been doing it for awhile now using the cocoon persistencefactory component. However, everytime i got stuck, and asked on the list for help, I got "Separate your stuff better" heh heh. believe me I want to, and since you guys were so helpful with the issue this time, I chased it a little. I actually have a much better understanding of the cocoon involvement, and now know where to mess with it to fix it. Of course, I have trashed my project so badly that it currently won't build, but I am confident I can get it worked out.

Right now, I had the idea of a filter for each request both open and close my session, but I haven't got it working yet.
I guess I will take the plunge into spring right now. (Maybe past discussions on the dev list will start to make sense)


Again thanks to both of you - you have truly expanded my knowledge.

I had no idea a syntax question would put me so far ahead :)

JD

WHIRLYCOTT wrote:

+1 on that, Ugo.

JD, there's a decent O'Reilly book called "Better, Faster, Lighter Java" or something like that. It covers a lot of the ideas that we have been telling you about. It doesn't cover any Cocoon stuff, but the part you are working on shouldn't care about that at all. You might find it useful.

phil.

Ugo Cei wrote:

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



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to