This content has been marked as final. 
    
Show                 3 replies
    
- 
        1. Re: Change the default value to Eagerepbernard May 23, 2006 12:14 PM (in response to fabricio.lemos)no because it would be a really really bad idea to not lazy 
- 
        2. Re: Change the default value to Eagerfabricio.lemos May 23, 2006 6:43 PM (in response to fabricio.lemos)So how should I implement my persistence unit tests with lazy loading enabled? 
 I´m unit testing my DAOs and my test methods are not in a session bean, so when I access my entities (the ones returned from the data base), the transaction is closed and LazyLoadingException is thrown.
- 
        3. Re: Change the default value to Eagerepbernard May 29, 2006 12:22 AM (in response to fabricio.lemos)1. simulate the transaction boudaries / session lifecycle in your test boudaries 
 2. use JBoss Embeddable eJB3 in your unit test
 
    