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.
> 
> 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: http://labs.jboss.com/portal/jbossseam . 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: 
> http://www.nabble.com/Hibernate-Object-and-JSF-Bean-Design-tf30326
08.html#a8425940
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to