From the javadoc for StartupListener it states:

"Keep in mind that this listener is executed outside of OpenSessionInViewFilter, so if you're using Hibernate you'll have to explicitly initialize all loaded data at the Dao or service level to avoid LazyInitializationException. Hibernate.initialize() works well for doing this."

If possible could someone provide me an example of doing this.

In the contextInitialized I would like to insert a row into a db table using one of my Entities. The entity was created from mvn appfuse:gen -Dentity=Event

Thanks in advance,

Christy Ring
[EMAIL PROTECTED]



Reply via email to