myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stormspire <>
Subject RE: Hibernate Object and JSF Bean Design
Date Fri, 19 Jan 2007 08:31:00 GMT

  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 object.  So if don't use independant view object
to store the value, the hibernate entity will still be available during
these requests, will it still held database connection for it?  If so, I
think it is not scalable.  How JBoss Seam solve it?


Giampaolo Tomassoni-2 wrote:
> From: stormspire []
>> 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.
>> Am I really Wrong?
>> As I use lots of lazy loading from hibernate, so I can directly 
>> call object
>> lazily loaded for master and detail example.  Any comments?
> JSF beans may need to be persisted into the session object, so you may get
> problems with transaction boundaries unless you're very careful in
> handling the (de)serialization process and the Hibernate's session and
> connection.
> An out-of-the-shelf approach with similar results but more powerful and
> reliable for you would probably be JBoss Seam, which basicly allows direct
> visibility of business entities from JSF, while correctly handling a lot
> of the hinders which may arise with this.
> You may find it here: . They say
> it's production. I would say it is an advanced beta. Anyway, what is the
> difference today?
> Cheers,
> Giampaolo
>> -- 
>> View this message in context: 
> 08.html#a8425940
> Sent from the MyFaces - Users mailing list archive at

View this message in context:
Sent from the MyFaces - Users mailing list archive at

View raw message