-->
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.  [ 5 posts ] 
Author Message
 Post subject: Persiting business objects in ASP.NET session space?
PostPosted: Thu Dec 15, 2005 12:28 pm 
Newbie

Joined: Sun Dec 11, 2005 12:22 pm
Posts: 5
Hello!

I'm building a new cool fancy web application. I'm considering caching the business objects in the ASP.NET Session space, to save roundtrips to the database, and then save them back when the session ends, or when critical data is written to the objects (critical would be when an Order object is actually ordered, for instance)

Is this model workable with nhibernate? After what I've read, people around here REALLY don't like the idea of NHibernate session objects hanging around, so is this possible to do without storing the actual Nhibernate session object in the ASP.NET session space?

_________________
Mattias Petter Johansson


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 4:39 am 
Regular
Regular

Joined: Fri Jun 11, 2004 6:27 am
Posts: 81
Location: Yaroslavl, Russia
I think, it would be enough for you to use SysCacheProvider for second-level cache and turn on caching on your objects and collections. In this case NH by itself will store objects data in the ASP.NET cache.

_________________
Best,
Andrew Mayorov // BYTE-force


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 7:41 am 
Newbie

Joined: Sun Dec 11, 2005 12:22 pm
Posts: 5
xor wrote:
I think, it would be enough for you to use SysCacheProvider for second-level cache and turn on caching on your objects and collections. In this case NH by itself will store objects data in the ASP.NET cache.


Thank you very much - that makes a lot of sense!

_________________
Mattias Petter Johansson


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 21, 2005 5:39 pm 
Regular
Regular

Joined: Mon May 16, 2005 2:15 pm
Posts: 59
xor wrote:
I think, it would be enough for you to use SysCacheProvider for second-level cache and turn on caching on your objects and collections. In this case NH by itself will store objects data in the ASP.NET cache.


But the second level cache is a global cache, and the question looked to me like the user wanted to store the object for an Application transaction.

The ASP.Net session can be used for this, however, it may not scale well. You may consider serializing the object to the page view state instead.

BOb


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 9:12 am 
Newbie

Joined: Fri Mar 03, 2006 8:05 am
Posts: 14
Have you seen this proof of concept?

http://blog.benday.com/archive/2005/03/16/198.aspx


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.