I do not know Spring.NET, but if it is using an NHibernate Transaction,
which Iwould expect, this behaviour is normal and expected. The session is
no longer valid after a rollback, and it is not possible to access other
objects that were once in the session before the rollback.

John Davidson

On Mon, Sep 27, 2010 at 3:31 PM, paper1337 <[email protected]>wrote:

> I have posed this question to the Spring.NET forums as well at
> http://forum.springframework.net/showthread.php?p=21194
> The post there includes additional information and code that was too
> cumbersome to post here. Sometimes the traditional forum model wins.
>
> On Sep 27, 10:23 am, paper1337 <[email protected]> wrote:
> > The implementation of the DoRollback method in
> > HibernateTransactionManager in Spring.NET 1.3.0 clears the NHibernate
> > session after rolling back the current transaction (https://
> > fisheye.springsource.org/browse/spring-net/tags/spring-net-1.3.0/src/
> > Spring/Spring.Data.NHibernate/Data/NHibernate/
> > HibernateTransactionManager.cs?r=HEAD). As its name implies, clear
> > removes all the DAO's from the current session. This creates a problem
> > in our application, because any attempt to acess a lazily-loaded
> > association results in a LazyInitializationException ("Could not
> > initialize proxy = no Session."). What are we doing wrong? Is there
> > something we should be doing before/after rolling back a transaction?
> >
> > Thank you for your assistance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to