That's the question. I'm trying to write some unit tests against it and want to disable its logging so I can more easily find my test output. I tried turning off everything I could think of with the logger (log4j), and it keeps writing to my console.
...
In my pet project I want to have a user system with the following requirements:
It needs to work with Db4o as a persistance model
I want to use DI (by means of Turbine) to deliver the needed dependencies to my user model
It needs to be easy to plug in to asp.net-mvc
It needs to be testable without much hassle
It needs to support anonym...
With my pet project I'm trying to learn to use Turbine as a DI container.
I'm registering unity as locatorprovider as such:
static MvcApplication()
{
ServiceLocatorManager.SetLocatorProvider(() => new UnityServiceLocator());
}
My user repository has a parameterless constructor and I'm registering it as such:
public class UserRep...
I'm trying to refactor an existing asp.net-mvc web application and introduce mvc-turbine.
The application works as is, but I want to make it more pluggable and maintainable so future maintenance will be easier.
I figured I'd try to keep the refactoring steps as small as possible, so I referenced MvcTurbine, MvcTurbine.Unity and MvcTurbi...
When trying to refactor an existing asp.net-mvc application to use Turbine as an IoC I get the following result:
MvcTurbine.ComponentModel.ServiceResolutionException
Could not resolve serviceType 'CommonProject.Web.Shared.Controllers.SearchController'
Source Object: at MvcTurbine.Unity.UnityServiceLocator.Resolve[T](Type type)
The ...
How can I manage the lifetime of my services in mvc turbine (using Unity)?
I have an ISearchService implementation LuceneSearchService that takes an IConfigurationService and ILoggerService.
Currently my searchservice registration looks like this:
public class SearchServiceRegistration: IServiceRegistration
{
public void Registe...
I have a [Logger] attribute for my asp.net-mvc projects.
This LoggerAttribute takes a ILoggerService in it's constructor.
For regular objects (e.g. my controllers) it works, but attributes don't seem to be resolved.
How can I have Turbine inject the ILoggerService?
...
On my base controller I have placed the Logger attribute.
This LoggerAttribute looks like this:
public class LoggerAttribute: InjectableFilterAttribute
{
public override Type FilterType
{
get { return typeof (LoggerActionFilter); }
}
}
The ctor on this loggerattribute gets hit, but the FilterType getter not.
The r...
I'm currently trying to find out why my InjectableAttributes never get to the filter part.
Therefor I linked in the source project directly so I could easily put breakpoints etc.
When I build however I get the following message:
The following module was built either with optimizations enabled or without debug information:
C:\WINDOWS\M...
I'm trying to set up blade unit tests in an MVC Turbine-derived site. The problem is that I can't seem to mock the IServiceLocator interface without hitting the following exception:
System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at System.Reflection.E...
where we can use MVC Turbine?how can we implement this with ASP.NET MVC?
...
As Phil Haack explains on his blog entry, the Route Debugger helps visualizing your routing tables.
My site however gets it's routing injected by the MVCTurbine dependency injection (using Unity) like so:
public class DefaultRoutRegistration : IRouteRegistrator
{
public void Register(RouteCollection routes)
{
routes.Igno...
hola actualmente estoy conociendo sobre los frameworks Turbine,cocoon, Struts, webwork, pero quisiera saber cual de estos 4 frames, es mejor o cual recomendarian para su uso, o posiblemente cual es su escalabilidad, la mantenibilidad , su robustez, cosas asi que ayuden a decidirme por alguno de ellos Grax
...
Apparently, this method no longer gets called... In there we have code for configuring AutoMapper, and for setting model binders.
I know there is a "new" way to do model binders, but... shouldn't I still be able to do it "the old way" until I get that implemented?
Specifically, I have two lines left from my old Application_Start() me...
We are new to MVCTurbine, and are looking to convert existing StructureMap/NHibernate installations.
In particular, we have used the Application_EndRequest() method to tell StructureMap to dispose things properly, as follows:
protected void Application_EndRequest()
{
ObjectFactory.ReleaseAndDisposeAllHttpScopedObj...
To use your own ModelMetadataProvider you normally set it in the global.asax.
I'm using MVC Turbine and I need to inject a dependency into my ModelMetadataProvider as well.
Something like this:
ModelMetadataProviders.Current = new MyModelMetadataProvider(ISomeDependency);
How is this best accomplished with MVC Turbine?
...
I have implemented my own inversion of control methodology in MVC 2. I was thinking of reviewing MVC Turbine and possibly switch to that. However, I noticed today that MVC 3 Preview 1 has been released and has new inversion of control support built in. I know it will be a while before it is released, but wanted to see if anyone knows ...
I am using Turbine 2.3.2 with Hibernate 3. My problem is that the Hibernate session is not active when my (Velocity 1.6.4) template is executed, and I am accessing data from the database for which Hibernate needs lazy initialization. Therefore I get a LazyInitializationException - no Session error.
Since I want my Hibernate session to ...