Re: Hibernate Object and JSF Bean Design

2007-01-28 Thread stormspire
When I use OptimizeIt to check objects inside memory, I find many SQL String inside, I doubt it is related to Hibernate. I suspect the Hibernate object life cycle doesn't end even a request is completed. btw, I am using OpenSessionInView filter. Mario Ivankovits wrote: > > Hi! >> Well, I wor

Re: Hibernate Object and JSF Bean Design

2007-01-19 Thread Mario Ivankovits
Hi! > Well, I work in an mid size project, approx 3000 java files and 300 jsps. > No need for load balancing or failover, which makes things easier ;-) > Oh, I forget, we directly use Hibernate Objects in our view too. Ciao, Mario

Re: Hibernate Object and JSF Bean Design

2007-01-19 Thread Mario Ivankovits
Hi! Well, I work in an mid size project, approx 3000 java files and 300 jsps. No need for load balancing or failover, which makes things easier ;-) We moved (or currently move) from our own persistence to hibernate with all its problems (Lazy loading, detached objects, ...) Exceptions all around

Re: Hibernate Object and JSF Bean Design

2007-01-19 Thread David Delbecq
I don't think there is a problem with using hibernate as JSF bean. However, the managed beans (those whose lifecycle is directly managed by jsf) should only be beans whose role is to fetch hibernate POJOs. There is no problem in having those hibernate objects referenced by JSF components, as long a

RE: Hibernate Object and JSF Bean Design

2007-01-19 Thread stormspire
Hi, Right now we are using HibernateInView filter, normally won't have problem for transactions. However if we got some exception, the session may be lost (haven't gone to the detail, dunno why). If my managed bean consists two actions, one action retrieves object, another action update the o

RE: Hibernate Object and JSF Bean Design

2007-01-19 Thread stormspire
Hi, That means action layer can't take advantage of lazy loading feature any more if detach the hibernate object and view object. It's also troublesome to copy value from entity to view object one by one, and it will decrease performance if using reflecting. Will this approach considered a

RE: Hibernate Object and JSF Bean Design

2007-01-18 Thread Giampaolo Tomassoni
From: stormspire [mailto:[EMAIL PROTECTED] > > Now my JSF managed Bean contains some business object which is hiberante > object. > My friend told me this design is wrong, he says the managed bean should > contain only View Object, and contents of view object is translated from > business object

RE: Hibernate Object and JSF Bean Design

2007-01-18 Thread Beelen, Marco
Hi, I would agree with your friend. Although rendering pages does become easier when using the hibernate proxy object in your managed-beans directly, it could cause problems with being detached from the HibernateSession after the RestoreView phase. ( Even when using the HibernateSessionInView-fil