: Spring/Wicket/Hibernate testing driving me banana nuts
So in typical web applications, people would install a session filter
(like https://www.hibernate.org/43.html), which would open a session
at the start of a request, and close it afterwards. You probably need
to find an alternative
application.xml I initially had a setup that worked with both a Web
context and a JUnit context. The problem was the amount of hand coding
and adjusting of the Spring context the approach needed. I finally got
the Spring's transaction interceptor working with the auto-wiring (the
key is using
i see you are using MockWebApplication in your tests. this application
does not install the SpringComponentInjector and so @SpringBean has no
effect.
you should either give wickettester an instance of your actual
application class, or create a mock one that installs
springcomponentinjector.
on its own to
use?
-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
Sent: Tuesday, November 17, 2009 4:05 PM
To: users@wicket.apache.org
Subject: Re: Spring/Wicket/Hibernate testing driving me banana nuts
i see you are using MockWebApplication in your tests
, November 17, 2009 4:05 PM
To: users@wicket.apache.org
Subject: Re: Spring/Wicket/Hibernate testing driving me banana nuts
i see you are using MockWebApplication in your tests. this application
does not install the SpringComponentInjector and so @SpringBean has no
effect.
you should either
:15 PM
To: users@wicket.apache.org
Subject: RE: Spring/Wicket/Hibernate testing driving me banana nuts
I've got the part that injects a Spring WebApplicationContext into the
WicketTester already (Source attached). I should be using the application
class, if I'm not then something has changed
C. [mailto:berin.lorit...@gd-ais.com]
Sent: Tuesday, November 17, 2009 4:15 PM
To: users@wicket.apache.org
Subject: RE: Spring/Wicket/Hibernate testing driving me banana nuts
I've got the part that injects a Spring WebApplicationContext into the
WicketTester already (Source attached). I