JSF and Hibernate 3.x

I need some advice regarding Hibernate and JSF.I created a Hibernate Help class and

and I wondering if I should treat this as a manged bean or just as at Util class. If

I should treat this as managed bean should i set the scope to session or application.

<managed-bean>

<managed-bean-name>hiberHelper</managed-bean-name>

<managed-bean-class>foo.bar.HiberHelper</manged-bean-class>

<managed-bean-scope>application or seesion </manged-bean-scope>

</managed-bean->

thanks

[574 byte] By [ferric4a] at [2007-11-26 19:29:44]
# 1
You don't need to make that class managed bean. The idea of managed beans is to be created on demand.
amitteva at 2007-7-9 21:58:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Use the class as an Util class....I presume you dont need to instantiate the class on user actions..Purpose of the managed bean is to hold form data or you use it as controllers..that is as user action classes..and yes the managed beans are created on demand..
archanga at 2007-7-9 21:58:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Use it as utility class. Use lists of DTO's and eventually store it in session using a session scoped bean, this saves reloading times. You can easily generate DTO's using hbm2java.
BalusCa at 2007-7-9 21:58:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...