asp.net mvc - .Net MVC + UnitOfWork + Async -


please me think through this...

i have mvc4 application using fluent nhibernate, ninject, , repository/service , unit of work patterns. app works great.

i have sync routine i'd kick off every 30 minutes or so. go out bunch of website, grab content, , stuff database. ** way have execute routine calling webpage ** (ie can't make windows service, batch job executable, etc.).

this routine threaded; there multiple "grab-and-stuffs" going on , shouldn't need wait each other.

so, had grand idea of making new controller, new method, , kick off of async routine, using waitcallbacks. problem i'm having ioc has wired (d'oh). @ end of day i've got multiple transactions on 1 instance of unitofwork/session. ioc has injected 1 instance of unitofwork 1 instance of service, , that's have work within service that's trying these async transactions.

so how can utilize existing web architecture? can short of having manually instantiate sessions? kind of defeats purpose of ioc.

thoughts?

thanks tom


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -