cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dustin N. Jenkins" <>
Subject Best Practices Question
Date Wed, 07 Sep 2005 15:24:29 GMT
I'm using Cocoon 2.1.7, Hibernate 3.0.5 and Spring 1.2 to develop a 
fairly big (5000+ classes) web application.  I have a question about 
best practices when moving domain objects from Hibernate through my 
Service Layer to my Presentation Layer. 

In anyone's opinion, when it comes to Hibernate lazy loading, should the 
values of a Domain Object be initialized by the time it reaches the 
Presentation Layer?  More specifically the values that the Presentation 
Layer cares about.  I get a lot of unexpected behaviour when it comes to 
saving the objects after the HTTP Form has been submitted like proxies 
or collections that span more than one open session even though the HTTP 
Request was just created.  I'm using the OpenSessionInViewFilter to 
accomodate lazy loading, but should the Presentation Layer really know 
this much about the Persistence Layer?

I've been thinking a lot about using Web Implementation classes that 
contain only initialized values, then pass those values into the Service 
Layer to saveOrUpdate() the Persistent Object.  It's quite frustrating 
developing around my tools, like Hibernate, but other than using JDBC, 
I'm at a loss as to what to do about it.  Anyone with advice on a 
Cocoon/Spring/Hibernate architecture?

Many thanks,

Dustin N. Jenkins
Application Developer
Invoq Systems, Inc.
AlarmPoint - Guaranteed Event Resolution
#216 - 852 Fort Street
Victoria, BC V8W 1H8
Tel: (250) 380-0304 <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message