Hi Guys I wanted to try out the now working wicket injector holder for my webapp. But I keep getting: "java.lang.IllegalStateException: EntityManager is closed at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:93)"
I've traced it so far that it's not an issue with page creation or page reloads. But seems to be when my detachablemodels or datasources(inmethod) are being loaded. It's like the entity manager gets closed after a request and never opened again. I followed this guide: http://www.atomicgamer.com/dev/2009/10/wicket-guice-2-0-warp-persist-2-0/ web.xml looks like this: <filter> <filter-name>warpPersistFilter</filter-name> <filter-class>com.wideplay.warp.persist.PersistenceFilter</filter-class> </filter> <filter-mapping> <filter-name>warpPersistFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>wicket.WicketWarp</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> And my warpmodule like this: Module warpModule = PersistenceService.usingJpa().across( UnitOfWork.REQUEST).forAll( Matchers.annotatedWith(Transactional.class), Matchers.any()) .buildModule(); WicketApplication: @Override protected void init() { super.init(); addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceInjector())); } protected Injector getGuiceInjector() { return Guice.createInjector(new Module()); } In advance thanks, and please ask if I forgot something. Otherwise I have to roll back and ask a singleton for the dao each time and that would be really undesirable. -Nino --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org