The Spring.NET Framework

Reference Documentation

Authors

Mark Pollack , Rick Evans , Aleksandar Seovic , Bruno Baia , Erich Eichinger , Federico Spinazzi , Rob Harrop , Griffin Caprio , Ruben Bartelink , Choy Rim , Erez Mazor , Stephen Bohlen , The Spring Java Team

Version 2.0.0

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

Last Updated January 11, 2013 (Latest documentation)


1. Preface
2. Introduction
2.1. Overview
2.2. Background
2.3. Modules
2.4. Usage Scenarios
2.5. Quickstart applications
2.6. Associated Spring.NET Projects
2.7. License Information
2.8. Support
3. Background information
3.1. Inversion of Control
4. Migrating from 1.1 M2
4.1. Introduction
4.2. Important Changes
4.2.1. Namespaces
4.2.2. Core
4.2.3. Web
4.2.4. Data
4.3. Support for .NET 4
I. Core Technologies
5. The IoC container
5.1. Introduction
5.2. Container overview
5.2.1. Configuration meta data
5.2.2. Instantiating a container
5.2.2.1. Loading configuration meta data from non-default resource locations
5.2.2.2. Declarative configuration of the container in App.config/Web.config
5.2.2.3. Composing XML-based configuration meta data
5.2.3. Using the container
5.2.4. Object definition overview
5.2.4.1. Naming objects
5.2.5. Instantiating objects
5.2.5.1. Instantiatoin with a constructor
5.2.5.2. Instantiation with a static factory method
5.2.5.3. Object creation via an instance factory method
5.2.6. Object creation of generic types
5.2.6.1. Object creation of generic types via constructor invocation
5.2.6.2. Object creation of generic types via static factory method
5.2.6.3. Object creation of generic types via instance factory method
5.3. Dependencies
5.3.1. Dependency injection
5.3.1.1. Constructor-based dependency injection
5.3.1.2. Setter-based dependency injection
5.3.1.3. Examples of dependency injection
5.3.2. Dependencies and configuration in detail
5.3.2.1. Straight values (primitives, strings, and so on)
5.3.2.2. References to other objects (collaborators)
5.3.2.3. Inner objects
5.3.2.4. Setting collection values
5.3.2.5. Setting generic collection values
5.3.2.6. Collection Merging
5.3.2.7. Null and empty values
5.3.2.8. Setting indexer properties
5.3.2.9. Value and ref shortcut forms
5.3.2.10. Compound property names and Spring expression references
5.3.3. Declarative Event Listener Registration
5.3.3.1. Declarative event handlers
5.3.3.2. Configuring a method to be invoked when an event is fired
5.3.3.3. Registering a collection of handler methods based on a regular expression
5.3.3.4. Registering a handler method against an event name that contains a regular expression
5.3.4. Using depends-on
5.3.5. Lazily-initialized objects
5.3.6. Autowiring collaborators
5.3.6.1. Excluding an object from auto wiring
5.3.6.2. Using [Autowire] Attribute for fine-grained control
5.3.6.3. Using [Value] attribute for fine grained auto wiring injection
5.3.6.4. Using the plain [Qualifier] attribute to fine-grain the auto wiring finding process
5.3.6.5. Using a inherited [Qualifier] attribute with meta properties
5.3.7. Checking for dependencies
5.3.8. Method injection
5.3.8.1. Lookup Method Injection
5.3.8.2. Arbitrary method replacement
5.3.9. Setting a reference using the members of other objects and classes.
5.3.9.1. Setting a reference to the value of property.
5.3.9.2. Setting a reference to the value of field.
5.3.9.3. Setting a property or constructor argument to the return value of a method invocation.
5.3.10. Provided IFactoryObject implementations
5.3.10.1. Common logging
5.4. Object Scopes
5.4.1. The singleton scope
5.4.2. The prototype scope
5.4.3. Singleton objects with prototype-object dependencies
5.4.4. Request, session and web application scopes
5.5. Type conversion
5.5.1. Type Conversion for Enumerations
5.5.2. Built-in TypeConverters
5.5.3. Custom Type Conversion
5.5.3.1. Using CustomConverterConfigurer
5.6. Customizing the nature of an object
5.6.1. Lifecycle interfaces
5.6.1.1. IInitializingObject / init-method
5.6.1.2. IDisposable / destroy-method
5.6.1.3. [PostConstruct] and [PreDestroy] attribute driven lifecycle management
5.6.1.4. Default initialization and destroy methods
5.6.2. IApplicationContextAware and IObjectNameAware
5.6.2.1. IObjectNameAware
5.7. Object definition inheritance
5.8. Container extension points
5.8.1. Obtaining an IFactoryObject, not its product
5.9. Container extension points
5.9.1. Customizing objects with IObjectPostProcessors
5.9.1.1. Example: Hello World, IObjectPostProcessor-style
5.9.1.2. Example: the RequiredAttributeObjectPostProcessor
5.9.2. Customizing configuration meta data with IObjectFactoryPostProcessors
5.9.2.1. Example: The PropertyPlaceholderConfigurer
5.9.2.2. Example: The PropertyOverrideConfigurer
5.9.2.3. Example: The VariablePlaceholderConfigurer
5.9.3. Customizing instantiation logic using IFactoryObjects
5.9.3.1. IConfigurableFactoryObject
5.10. The IApplicationContext
5.10.1. IObjectFactory or IApplicationContext?
5.11. Configuration of IApplicationContext
5.11.1. Registering custom parsers
5.11.2. Registering custom resource handlers
5.11.3. Registering Type Aliases
5.11.4. Registering Type Converters
5.12. Added functionality of the IApplicationContext
5.12.1. Context Hierarchies
5.12.2. Using IMessageSource
5.12.3. Using resources within Spring.NET
5.12.4. Loosely coupled events
5.12.5. Event notification from IApplicationContext
5.13. Customized behavior in the ApplicationContext
5.13.1. The IApplicationContextAware marker interface
5.13.2. The IObjectPostProcessor
5.13.3. The IObjectFactoryPostProcessor
5.13.4. The PropertyPlaceholderConfigurer
5.14. Configuration of ApplicationContext without using XML
5.15. Service Locator access
5.16. Stereotype attributes
6. The IObjectWrapper and Type conversion
6.1. Introduction
6.2. Manipulating objects using the IObjectWrapper
6.2.1. Setting and getting basic and nested properties
6.2.2. Other features worth mentioning
6.3. Type conversion
6.3.1. Type Conversion for Enumerations
6.4. Built-in TypeConverters
6.4.1. Custom type converters
7. Resources
7.1. Introduction
7.2. The IResource interface
7.3. Built-in IResource implementations
7.3.1. Registering custom IResource implementations
7.4. The IResourceLoader
7.5. The IResourceLoaderAware interface
7.6. Application contexts and IResource paths
8. Threading and Concurrency Support
8.1. Introduction
8.2. Thread Local Storage
8.3. Synchronization Primitives
8.3.1. ISync
8.3.2. SyncHolder
8.3.3. Latch
8.3.4. Semaphore
9. Object Pooling
9.1. Introduction
9.2. Interfaces and Implementations
10. Spring.NET miscellanea
10.1. Introduction
10.2. PathMatcher
10.2.1. General rules
10.2.2. Matching filenames
10.2.3. Matching subdirectories
10.2.4. Case does matter, slashes don't
11. Expression Evaluation
11.1. Introduction
11.2. Evaluating Expressions
11.3. Language Reference
11.3.1. Literal expressions
11.3.2. Properties, Arrays, Lists, Dictionaries, Indexers
11.3.2.1. Defining Arrays, Lists and Dictionaries Inline
11.3.3. Methods
11.3.4. Operators
11.3.4.1. Relational operators
11.3.4.2. Logical operators
11.3.4.3. Bitwise operators
11.3.4.4. Mathematical operators
11.3.5. Assignment
11.3.6. Expression lists
11.3.7. Types
11.3.8. Type Registration
11.3.9. Constructors
11.3.10. Variables
11.3.10.1. The '#this' and '#root' variables
11.3.11. Ternary Operator (If-Then-Else)
11.3.12. List Projection and Selection
11.3.13. Collection Processors and Aggregators
11.3.13.1. Count Aggregator
11.3.13.2. Sum Aggregator
11.3.13.3. Average Aggregator
11.3.13.4. Minimum Aggregator
11.3.13.5. Maximum Aggregator
11.3.13.6. Non-null Processor
11.3.13.7. Distinct Processor
11.3.13.8. Sort Processor
11.3.13.9. Type Conversion Processor
11.3.13.10. Reverse Processor
11.3.13.11. OrderBy Processor
11.3.13.12. User Defined Collection Processor
11.3.14. Spring Object References
11.3.15. Lambda Expressions
11.3.16. Delegate Expressions
11.3.17. Null Context
11.4. Classes used in the examples
12. Validation Framework
12.1. Introduction
12.2. Example Usage
12.3. Validator Groups
12.4. Validators
12.4.1. Condition Validator
12.4.2. Required Validator
12.4.3. Regular Expression Validator
12.4.4. Generic Validator
12.4.5. Conditional Validator Execution
12.5. Validator Actions
12.5.1. Error Message Action
12.5.2. Exception Action
12.5.3. Generic Actions
12.6. Validator References
12.7. Progammatic usage
12.8. Usage tips within ASP.NET
12.8.1. Rendering Validation Errors
12.8.1.1. Configuring which Error Renderer to use.
12.8.2. How Validate() and Validation Controls play together
13. Aspect Oriented Programming with Spring.NET
13.1. Introduction
13.1.1. AOP concepts
13.1.2. Spring.NET AOP capabilities
13.1.3. AOP Proxies in Spring.NET
13.2. Pointcut API in Spring.NET
13.2.1. Concepts
13.2.2. Operations on pointcuts
13.2.3. Convenience pointcut implementations
13.2.3.1. Static pointcuts
13.2.3.2. Dynamic Pointcuts
13.2.4. Custom pointcuts
13.3. Advice API in Spring.NET
13.3.1. Advice Lifecycle
13.3.2. Advice types
13.3.2.1. Interception Around Advice
13.3.2.2. Before advice
13.3.2.3. Throws advice
13.3.2.4. After Returning advice
13.3.2.5. Advice Ordering
13.3.2.6. Introduction advice
13.4. Advisor API in Spring.NET
13.5. Using the ProxyFactoryObject to create AOP proxies
13.5.1. Basics
13.5.2. ProxyFactoryObject Properties
13.5.3. Proxying Interfaces
13.5.4. Proxying Classes
13.5.5. Concise proxy definitions
13.6. Proxying mechanisms
13.6.1. InheritanceBasedAopConfigurer
13.7. Creating AOP Proxies Programatically with the ProxyFactory
13.8. Manipulating Advised Objects
13.9. Using the "autoproxy" facility
13.9.1. Autoproxy object definitions
13.9.1.1. ObjectNameAutoProxyCreator
13.9.1.2. DefaultAdvisorAutoProxyCreator
13.9.1.3. PointcutFilteringAutoProxyCreator
13.9.1.4. TypeNameAutoProxyCreator
13.9.1.5. AttributeAutoProxyCreator
13.9.1.6. AbstractFilteringAutoProxyCreator
13.9.1.7. AbstractAutoProxyCreator
13.9.2. Using attribute-driven auto-proxying
13.10. Using AOP Namespace
13.11. Using TargetSources
13.11.1. Hot swappable target sources
13.11.2. Pooling target sources
13.11.3. Prototype target sources
13.11.4. ThreadLocal target sources
13.12. Defining new Advice types
13.13. Further reading and resources
14. Aspect Library
14.1. Introduction
14.2. Caching
14.3. Exception Handling
14.3.1. Language Reference
14.4. Logging
14.5. Retry
14.5.1. Language Reference
14.6. Transactions
14.7. Parameter Validation
15. Common Logging
15.1. Introduction
16. Testing
16.1. Introduction
16.2. Unit testing
16.3. Integration testing
16.3.1. Context management and caching
16.3.2. Dependency Injection of test fixtures
16.3.2.1. Field level injection
16.3.3. Transaction management
16.3.4. Convenience variables
II. Middle Tier Data Access
17. Transaction management
17.1. Introduction
17.2. Motivations
17.3. Key Abstractions
17.4. Resource synchronization with transactions
17.4.1. High-level approach
17.4.2. Low-level approach
17.5. Declarative transaction management
17.5.1. Understanding Spring's declarative transaction implementation
17.5.2. Example of declarative transaction implementation
17.5.3. Declarative transactions using the transaction namespace
17.5.4. Transaction attribute settings
17.5.5. Declarative Transactions using AutoProxy
17.5.5.1. Creating transactional proxies with ObjectNameAutoProxyCreator
17.5.5.2. Creating transactional proxies with DefaultAdvisorAutoProxyCreator
17.6. Programmatic transaction management
17.6.1. Using the TransactionTemplate
17.6.1.1. Specifying transaction settings
17.6.2. Using the PlatformTransactionManager
17.7. Choosing between programmatic and declarative transaction management
17.8. Transaction lifecycle and status information
18. DAO support
18.1. Introduction
18.2. Consistent exception hierarchy
18.3. Consistent abstract classes for DAO support
19. DbProvider
19.1. Introduction
19.2. IDbProvider and DbProviderFactory
19.3. XML based configuration
19.4. Connection String management
19.5. Additional IDbProvider implementations
19.5.1. UserCredentialsDbProvider
19.5.2. MultiDelegatingDbProvider
20. Data access using ADO.NET
20.1. Introduction
20.2. Motivations
20.3. Provider Abstraction
20.3.1. Creating an instance of IDbProvider
20.4. Namespaces
20.5. Approaches to Data Access
20.6. Introduction to AdoTemplate
20.6.1. Execute Callback
20.6.2. Execute Callback in .NET 2.0
20.6.3. Execute Callback in .NET 1.1
20.6.4. Quick Guide to AdoTemplate Methods
20.6.5. Quick Guide to AdoTemplate Properties
20.7. Transaction Management
20.8. Exception Translation
20.9. Parameter Management
20.9.1. IDbParametersBuilder
20.9.2. IDbParameters
20.9.3. Parameter names in SQL text
20.10. Custom IDataReader implementations
20.11. Basic data access operations
20.11.1. ExecuteNonQuery
20.11.2. ExecuteScalar
20.12. Queries and Lightweight Object Mapping
20.12.1. ResultSetExtractor
20.12.2. RowCallback
20.12.3. RowMapper
20.12.4. Query for a single object
20.12.5. Query using a CommandCreator
20.13. DataTable and DataSet
20.13.1. DataTables
20.13.2. DataSets
20.14. TableAdapters and participation in transactional context
20.15. Database operations as Objects
20.15.1. AdoQuery
20.15.2. MappingAdoQuery
20.15.3. AdoNonQuery
20.15.4. Stored Procedure
21. Object Relational Mapping (ORM) data access
21.1. Introduction
21.2. NHibernate
21.2.1. Resource management
21.2.2. Transaction Management
21.2.3. SessionFactory set up in a Spring container
21.2.3.1. Creating a new SessionFactory per Connection String with DelegatingLocalSessionFactory Object
21.2.3.2. Using FluentNHibernate to configure mappings with LocalSessionFactoryObject
21.2.3.3. Spring's IByteCodeProvider implementation
21.2.4. Implementing DAOs based on plain Hibernate 1.2/2.x API
21.2.4.1. Exception Translation
21.2.5. Declarative transaction demarcation
21.2.6. Programmatic transaction demarcation
21.2.7. Transaction management strategies
21.2.8. Web Session Management
21.2.9. Session Scope
21.2.10. Integration Testing
III. The Web
22. Spring.NET Web Framework
22.1. Introduction to Spring.NET Web Framework
22.2. Comparing Spring.NET and ASP.NET
22.3. Automatic context loading and hierarchical contexts
22.3.1. Configuration of a web application
22.3.1.1. Configuration for IIS 7.0 on Windows Server 2008 and Windows Vista
22.3.2. Context hierarchy
22.4. Dependency injection for ASP.NET pages
22.4.1. Injecting dependencies into controls
22.4.2. Injecting dependencies into custom HTTP modules
22.4.3. Injecting dependencies into HTTP handlers and handler factories
22.4.4. Injecting dependencies in custom ASP.NET providers
22.4.5. Customizing control dependency injection
22.5. Web object scopes
22.6. Support for ASP.NET 1.1 master pages in Spring.Web
22.6.1. Linking child pages to their master page file
22.7. Bidirectional data binding and data model management
22.7.1. Data binding under the hood
22.7.1.1. Binding direction
22.7.1.2. formatter argument
22.7.1.3. Type conversion
22.7.1.4. Data binding events
22.7.1.5. Rendering binding errors
22.7.1.6. HttpRequestListBindingContainer
22.7.2. Using DataBindingPanel
22.7.3. Customizing model persistence
22.8. Localization and message sources
22.8.1. Working with localizers
22.8.2. Automatic localization with localizers ("push" localization)
22.8.3. Global message sources
22.8.4. Applying resources manually ("pull" localization)
22.8.5. Localizing images within a web application
22.8.6. User culture management
22.8.6.1. DefaultWebCultureResolver
22.8.6.2. RequestCultureResolver
22.8.6.3. SessionCultureResolver
22.8.6.4. CookieCultureResolver
22.8.7. Changing cultures
22.9. Result mapping
22.9.1. Registering user defined transfer modes
22.10. Client-side scripting
22.10.1. Registering scripts within the head HTML section
22.10.2. Adding CSS definitions to the head section
22.10.3. Well-known directories
22.11. Spring user controls
22.11.1. Validation controls
22.11.2. Databinding controls
22.11.3. Calendar control
22.11.4. Panel control
23. ASP.NET AJAX
23.1. Introduction
23.2. Web Services
23.2.1. Exposing Web Services
23.2.2. Calling Web Services by using JavaScript
24. Spring.NET ASP.NET MVC Infrastructure for ASP.NET MVC 2.0
24.1. Introduction to Spring.NET ASP.NET MVC Infrastructure
24.2. Automatic context loading and hierarchical contexts
24.2.1. Configuration of a ASP.NET MVC Application
24.2.2. Customizing the Behavior of the ASP.NET MVC Application Class
24.2.2.1. Application_Start(object sender, EventArgs e)
24.2.2.2. ConfigureApplicationContext()
24.2.2.3. RegisterSpringControllerFactory()
24.2.2.4. RegisterRoutes(RouteCollection routes)
24.2.2.5. RegisterAreas()
24.3. Web object scopes
25. Spring.NET ASP.NET MVC Infrastructure for ASP.NET MVC 3.0
25.1. Introduction to Spring.NET ASP.NET MVC Infrastructure
25.2. Automatic context loading and hierarchical contexts
25.2.1. Configuration of a ASP.NET MVC Application
25.2.2. Customizing the Behavior of the ASP.NET MVC Application Class
25.2.2.1. Application_BeginRequest(object sender, EventArgs e)
25.2.2.2. ConfigureApplicationContext()
25.2.2.3. BuildDependencyResolver()
25.2.2.4. RegisterDependencyResolver(IDependencyResolver resolver)
25.3. Web object scopes
IV. Services
26. Introduction to Spring Services
26.1. Introduction
27. .NET Remoting
27.1. Introduction
27.2. Publishing SAOs on the Server
27.2.1. SAO Singleton
27.2.2. SAO SingleCall
27.2.3. IIS Application Configuration
27.3. Accessing a SAO on the Client
27.4. CAO best practices
27.5. Registering a CAO object on the Server
27.5.1. Applying AOP advice to exported CAO objects
27.6. Accessing a CAO on the Client
27.6.1. Applying AOP advice to client side CAO objects.
27.7. XML Schema for configuration
27.8. Additional Resources
28. .NET Enterprise Services
28.1. Introduction
28.2. Serviced Components
28.3. Server Side
28.4. Client Side
29. Web Services
29.1. Introduction
29.2. Server-side
29.2.1. Removing the need for .asmx files
29.2.2. Injecting dependencies into web services
29.2.3. Exposing POCOs as Web Services
29.2.4. Exporting an AOP Proxy as a Web Service
29.3. Client-side
29.3.1. Using VS.NET generated proxy
29.3.2. Generating proxies dynamically
29.3.3. Configuring the proxy instance
30. Windows Communication Foundation (WCF)
30.1. Introduction
30.2. Configuring WCF services via Dependency Injection
30.2.1. Dependency Injection
30.3. Apply AOP advice to WCF services
30.4. Creating client side proxies declaratively
30.5. Exporting POCOs as WCF Services
V. Integration
31. Message Oriented Middleware - Apache ActiveMQ and TIBCO EMS
31.1. Introduction
31.1.1. Multiple Vendor Support
31.1.2. Separation of Concerns
31.1.3. Interoperability and provider portability
31.1.4. The role of Messaging API in a 'WCF world'
31.2. Using Spring Messaging
31.2.1. Messaging Template overview
31.2.2. Connections
31.2.3. Caching Messaging Resources
31.2.3.1. SingleConnectionFactory
31.2.3.2. CachingConnectionFactory
31.2.4. Dynamic Destination Management
31.2.5. Message Listener Containers
31.2.6. Transaction Management
31.3. Sending a Message
31.3.1. Using MessageConverters
31.. Session and Producer Callback
31.5. Receiving a message
31.5.1. Synchronous Reception
31.5.2. Asynchronous Reception
31.5.3. The ISessionAwareMessageListener interface
31.5.4. MessageListenerAdapater
31.5.5. Processing messages within a messaging transaction
31.5.6. Messaging Namespace support
32. Message Oriented Middleware - TIBCO EMS
32.1. Introduction
32.2. Interface based APIs
32.3. Using Spring's EMS based Messaging
32.3.1. Overivew
32.3.2. Connections
32.3.3. Caching Messaging Resources
32.3.3.1. SingleConnectionFactory
32.3.3.2. CachingConnectionFactory
32.3.4. Dynamic Destination Management
32.3.5. Accessing Admistrated objects via JNDI
32.3.6. MessageListenerContainers
32.3.7. Transaction Management
32.3.8. Sending a Message
32.4. Using MessageConverters
32.5. Session and Producer Callback
32.6. Receiving a messages
32.6.1. Synchronous Reception
32.6.2. Asynchronous Reception
32.6.3. The ISessionAwareMessageListener interface
32.6.4. MessageListenerAdapter
32.6.5. Processing messages within a messaging transaction
32.6.6. Messaging Namespace support
33. Message Oriented Middleware - MSMQ
33.1. Introduction
33.2. A quick tour for the impatient
33.3. Using Spring MSMQ
33.3.1. MessageQueueTemplate
33.3.2. MessageQueueFactoryObject
33.3.3. MessageQueue and IMessageConverter resource management
33.3.4. Message Listener Containers
33.3.4.1. NonTransactionalMessageListenerContainer
33.3.4.2. TransactionalMessageListenerContainer
33.3.4.3. DistributedTxMessageListenerContainer
33.4. MessageConverters
33.4.1. Using MessageConverters
33.5. Interface based message processing
33.5.1.
33.5.1.1. MessageListenerAdapater
33.6. Comparison with using WCF
34. Scheduling and Thread Pooling
34.1. Introduction
34.2. Using the Quartz.NET Scheduler
34.2.1. Using the JobDetailObject
34.2.2. Using the MethodInvokingJobDetailFactoryObject
34.2.3. Wiring up jobs using triggers and the SchedulerFactoryObject
35. Template Engine Support
35.1. Introduction
35.2. Dependencies
35.3. Configuring a VelocityEngine
35.3.1. Simple file based template engine definition
35.3.2. Configuration Options
35.3.3. Assembly based template loading
35.3.4. Using Spring's IResourceLoader to load templates
35.3.5. Defining a custom resource loader
35.3.6. Resource Loader configuration options
35.3.7. Using a custom configuration file
35.3.8. Logging
35.4. Merging a template
35.5. Configuring a VelocityEngine without a custom namespace
VI. Code-Based Configuration
36. Introducing CodeConfig
36.1. A Dependency Injection Example
36.2. Migration to CodeConfig
36.2.1. The CodeConfig Classes
36.2.1.1. Creating the CodeConfig Classes
36.2.1.2. Elements of the CodeConfig Classes
36.2.2. Creating and Initializing the Application Context
36.3. More Granular Control Using CodeConfig
36.4. Organizing and Composing Multiple [Configuration] Classes
36.4.1. Multiple Stand-Alone Configuration Classes
36.4.2. High-Level [Configuration] Classes that [Import] Others
36.4.3. Referencing [ObjectDef]s from one [Configuration] Class in Another
37. CodeConfigApplicationContext Reference
37.1. Concepts
37.1.1. Using the CodeConfigApplicationContext
37.1.2. Mixing and matching configuration metadata formats
37.2. Scanning Basics
37.2.1. Scaning all assemblies
37.2.2. Scanning specific assemblies and types
37.2.3. Assembly Inclusion Constraints
37.2.4. Type Inclusion Constraints
37.3. Advanced Scanning Behavior
37.3.1. Combining Root Path, Assembly Constraints, and Type Constraints
37.3.2. Using your own AssemblyObjectDefintionScanner Instance
37.3.2.1. Scanning Specific Assemblies and Types
37.4. Use of XML Namespace and scanning
38. Attribute Reference
38.1. [Configuration] Attribute
38.1.1. Using the Configuration Attribute
38.1.1.1. Simple Usage
38.1.1.2. Controlling the Name of the Configuration Class
38.2. [ObjectDef] Attribute
38.2.1. Using the ObjectDef Attribute
38.2.1.1. Simple Usage
38.2.1.2. Controlling the Name and Aliases of the Defined Object
38.2.1.3. Setting an Init Method for the Object
38.2.1.4. Setting a Destroy Method for the Object
38.3. [DependsOn] Attribute
38.3.1. Using the DependsOn Attribute
38.3.1.1. Controlling Creation Dependencies
38.4. [Import] Attribute
38.4.1. Using the Import Attribute
38.4.1.1. Specifying Additional Types to Scan
38.4.1.2. Chaining [Import] Directives
38.5. [ImportResource] Attribute
38.5.1. Using the ImportResourceAttribute
38.5.1.1. Specifying an IResource
38.5.1.2. Specifying Multiple IResources
38.5.1.3. Specifying a specific IObjectDefintionReader to Parse the IResource
38.6. [Lazy] Attribute
38.6.1. Using the Lazy Attribute
38.6.1.1. Specifying Lazy Instantiation
38.6.1.2. Specifying Non-Lazy (eager) Instantiation
38.7. [Scope] Attribute
38.7.1. Scope Attribute Usage
39. Sample Applications
39.1. Overview
39.2. Spring.IoCQuickStart.MovieFinder
39.2.1. Modifying App.config
39.2.2. Replacing Appcontext.xml with CodeConfigBootstrap.xml
39.2.3. Introducing the MovieFinderConfiguration CodeConfig class
39.3. Spring.MvcQuickStart
39.3.1. Modifying Web.config
39.3.2. Replacing controllers.xml with CodeConfigBootstrap.xml
39.3.3. Introducing the ControllerConfiguration CodeConfig class
39.4. Spring.CodeConfig.Migration
VII. VS.NET Integration
40. Visual Studio.NET Integration
40.1. XML Editing and Validation
40.2. Enhancing the XML Editing and Validation Experience using the Spring.NET Visual Studio 2010 Extension
40.3. Solution Templates
40.3.1. Class Library
40.3.2. ADO.NET based application library
40.3.3. NHibernate based application library
40.3.4. Spring based web application
40.4. Resharper Type Completion
40.5. Resharper templates
40.6. Versions of XML Schema
40.7. API documentation
VIII. Quickstart applications
41. IoC Quickstarts
41.1. Introduction
41.2. Movie Finder
41.2.1. Getting Started - Movie Finder
41.2.2. First Object Definition
41.2.3. Setter Injection
41.2.4. Constructor Injection
41.2.5. Summary
41.2.6. Logging
41.3. ApplicationContext and IMessageSource
41.3.1. Introduction
41.4. ApplicationContext and IEventRegistry
41.4.1. Introduction
41.5. Pooling example
41.5.1. Implementing Spring.Pool.IPoolableObjectFactory
41.5.2. Being smart using pooled objects
41.5.3. Using the executor to do a parallel grep
41.6. AOP
42. AOP QuickStart
42.1. Introduction
42.2. The basics
42.2.1. Applying advice
42.2.2. Using Pointcuts - the basics
42.3. Going deeper
42.3.1. Other types of Advice
42.3.1.1. Before advice
42.3.1.2. After advice
42.3.1.3. Throws advice
42.3.1.4. Introductions (mixins)
42.3.1.5. Layering advice
42.3.1.6. Configuring advice
42.3.2. Using Attributes to define Pointcuts
42.4. The Spring.NET AOP Cookbook
42.4.1. Caching
42.4.2. Performance Monitoring
42.4.3. Retry Rules
42.5. Spring.NET AOP Best Practices
43. Portable Service Abstraction Quick Start
43.1. Introduction
43.2. .NET Remoting Example
43.3. Implementation
43.4. Running the application
43.5. Remoting Schema
43.6. .NET Enterprise Services Example
43.7. Web Services Example
43.8. Additional Resources
44. Web Quickstarts
44.1. Introduction
45. SpringAir - Reference Application
45.1. Introduction
45.2. Getting Started
45.3. Container configuration
45.4. Bi-directional data binding
45.5. Declarative Validation
45.6. Internationalization
45.7. Web Services
46. ADO.NET Data Access QuickStart
46.1. Introduction
46.1.1. Database configuration
46.1.1.1. AdoTemplate Configuration
46.1.2. CommandCallback
47. Transactions QuickStart
47.1. Introduction
47.2. Application Overview
47.2.1. Interfaces
47.3. Implementation
47.4. Configuration
47.4.1. Rollback Rules
47.5. Adding additional Aspects
48. NHibernate QuickStart
48.1. Introduction
48.2. Getting Started
48.3. Implementation
48.3.1. The Data Access Layer
48.3.2. The domain objects
48.3.3. NHibernate based DAO implementation
48.3.4. The Service layer
48.3.5. Integration testing
48.3.6. Web Application
49. Quartz QuickStart
49.1. Introduction
49.2. Application Overview
49.3. Standard job scheduling
49.4. Scheduling arbitrary methods as jobs
50. NMS QuickStart
50.1. Introduction
50.2. Message Destinations
50.3. Gateways
50.4. Message Data
50.5. Message Handlers
50.6. Message Converters
50.7. Messaging Infrastructure
50.8. Running the application
51. TIBCO EMS QuickStart
51.1. Introduction
51.2. Message Destinations
51.3. Messaging Infrastructure
51.4. Running the application
52. MSMQ QuickStart
52.1. Introduction
52.2. Message Destinations
52.3. Gateways
52.4. Message Data
52.5. Message Handlers
52.6. MessageConverters
52.7. Messaging Infrastructure
52.8. Running the application
53. WCF QuickStart
53.1. Introduction
53.2. The server side
53.2.1. WCF Dependency Injection and AOP in self-hosted application
53.2.2. WCF Dependency Injection and AOP in IIS web application
53.3. Client access
IX. Spring.NET for Java developers
54. Spring.NET for Java Developers
54.1. Introduction
54.2. Beans to Objects
54.3. PropertyEditors to TypeConverters
54.4. ResourceBundle-ResourceManager
54.5. Exceptions
54.6. Application Configuration
54.7. AOP Framework
54.7.1. Cannot specify target name at the end of interceptorNames for ProxyFactoryObject
X. Appendices
A. Classic Spring Usage
A.1. Classic Hibernate Usage
A.1.1. The HibernateTemplate
A.1.2. Implementing Spring-based DAOs without callbacks
A.2. Classic Declarative Transaction Configurations
A.2.1. Declarative Transaction Configuration using DefaultAdvisorAutoProxyCreator
A.2.2. Declarative Transactions using TransactionProxyFactoryObject
A.2.3. Concise proxy definitions
A.2.4. Declarative Transactions using ProxyFactoryObject
B. XML Schema-based configuration
B.1. Introduction
B.2. XML Schema-based configuration
B.2.1. Referencing the schemas
B.2.2. The tx (transaction) schema
B.2.3. The aop schema
B.2.4. The db schema
B.2.5. The wcf schema
B.2.6. The remoting schema
B.2.7. The nms messaging schema
B.2.8. The validation schema
B.2.9. The objects schema
B.3. Setting up your IDE
C. Extensible XML authoring
C.1. Introduction
C.2. Authoring the schema
C.3. Coding a INamespaceParser
C.4. Coding an IObjectDefinitionParser
C.5. Registering the handler and the schema
C.5.1. NamespaceParsersSectionHandler
C.6. Using a custom extension in your Spring XML configuration
C.7. Further Resources
D. Spring.NET's spring-objects.xsd