spring .net 1 « Development « Spring Q&A





1. Is it bad to load many managed DLL's without using any types in them?    stackoverflow.com

Background: At my company we are developing a bunch applications that are using the same core dll's. These dll's are using Spring.net's IoC-container to wire things up (auto-wiring). All applications are ...

2. .Net Assembly Hell    stackoverflow.com

I am Trying to develop a .Net Web Project using NHibernate and Spring.net. But I'm stuck. Spring.net seems to depend on different versions of the NHibernate assemblies (maybe it needs 1.2.1.4000 and ...

3. How do I find out when the Spring.NET root context has loaded?    stackoverflow.com

I have a web service running, and it uses Spring.NET for it's IoCness. One of the classes needs to do some stuff when it loads (I'm using AfterPropertiesSet) and "some ...

4. Progressbar from Spring Context?    stackoverflow.com

I would like to create a window with a progressbar which shows the current status of Spring's object instantiation. From Spring.Net's documentation it seems that IObjectPostProcessors is the ...

5. How is Spring.Net making my life easier?    stackoverflow.com

"Spring.NET is an open source application framework that makes building enterprise .NET applications easier." Springframework They say that Spring makes .Net development easier. Then I see the manual which is long ...

6. Is FxCop's CollectionPropertiesShouldBeReadOnly rule incompatible with the spring framework?    stackoverflow.com

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 ...

7. Do Spring.NET and Common.Logging XML schemas (XSD) exist?    stackoverflow.com

Spring.NET 1.2.0 M1 comes with several XSD files for the <objects> node, database stuff, etc. However, it is an incomplete collection because it does not seem to include ...

8. Spring.NET problem with tag in config    stackoverflow.com

According to the help file that comes with the Spring.NET framework, you can inject a dependancy defined in the local file by using an 'idref' tag along with a 'local' attribute. ...

9. What is the format of xml context definition file that XmlApplicationContext(sFileName) will read?    stackoverflow.com

All the examples that I can search online use the App.Config mode of specifying the context definition retrieved by

