spring.net

Spring.NET and MVC3 on IIS7 - session scope behaviour

ⅰ亾dé卋堺 提交于 2019-12-07 21:26:22
问题 probably it's a stupid question and I simply did not understand how Spring and IIS work, but lets give it a try. I'm quite new to ASP.NET and as far as I understand, the session handling is similar to Apache/PHP: A session is shared between tabs of a browser, but not between different browsers. I.e. if I open my page in Firefox and put something in the cart, the cart will still contain my items in another tab, but opening the very same page in Internet Explorer should show me an empty cart.

How do I configure a NULL object in Spring.Net

有些话、适合烂在心里 提交于 2019-12-07 20:19:25
问题 In the particular project in which I'm working it is appropriate to to have a null log service object. Since this is configured in Spring.Net How do I configure my spring.net object to be null. This is what I'd like to do. Is it possible? <objects xmlns="http://www.springframework.net"> <!-- Messages --> <object id ="LogService"> <null /> </object> 回答1: You can inject a null object : <object id="MyObject"> <property name="LogServer"> <null/> </property> </object> To create a null object, you

How to integrate WebApi 2 with Spring.Net

戏子无情 提交于 2019-12-07 19:39:17
问题 Im trying to integrate WebApi 2 with Spring.Net with not success. This is what i have tried: public class MvcApplication : SpringMvcApplication { protected void Application_Start() { XmlConfigurator.Configure(); AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); } } When is creating the

When to call Dispose in Entity Framework?

六眼飞鱼酱① 提交于 2019-12-07 17:36:30
In my application I am making use of Spring.Net for IoC. The service objects are called from the ASP.Net files to perform CRUD operations using these service object. For example, I have CustomerService to do all CRUD operations on Customer table. I use entity framework and the entities are injected .. my question is where do I call the dispose method? As far as I understood from the API documentations, unless I call Dispose() there is no guaranty it will be garbage collected! So where and how do I do it? Example Service Class: public class CustomerService { public ecommEntities entities = {get

How can I spring.net inject in to methods?

不羁的心 提交于 2019-12-07 10:22:16
问题 I posted to following on the spring.net forum but also hoped I may get some value views here: I am looking at some advice as to how I might achieve the following requirement. Firstly some background - I am using Spring.NET to achieve IOC depdenecny injection in to my asp.net c# multi tier web application. Injection is achieved via spring.net xml configuration file with all my development achieved by developing against interfaces and injecting in an interface implemented class where required.

Is FxCop's CollectionPropertiesShouldBeReadOnly rule incompatible with the spring framework?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 14:07:44
FxCop has the CollectionPropertiesShouldBeReadOnly rule that complains if your class has some kind of collection property that clients can set. Instead, it suggests making the property read-only and supplying a Clear() method and Add() or AddRange() methods for changing the contents of the collection. I agree that makes for a cleaner and more controlled interface, but I'm struggling to make that interface work with the Spring framework. If I want to configure an object with a collection of collaborators, I have to expose some collection property to inject the collaborators into. I've looked

Cannot inject dependencies to Azure WorkerRole object using Spring.NET

巧了我就是萌 提交于 2019-12-06 08:47:07
问题 I have moderate experience in developing web applications using spring.net 4.0 , nhibernate 3.0 for ASP.net based web applications. Recently I ran into a situation where I needed to use spring.net to inject my service dependencies which belong to the WorkerRole class. I created the app.config file as I normally did with the web.config files on for spring. Here it is for clarity. (I have excluded the root nodes) <configSections> <sectionGroup name="spring"> <section name="context" type="Spring

Injecting advice to a recursive method in Spring.Net?

折月煮酒 提交于 2019-12-06 08:05:12
问题 I'm trying to use Spring.NET's support for AOP to do dependency injection/inversion of control/aspect-oriented programming (sorry for the slew of buzzwords - maybe I'll post a separate question asking someone to clarify the difference :) ). Specifically, I want to have intercept a recursive method call, so that every time that the method is invoked, the AOP advice/interceptor will be called. Spring.Net doesn't appear to intercept anything other than the very first method call. I think that

Accessing ConfigurationManager.AppSettings value from Spring.NET xml configuration

元气小坏坏 提交于 2019-12-06 00:56:27
问题 I have a requirement that requires me to use Spring.net to get a connectionstring that is stored inside the app.config, and then inject the retrieved connectionstring to a instantiated object. How can I do this using Spring.net's xml configuration? For e.g., instead of my codes doing this: // Spring.net config: <object name="myService" type="com.acme.MyService, com.acme"> <constructor-arg type="System.String" value="myConnectionName"/> </object> // Web.config: <connectionStrings> <add name=

What's the state of Spring.Net?

孤人 提交于 2019-12-06 00:13:40
问题 I'm currently evaluating the technologies we want to use for our next project. It will mainly be a backend for automatic data manipulation. It has some dependencies and we can only build it on top of .Net 3.5 at the moment. Spring.net seems like a good match for our requirements, since it brings a DI container, ADO.Net helpers, NHibernate, Unit testing helpers and other goodies in one maintained package. How established is Spring.Net in the community and what's the state? It seems like being