http://localhost:8080/[YOUR-WEBAPP]/dwr
to check that your spring beans appear.This converter is very similar to the standard BeanConverter except that we can decide what to do with lazy loaded properties.
There are 2 Hibernate converters called "hibernate2
" and (predictably) "hibernate3
".
Using HibernateBeanConverter may be risky for a number of reasons:
<param name="exclude" value="propertyToExclude1, propertyToExclude2"/>
The HibernateBeanConverter tries to avoid reading from un-initialized properties. (If you just want something that blindly reads everything then just use a plain BeanConverter).
Hibernate 3 is considerably better at helping in this respect, and indeed under Hibernate 2 you may well discover that you are getting many empty beans as a result.
If you are using Hibernate object the you need to understand that each DWR request is a new servlet request so you need to ensure that a Hibernate Session is open for you to work with.
If you are using Spring then an easy option is to use the Spring OpenSessionInViewFilter which will ensure that a Hibernate Session is open. Similar solutions are available in many frameworks.