contextToGetSprungObjects = ContextRegistry.GetContext(contextname)
I want to use
contextToGetSprungObjects = new XmlApplicationContext(sXmlFileName)
(I'm calling into ...





10. Connecting To A Private Remote MSMQ Queue    stackoverflow.com

I'm trying to connect to a remote private MSMQ queue using the path:

"FormatName:DIRECT=OS:remoteMachineName\Private$\MyQueue"
and I'm getting the following error:
"The specified format name does not support the requested operation. For example, a ...

11. NHibernate and Spring.NET Combination really helpful in the enterprise level application!    stackoverflow.com

What are the opinions of the software developers who have used Spring.NET and NHibernate in their projects? In couple of our projects in the company where I work, we have used ...

12. Spring.Net IoC Application Context Problem    stackoverflow.com

I'm having the following "problem". I created a application context file for spring.net. The configuration looks like this:

<spring>
 <context>
  <resource uri="config://spring/objects"/>
 </context>
 <objects configSource="SpringObjects.config" />
</spring>
I was told that if you change ...

13. Spring.NET Error: There is no parser registered for namespace    stackoverflow.com

I'm a newbie for Spring.NET. I hit the following error when using Spring.Context.Support.ContextRegistry.GetContext().

System.Configuration.ConfigurationErrorsException: Error creating context 'spring.root': Error registering object defined in 'config [C:\source\gui\bin\Debug\TryClient.vshost.exe.config#spring/objects] at line 1' : There is no ...

14. How does Spring.NET use private setters?    stackoverflow.com

While experimenting with this question on collections in Spring.NET, I discovered that Spring can inject a dependency using a private setter. I have two questions:

  1. Is this documented anywhere?
  2. Is using private ...

15. Seting up configuration for Spring.Net and Rhino Mocks for static GenerateMock<>    stackoverflow.com

I am having trouble setting up the configuration of Spring.Net so that I can use Rhino Mocks to generate a mock object. I realise that GenerateMock is a static method and ...

16. How do I specify typeAliases and objects in an external Spring.NET configuration file    stackoverflow.com

SOLVED!!!! Thanks for your help I'm kinda lost here, I'd like to remove all the Spring.NET configuration outside Web.Config but I cant figure out how to put my typeAliases. I'll appreciate all the ...





17. Spring: Remove singleton    stackoverflow.com

I am unit testing a class that calls

ContextRegistry.GetContext().GetObject("ISomething")
and it's ok if an ISomething isn't defined. So I am trying to test it both ways. Since this definition normally comes from ...

18. screencasts like dimecasts.net for spring framework    stackoverflow.com

Does anybody know of a series of screencasts for spring framework like on this webpage www.dimecasts.net regards Edwards

19. Spring.NET & Alternatives    stackoverflow.com

Is Spring.NET a good framework to use in web development? Are there alternatives? Update (for Frederik):

  • Are there drawbacks when using Spring.NET (or IoC container) in Web Development. I always used spring.actionscript in client ...

20. Spring.Net logging with Log4Net not working    stackoverflow.com

I'm having trouble getting Spring.Net to log, using Log4Net. I'm particulary interested in seeing logging around the Aspects. I'm using a pretty simple log config, similar to that of the MovieFinder ...

21. Which validation framework to choose: Spring Validation or Validation Application Block (Enterprise LIbrary 4.0)?    stackoverflow.com

I am trying to choose one of the validation frameworks for a major application, and while both options seem enticing, I was wondering whether there are any specific pros and cons ...

22. Contextual Binding with Spring.net    stackoverflow.com

In other IoC containers like ninject you can setup contextual binding pretty easily. I was wondering if contextual binding was supported by the Spring.net IoC container?

23. in Spring.config, can I define object of type string?    stackoverflow.com

Can I do something like this:

  <object id="mydb" type="string">
    <value>"blah"</value> <-- note that <value> tag does not really exist
  </object>
So that I could use it later ...

24. Creating new Objects With SPRING.Net    stackoverflow.com

I'm new on spring.net, and I'm tring to create an List<> of objects. The list is initialized by a loop that calls:

  • IObj obj= (IObj)ContextRegistry.GetContext().GetObject("obj")
  • change object properties....
  • add it to the list...
the problem is ...

25. Seting up NHibernate Validator with Spring.net    stackoverflow.com

How can I setup NHibernate Validator with Spring.net as IoC? I am already using Spring.net integration with NHibernate and can't get AutoRegisterListeners to work. What I need is to setup NHV to ...

26. Spring.net    stackoverflow.com

How do you set a value of an xml property? This is what I've tried with no succes:

<property name="Resources" value="&#60;resources/&#62;"/>
Resources is an XmlDocument field.

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

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 ...

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

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. ...

29. Unity/Spring or System.Configuration for configuration?    stackoverflow.com

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 ...

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

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 ...

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

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 ...

32. Spring.Net IoC and Magic Strings    stackoverflow.com

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

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

What I'm getting at, logically, is something like this:

<object id="foobarList" type="string[]">
    <list>
        <value>foo</value>
        <value>bar</value>
 ...

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

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">
 ...

35. Spring configuration file cannot parse elements defined in my own schema    stackoverflow.com

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">

    <xsd:complexType name="objectType" abstract="false">
        <xsd:attribute ...

36. Spring.net customer namespace parser    stackoverflow.com

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 CacheParser ());
}
}


