Hi all!
I am using Wicket together with Hibernate and Warp-persist/servlet. In
my Init class, I have registered following two methods below. However,
it seems that I can access database objects via DAOs only as soon as a
request is sent to the server. I would like to use them before (during
start up of the wicket application) in order to load some objects from
the database, which are shared across the application.
Currently, I am getting the error: Exception starting filter
wicket.catadvisor
org.hibernate.HibernateException: No session currently bound to
execution context when running a @finder method to return some
database objects.
How do I need to configure warp-persist in order to use it in wicket
applicaiton in the init() method during startup?
Thanks a lot,
Christoph
public class Init extends WarpServletContextListener {
@Override
public void contextInitialized(ServletContextEvent event) {
super.contextInitialized(event);
INJ.getInstance(PersistenceService.class).start();
event.getServletContext().setAttribute("injector", INJ);
}
@Override
public void contextDestroyed(ServletContextEvent event) {
super.contextDestroyed(event);
}
--
You received this message because you are subscribed to the Google Groups "warp-core" group.
To post to this group, send email to
warp...@googlegroups.com.
To unsubscribe from this group, send email to
warp-core+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/warp-core?hl=en.