Could you define (in pseudo-code) or something.. how does the business
transaction look?

2010/1/4 Sal <[email protected]>

> I have a scenario in a windows service type app where I need to load
> up to several thousand entities, perform some business logic and then
> save them. In regards to session management, this kind of falls
> outside of the usual session per call that is often discussed.
> Basically, in my case I certainly don't want one session for (x)
> thousand entities. The most obvious issue with this would be the
> memory usage.
>
> In this case, the class that coordinates the work (loading entities
> and then sending them off to specific classes for processing) needs to
> be able to have fine grained control over the session. I am
> contemplating destroying and creating a new session for each entity
> that needs to be processed. Or, perhaps there is something like
> calling session.Clear() each time to wipe everything out? The other
> thing I need is the ability to destroy and re-create a session if an
> exception occurs. Each entity represents a transaction in that all
> business logic for that entity needs to succeed or fail. If it fails,
> I need to rollback, destroy the session, create a new one and then
> move on to the next entity.
>
> I am even contemplating ignoring the whole repository/dao concept here
> and just work with the isession directly to keep it simple. Any
> thoughts on the most effective way to work with a session here?
>
>
>
> --
>
> 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