Spring Python - Reference Documentation

Authors

Greg Turnquist, Dariusz Suchojad

1.1.1.BUILD-20101109171232

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.


Table of Contents

Preface
1. Overview
1.1. Key Features
1.2. What Spring Python is NOT
1.3. Support
1.3.1. Forums and Email
1.3.2. IRC
1.4. Downloads / Source Code
1.5. Licensing
1.6. Spring Python's team
1.6.1. How to become a team member
1.7. Deprecated Code
2. The IoC container
2.1. External dependencies
2.2. Container
2.2.1. ObjectContainer vs. ApplicationContext
2.2.2. Scope of Objects / Lazy Initialization
2.3. Configuration
2.3.1. XMLConfig - Spring Python's native XML format
2.3.1.1. Referenced Objects
2.3.1.2. Inner Objects
2.3.1.3. Collections
2.3.1.4. Constructors
2.3.1.5. Values
2.3.1.6. XMLConfig and basic Python types
2.3.1.7. Object definition inheritance
2.3.2. YamlConfig - Spring Python's YAML format
2.3.2.1. Referenced Objects
2.3.2.2. Inner Objects
2.3.2.3. Collections
2.3.2.4. Support for Python builtin types and mappings of other types onto YAML syntax
2.3.2.5. Constructors
2.3.2.6. Object definition inheritance
2.3.3. PythonConfig and @Object - decorator-driven configuration
2.3.4. PyContainerConfig - Spring Python's original XML format
2.3.5. SpringJavaConfig
2.3.6. Mixing Configuration Modes
2.4. Object Factories
2.5. Testable Code
2.6. Querying and modifying the ApplicationContext in runtime
3. Aspect Oriented Programming
3.1. External dependencies
3.2. Interceptors
3.3. Proxy Factory Objects
3.4. Pointcuts
3.5. Interceptor Chain
3.6. Coding AOP with Pure Python
4. Data Access
4.1. DatabaseTemplate
4.1.1. External dependencies
4.1.2. Traditional Database Query
4.1.3. Database Template
4.1.4. Mapping rows into objects using convention over configuration
4.1.5. Mapping rows into dictionaries
4.1.6. What is a Connection Factory?
4.1.7. Creating/altering tables, databases, and other DDL
4.1.8. SQL Injection Attacks
4.1.9. Have you used Spring Framework's JdbcTemplate?
4.1.10. Notes on using SQLServerConnectionFactory
5. Transaction Management
5.1. External dependencies
5.2. Solutions requiring transactions
5.3. TransactionTemplate
5.4. @transactional
5.4.1. @transactional(["PROPAGATION_REQUIRED"])...
6. Security
6.1. External dependencies
6.2. Shared Objects
6.3. Authentication
6.3.1. AuthenticationProviders
6.3.1.1. DaoAuthenticationProvider
6.3.1.2. LDAP Authentication Provider
6.3.1.3. Future AuthenticationProviders
6.3.2. AuthenticationManager
6.4. Authorization
7. Remoting
7.1. External dependencies
7.2. Remoting with PYRO (Python Remote Objects)
7.2.1. Decoupling a simple service, to setup for remoting
7.2.2. Exporting a Spring Service Using Inversion Of Control
7.2.2.1. Hostname/Port overrides
7.2.3. Do I have to use XML?
7.2.4. Splitting up the client and the server
7.3. Remoting with Hessian
7.4. High-Availability/Clustering Solutions
8. JMS Messaging
8.1. Introduction
8.2. Dependencies
8.3. Quick start
8.3.1. Sending
8.3.2. Receiving
8.4. Connection factories
8.4.1. springpython.jms.factory.WebSphereMQConnectionFactory
8.5. springpython.jms.core.JmsTemplate
8.5.1. Sending
8.5.2. Receiving
8.5.3. Dynamic queues
8.5.4. Message converters
8.6. springpython.jms.listener.SimpleMessageListenerContainer and background JMS listeners
8.7. springpython.jms.core.TextMessage
8.8. Exceptions
8.9. Logging and troubleshooting
9. Spring Python's plugin system
9.1. Introduction
9.2. Coily - Spring Python's command-line tool
9.2.1. Commands
9.3. Officially Supported Plugins
9.3.1. gen-cherrypy-app
9.3.1.1. External dependencies
9.4. Writing your own plugin
9.4.1. Architecture of a plugin
9.4.2. Case Study - gen-cherrypy-app plugin
9.4.2.1. Source Code
9.4.2.2. Deconstructing the factory
9.4.2.3. Summary
10. Samples
10.1. PetClinic
10.1.1. How to run
10.2. Spring Wiki
10.3. Spring Bot
10.3.1. Why write a bot?
10.3.2. IRC Library
10.3.2.1. Articles
10.3.3. What I built
10.3.3.1. IRC Bot
10.3.3.2. Web App
10.3.3.3. Putting it all together
10.3.3.4. Releasing your CherryPy web app to the internet
10.3.3.5. Come and visit Coily
10.3.4. External Links