public class CacheParser : AbstractSimpleObjectDefinitionParser
{

protected override ...

37. Spring RegisterSingleton    stackoverflow.com

I have a following object:

public class TestObject
{
    public String Something { get; set; }
}
and a following objects file:
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net"
       ...

38. Spring.NET Expression that References an Object Definition    stackoverflow.com

I'm trying to reference another object I've defined in a Spring config file from within an expression. Specifically, I'm trying to populate a property with the value of an expression ...

39. Spring.NET Creation of Object with Parameters    stackoverflow.com

I have an object with two parameters that needs to be created via Spring.NET using the configuration file for decoupling.

public Object(string param1, string param2) { ... }
The two parameters are dynamically ...

40. Refactoring tool for Spring.NET    stackoverflow.com

Currently I get to edit a lot of Spring.NET XML files, and I do find this work to quite repetitive and, frankly boring. Most of the stuff I do is sort of ...

41. Client timeout when using WCF through Spring.net    stackoverflow.com

I'm using WCF through Spring.net WCF integration link text This works relatively fine, however it seems that WCF and Spring get in each other's way when instantiating client channels. This ...

42. Instantiating a Spring.Net context inside a static method causes a memory leak    stackoverflow.com

Ran across this recently and wondering if someone out there can give me a good explanation. I was doing some refactoring and created a spring context to grab a configured ...

43. How to use complex Type params argument in Spring.NET constructor    stackoverflow.com

I am trying to use Spring.NET with a C# application to populate a parameter array (params keyword) constructor argument that is of a complex Type (call it SecretCode, which happens to ...

44. How to set enum Type indexer in Spring.NET configuration xml?    stackoverflow.com

I have this code:

public enum StateId { NotSet = 0, AL, ..., WY }

public class EnumBasedArray<I,V>:IEnumerable<V> 
{
  public V this[I index]
  { 
    get { return ...

45. Spring.Net IoC: alternative to using configuration metadata XML    stackoverflow.com

I'm trying to get a grasp of using spring.net ioc to suit my purpose. What options to using xml configuration (metadata file) are available in spring.net ioc. i.e. i don't want to ...

46. Can I use Spring.NET to inject dependencies in a created instance?    stackoverflow.com

Is it possible to to something like this using Spring.NET IoC container?

MyClass instance = new MyClass();
ContextRegistry.GetContext().InjectDepenencies(instance);
// instance has the defined dependencies set
This would come in handy. Of couse I could use ...

47. NHibernate 2.1.1 references an older version of Spring    stackoverflow.com

NHibernate 2.1.0 references Spring 1.3.0. NHibernate 2.1.1 references Spring 0.0.0.2. Is there any special reason for that? I upgraded to NHibernate 2.1.1 and now I'm getting Assembly loading errors.

48. spring.net validation    stackoverflow.com

I'm trying to use the Spring.net framework for the first time. I would like to use its validation capabilities. I'm currently trying to validate business objects, so I have defined several validators ...

49. Configuring a tabulator set to a string via Spring.NET    stackoverflow.com

I'm trying to get Spring.Net to set a tab to a property (Separators) on my service class, however whatever I try to use e.g. "\u0009" or a real tabulator spring refuses ...

50. Spring.NET Configuration Question    stackoverflow.com

I'm a Java developer being forced to learn C#. Since I couldn't stand NOT using a Dependency Injection container, I'm trying to configure Spring.NET in my project. My project is divided into ...

51. How to change configs in Spring.Net    stackoverflow.com

An advantage of an IoC container is that you can swap in a mock service at the bottom of your object graph. However this seems much harder to do in Spring.Net ...

52. Castle Windsor or Spring.NET - advantages and disadvantages    stackoverflow.com

Yesterday I was reading some articles in this site while I stumbled on an article about this two new IoC tools. Which one should I learn first? Is there some specification ...

53. Get typeof(...).Name using Spring.NET    stackoverflow.com

Is there a way to get the string representation of an interface using Spring.NET? In code:

typeof(ISsoUrlTemplateRepository).Name
I would need this name in Spring.NET configuration... I could just take the string itself but if ...

54. Replace Spring.Net IoC with another Container (e.g. Ninject)    stackoverflow.com

I'm curious to know if it's possible to replace Spring.Net's built-in IoC container with Ninject. We use Ninject on my team for IoC in our other projects so I would ...

55. Pass type of a class as value in Spring.NET    stackoverflow.com

Is there a way to pass a type of a class as the value in Spring.NET? My Dictionary looks like this:

private Dictionary<int, Type> ContentItemTypes { get; set; }
In code I would initialize ...

56. Nhibernate, error performing isolated work    stackoverflow.com

First question here I have a parent object with child object I'm using hilo generator and spring transaction manager the save operation give the error in the title.

57. Are spring.net objects created once for each server call?    stackoverflow.com

Or are they created once for the whole application?

58. Creating repositories with spring.net    stackoverflow.com

I'm creating my repositories with spring.net. However, I'm wondering what the lifetime is of these objects. In my repositories, objects that are retrieved from the database are cached in a registry. ...

59. WCF with spring    stackoverflow.com

I'm fairly new to wcf (we have yet to upgrade to .net 3.0 in my workplace) and I'm working on a little home project to bring myself up to speed with ...

60. WCF and Spring.nets ServiceExporter    stackoverflow.com

Has anybody successfully using spring.nets Spring.ServiceModel.ServiceExporter with WCF?? Some background..... I'm trying to configure wcf services with spring.net for use in a web application In my first iteration of the project I suceeded by ...

61. spring.net used in a class library    stackoverflow.com

I am attempting to use spring.net 's IoC conatiner in a class library which in and of itself is not an executable. A web project simply calls this library , this ...

62. NHibernate Interceptor Not Used When Saving    stackoverflow.com

I have a NHibernate Interceptor that is set in the HibernateTemplate using Spring.Net (I'm using ASP.NET MVC, fwiw), which is used for Auditing. However, for some reason, while the OnLoad method ...

63. WinForms StatusStrip Label and Progress Bar Not Visible When Spring is Set    stackoverflow.com

I have a .Net 3.5 Winforms application that has a status strip at the bottom. The status strip contains two labels and a progress bar with the spring property set ...

64. Spring.net Using ProxyFactoryObject with Objects that use Constructor Injection    stackoverflow.com

I've got an issue where i'm trying to call an object in spring.net through a ProxyFactoryObject. Now the the object that i'm calling in the factory has one constructor which takes ...

65. feeding dependencies to a factory class via IoC?    stackoverflow.com

I have a factory class that decides which of four available subclasses it should instantiate and return. As you would expect, all subclasses implement the same interface:

public static class FooFactory{
  ...

66. Problem with spring + nhibernate in .net environment    stackoverflow.com

I am working with Spring.net 1.3 and nHibernate for .net 1.3. While fetching the application context using XML ( _appContext = new XmlApplicationContext("abc.xml")) I am getting the exception as "Error creating object ...

67. Spring.net - how to choose implementation of interface in runtime?    stackoverflow.com

in all examples of spring.net IoC i can see something like this: interface IClass; class ClassA : IClass; class ClassB : IClass, and then in config.xml file something like [object id="IClass" type="ClassB, Spring.Net.Test" /] but, ...

68. How to serialize objects into Spring xml files?    stackoverflow.com

I am wondering if it is possible to save objects into Spring language... In Java it seamed possible (search for spring java marshaling). But Google did not help me finding what I am ...

69. Spring.NET. How actively is it being developed/supported?    stackoverflow.com

I've made my choice for the developement components on the .NET platform: Spring.NET for IoC and NHibernate for data access. But how safe is it? I've heard here on SO (don't remember ...

70. Is there any difference between Spring and Spring.net?    stackoverflow.com

I've been using Spring with Java and I've seen that there is a version called Spring.NET. I wonder if there is any significant difference between them (apart from that one is ...

71. WCF using Spring.NET woes    stackoverflow.com

I've torn out all but two hairs on my head trying to get my WCF services hosted in IIS 7.5. I'm using Spring.NET to create my service instances, but I'm having no ...

72. NHibernate Mapping Attributes + Spring    stackoverflow.com

I'm working on a C# .NET project in which I am mapping my classes to the tables in my database with NHibernate. I need to use NHibernate.Mapping.Attributes and transactions to be ...

73. Would you use Spring for a .net application?    stackoverflow.com

Would you use Spring for a .net application? It is a big winforms application. I ask this because its been a while since there is any new version of spring. What framework ...

74. Team Foundation Server 2010: Build with external library    stackoverflow.com

I have issues to build a project using external libraries with Visual Studio 2010 TFS. At the root of the solution, I have a "libs" folder with all my shared libraries and ...

75. Spring.NET - constructor-args of IList    stackoverflow.com

I am trying to inject an IList into a constructor and want to know if this is possible and if so could someone enlightern me? The fact its asking for a ...

76. Configuring Acknowledgements with Spring.NET    stackoverflow.com

Is there a way to configure Acknowledgements with Spring.NET? In code it looks like this:

var msgQ = new MessageQueue(OrdersQueueName)
           {
 ...

77. Equivalent of Spring's "parent" in Castle Windsor    stackoverflow.com

In Spring Framework (both for java and .net) i can use the following definition of objects:

<object id="parentObject" type="Type1" abstract="true">
  <property name="name" value="parent"/>
  <property name="age" value="1"/>
</object>

<object id="childObject" type="Type2" parent="parentObject">
  ...

78. Why my SqlConnection hang forever when working with NHibernte + Spring.Net    stackoverflow.com

I wrote an test case extending the Spring.Net's AbstractTransactionalDbProviderSpringContextTests class and trying to do something like this.

Step.1 MyHibernateDao.Find(id)
Step.2 Use SqlConnection API to insert some record into database.
Either step.1 or step.2 can ...

79. How can I integrate existing C# application with Spring.NET    stackoverflow.com

I have an existing application in C# and I want to integrate with Spring.NET application which are using AOP(Aspect Oriented Programming).Then how I should integrate it together to develop a new ...

80. Spring.net TransactionPropagation NotSupported    stackoverflow.com

I'm in troubles with TransactionPropagation.NotSupported. I believed that this propagation causes that the code is executed within no transaction. Means that when I marked the specific method, the current transaction will ...

81. spring Net vs enterprise library    stackoverflow.com

I've been searching the web for information about a Net Framework I can use to "take it and keep it" from now on in my projects, and I've almost made a ...

82. Use Spring.NET with NHibernate 3    stackoverflow.com

I am trying to use the sping.net nhibernate integration with the latest nhibernate 3 release. Unfortunately spring.net references nhibernate 2.1.2.4000. I tried to fix it with an assembly redirect to 3.0.0.1002 but ...

83. is spring.net being actively maintained/developed/documented?    stackoverflow.com

In the course of evaluating .net IoC frameworks, I gave spring.net a try first, seeing as how much I liked spring in java. However, I'm rapidly getting the feeling that ...

84. What is abstract="true" in spring.net?    stackoverflow.com

I have seen strange behavior when I marked an object as abstract="true". how the object will behave when I marked an object as abstract="true"? what is abstract="true". when to use abstract="true"? becuase ...

85. Loading Correct context in Spring.NET Validation    stackoverflow.com

Problem : I am having this exception being thrown, while I am trying to Validate a Business Object named StudyEnvironment using Sprint.NET Validation from config file.

'StudyEnvironment' node cannot be resolved for ...

86. InheritanceBasedAopConfigurer using runtime constructor arguments    stackoverflow.com

I've got a (prototype) class owned by the Spring.NET context, created with an AutoProxy with runtime constructor arguments. It get's instantiated like this.

var context = ContextRegistry.GetContext();
var myClass = context.GetObject("myclass", new object[]{ ...

87. Specify object definition to spring.net XmlApplicationContext at runtime    stackoverflow.com

I am new to Spring.Net, until now I was defining the xml file where I had defined all the object's definition and then created the XMLApplicationContext. Now I have to support ...

88. Tell Resharper to use spring.net DI configuration for the inspection of unused classes?    stackoverflow.com

Resharper warns me when parts of my code are never used; this is very helpful. However, I have quite a few classes that are not referenced by other code directly. These classes ...

89. Spring Adotemplate.commandtimeout    stackoverflow.com

I am using Spring.NET framework in an ASP.NET MVC project to query sql server databases. There is a commandtimeout property in Adotemplate class & i would like to know if this is ...

90. Spring .NET, WCF and Singletons    stackoverflow.com

It appears there's some issue integrating Spring .NET with WCF for getting singleton semantics. I looked around a bit on the net but I couldn't find anything conclusive. Has anybody ...

91. How do I reference existing objects from Spring.NET configuration?    stackoverflow.com

This question is in regard to the dependency injection feature of Spring.NET. Assume that I have the following object dependencies: A depends on B (via the property A.B), and B depends ...

92. spring.net long load times and alternatives to it    stackoverflow.com

Until recently I have been working on an application made with spring.net and nhibernate 2.3. The problem with it was that after building it it took about 15 minutes for it ...

93. When is Dependency Injection not a good idea?    stackoverflow.com

Possible Duplicate:
What are the downsides to using Dependency Injection?
I've been using spring.net in my latest project for D.I. and I'm fairly new to the ...

94. Spring .Net Configuration Fluently    stackoverflow.com

I have the need to use Spring .Net in a project and am exploring configuration options. All I can find about config for Spring .Net is config file stuff. ...

95. Force rebuild after Spring config file edit    stackoverflow.com

In our C# project we use Spring as an Inversion of Control (IoC) container. We noticed, that changes to the Spring configuration xml file do not cause the solution to be ...

96. spring.net injection into a page    stackoverflow.com

Wondering if someone could help with with some Spring.net IOC integration into a .aspx page I have. At present the page is set up with controller ie. a Controller property is ...

97. Spring.Net ref to Dictionary item    stackoverflow.com

I can't find out how use an item defined in dictionary (xml spring config) at other place in the spring xml file. I tried something like this, but I ever get ...

98. What's the state of Spring.Net?    stackoverflow.com

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 ...

99. Unity vs Spring.net Constructor Dependency Injection    stackoverflow.com

I find the "default Constructor Injection" in Unity to be very handful. I don't have to worry what dependencies are in the constructor as long as I have done the "Register" ...

100. Can I use Ioc pattern to achieve the following goal    stackoverflow.com

I have two classes implemented the same static methods like the following,

Class A
{
  static OpB(); 
}

Class B
{
  static OpB();
}
Can I use Ioc pattern to switch ClassA and ClassB using ...