inline On Thu, Mar 5, 2009 at 9:25 PM, Jan Limpens <[email protected]> wrote:
> > So, assuming, that there was only one open session in such a scenario, > to be able to refactor my current solution, I thought about > > 1) create a ifilter, inject the sessionmanager an execute opensession > beforeaction an closesession afteraction. this more or less simulates > my ihttpmodule. don't follow. > > @ german, cool, so this seemingly already exists, but whats atm? > automatic transaction management? yes > > > 2) i create a service that exposes the current open session - probably > the most difficult part.... > > 3) inject this service into my daos (which are also services), so they > can get access to the open session without code changes. I think that the service that you are talking about is ISessionManager. The OpenSession method creates a new session when there is not an existing one, and returns the current session when called in the inner scope of another session. If you open your session at the begining of the request and close it at the end, you can safely call ISessionManager.OpenSession and will always get the same session (within that request, of course) > > > 4) method by method convert to the above mentioned pattern > > like that? > > 2009/3/5 Jan Limpens <[email protected]>: > > 2009/3/5 Tuna Toksoz <[email protected]>: > >> Do they use the same NH factory? > > > > Yes > > > > -- > > Jan > > > > > > -- > Jan > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
