all you have to do is start a transaction before each unit test and roll it back after. spring has base unit tests and test runners that do this for you...
-igor On Tue, Feb 16, 2010 at 12:13 AM, Leon Nieuwoudt <[email protected]> wrote: > Yes this works when running the program in the Application Server > environment. > > For JUnit testing (outside of the AS), I ran into this problem. > > Is there maybe a better way to maybe wrap the OSIV Filter around Unit Tests? > > On Tue, Feb 16, 2010 at 9:07 AM, Wilhelmsen Tor Iver > <[email protected]>wrote: > >> >> I thought the medicine against LazyInitializationException was >> spring-hibernate's OpenSessionInViewFilter, where you leave to the filter to >> open and close the session at the beginning and end of the request? >> >> - Tor Iver >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
