These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: NHibernate&MS Composite UI App. Block. Managing sessions
PostPosted: Tue Aug 08, 2006 1:30 pm 
Beginner
Beginner

Joined: Tue Aug 23, 2005 8:15 am
Posts: 45
What about ideas about managing NHibernate session strategy if Microsoft Composite UI Application Block and NHibernate are used together?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 09, 2006 9:57 am 
Beginner
Beginner

Joined: Thu Dec 08, 2005 6:49 pm
Posts: 49
I'm using a Composite UI inspired architecture and after a *lot* of grief I gave in and started using long running sessions. I think after hitting the third or forth brickwall I decided that some rules ("sessions should be as short as possible") we're meant to be broken!

One reason in particular was property change events via the INotifyPropertyChanged interface. If I read the same entity out in separate sessions, they are going to be different objects that are going to fire change events independently.

Another reason was that I am proxying all classes and collections and I've yet to see a pretty solution for session on demand initialization.

Nathan


Top
 Profile  
 
 Post subject: Thanks Nathan! I feel the same as you.
PostPosted: Wed Aug 09, 2006 10:07 am 
Beginner
Beginner

Joined: Tue Aug 23, 2005 8:15 am
Posts: 45
I tried to connect session lifetime to workitem lifetime but
to much troubles appeared.

What dou you think about single session?
And what do you mean by "proxying all classes and collections"?


Nathan Baulch wrote:
I'm using a Composite UI inspired architecture and after a *lot* of grief I gave in and started using long running sessions. I think after hitting the third or forth brickwall I decided that some rules ("sessions should be as short as possible") we're meant to be broken!

One reason in particular was property change events via the INotifyPropertyChanged interface. If I read the same entity out in separate sessions, they are going to be different objects that are going to fire change events independently.

Another reason was that I am proxying all classes and collections and I've yet to see a pretty solution for session on demand initialization.

Nathan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.