spring.net

Spring.NET - Upgrade when Upgrading to NHibernate 2.0 from 1.1?

I want to upgrade to NHibernate 2.0 from NHibernate 1.1. Am I obliged to upgrade Spring.NET to v1.2 as well since we're using the NHibernate/Spring.NET integration module? We're currently publishing our releases under .NET Framework 3.0. ...

How to deal with null request scoped objects in Spring.NET

I have a couple of objects in Spring.NET that I have created in the request scope. This works fine when the instance exists but sometimes they need to be null. If I return null from the factory that creates them I get an error from Spring.NET indicating that it cannot wrap a null object. I gather it is trying to create a proxy around ...

Unity/Spring or System.Configuration for configuration?

If you are already using Unity as a part of your project, is there any sense in bothering with writing traditional configuration classes? Doing so seems like it's extra work, but the positives would be more domain specific XML tag names and more concise XML. But then the question becomes when you draw the line between the two and consi...

How to reference Spring.Net's ObjectFactory in the config?

I would like to use prototype interceptors instead of a singleton interceptor so each session would get a new interceptor instance. I looked into the HibernateTransactionManager Class and I think "EntityInterceptorObjectName" and "ObjectFactory" are the properties I have to set. While EntityInterceptorObjectName is pretty obvious, I ha...

Spring + Hibernate - multiple databases

Hi all, I am creating an asp.net mvc web site and I need an advice. I have following layers: database data access layer (domain objects, DAO interfaces + DAO implementations based on a NHibernate) service layer (service interfaces + service implementations) presentation layer (ASP.NET MVC) There are actually several databases: one...

How exactly dependency injection is implemented internally in Spring.net?

I'm just curious to know about this.When i heard about Spring.net and tried some sample codes of DI i found it cool and eventually i was curious to know how it works and implemented internally? Even though have the src along with the framework i'm not yet good enough to find out where and how it is done. Is this something to do with Re...

Spring.Net Message Selectors with compound statements don't seem to be working

I'm using Spring.NET to connect to ActiveMQ and do some fairly simple pub sub routing. Everything works fine when my selector is a simple expression like Car='Honda' but if I try a compound expression like Car='Honda' AND Make='Pilot' I never get any matches on my subscription. Here's the code to generate the subscription, does anyone s...

Spring.Net IoC and Magic Strings

I've been thinking about the IApplicationContext.GetObject(string name) method and it seems to rely fairly heavily on magic strings to get objects from the application context. With other containers like StructureMap you can use generics to specify the configuration and request objects but is there a better way than using strings with th...

Property Inject an Array with Spring.Net

I've been using the Spring.Net IoC container and can use it to inject properties that are of type IList and even IList<T> but I'm a bit stumped as to how to inject a property thats of type string[]. There doesn't seem to be an <array> element defined in the XSD's and using <list> <value> </list> doesn't work either. If anyone could pos...

How do I instantiate a string array object into a Spring.Net container?

What I'm getting at, logically, is something like this: <object id="foobarList" type="string[]"> <list> <value>foo</value> <value>bar</value> </list> </object> Any ideas? ...

Can springframework.net be used in a windows mobile applciation?

Can springframework.net be used in developing windows mobile applications? (Mainly the AOP and IoC bits) ...

Better way for using settings in Spring.NET configuration file?

Is there a better way for using settings (generated by Visial Stidio Settings editor) in Spring.NET configuration file than using PropertyRetrievingFactoryObject: <object id="myUri" type="Spring.Objects.Factory.Config.PropertyRetrievingFactoryObject, Spring.Core"> <property name="TargetObject"> <object type="Properties.Setti...

Is it possible to declaratively configure the spring.net cache rather using attributes

Is it possible to declaratively configure the spring.net cache rather using attributes? I dont want to add the attribute such as : [CacheResult("AspNetCache", "'Airport.Id=' + #id", TimeToLive = "0:1:0")] I'd rather do this in configuration files ...

Spring.Net support for Linq2SQL

May I know whether Spring.Net has built in support for Linq2SQL? Someone on Spring.Net forum mentioned there is a bridge for NHibernate. However, I might not use NHibernate at all. I am looking for direct support for Linq2Sql. If I am using TxScopeTransactionManager and apply attribute based transaction to a business method which contai...

transaction scope in spring.net

If I am using attribute based transaction in Spring.Net, something looks like [Transaction()] public void MyBusinessMethod() { // doing some in memory calculation, may take some time Prepare(); // actual db access code DbAccess(); } In the method, Prepare() will do some preparation work without involving the database laye...

NHibernate first level cache and Transaction Management between TransactionScope and NHibernate ITransaction

My development group is about to release a version of an internal framework that uses NHibernate (and Spring.NET) for persistence. Developers currently using our internal framework use ADO.NET for persistence, so going forward they will use a combination of ADO.NET and NHibernate. During testing of the NHibernate, we found out that the N...

Spring configuration file cannot parse elements defined in my own schema

I have a very simple xsd which defines an element "cache" <?xml version="1.0" encoding="UTF-8" standalone="no"?> <xsd:schema xmlns="http://mysite/schema/cache" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://mysite/schema/cache"&gt; <xsd:complexType name="objectType" abstract="false"> <xsd:attribute n...

Spring.net customer namespace parser

I have a customer parser which looks like this: [NamespaceParser( Namespace = "http://mysite/schema/cache", SchemaLocationAssemblyHint = typeof(CacheNamespaceParser ), SchemaLocation = "/cache.xsd" ) ] public class CacheNamespaceParser : NamespaceParserSupport { public override void Init() { RegisterObjectDefinitionParser("cache", new C...

Can web application object have prototype scope

My web page has two injected properties referring to the same object type but I wish to create to different instances. Although I set the singleton="false" on object definition the two properties points to the same memory space. My question is whether web application context in Spring.Net allows prototype scope? ...

using TypeConverter to create a vanillaObject

Hi, I created a custom type converter to create a class from a string. It works when I do this: <constructor-arg type="MyType" value="value_to_convert"/> but I also want to do something like this: <list element-type="MyType"> <object type="MyType" value="value_to_convert1"/> <object type="MyType" value="value_to_convert2"/> ...