org.springframework.jdbc.datasource

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.0.6 » org.springframework.jdbc.datasource 
org.springframework.jdbc.datasource
Provides a utility class for easy DataSource access, a PlatformTransactionManager for a single DataSource, and various simple DataSource implementations.
Java Source File NameTypeComment
AbstractDataSource.javaClass Abstract base class for Spring's DataSource implementations, taking care of the padding.
ConnectionHandle.javaInterface Simple interface to be implemented by handles for a JDBC Connection.
ConnectionHolder.javaClass Connection holder, wrapping a JDBC Connection.
ConnectionProxy.javaInterface Subinterface of java.sql.Connection to be implemented by Connection proxies.
DataSourceTransactionManager.javaClassorg.springframework.transaction.PlatformTransactionManager implementation for a single JDBC javax.sql.DataSource .
DataSourceUtils.javaClass Helper class that provides static methods for obtaining JDBC Connections from a javax.sql.DataSource .
DelegatingDataSource.javaClass JDBC javax.sql.DataSource implementation that delegates all calls to a given target javax.sql.DataSource .
DriverManagerDataSource.javaClass Simple implementation of the standard JDBC DataSource interface, configuring a plain old JDBC Driver via bean properties, and returning a new Connection for every getConnection call.

NOTE: This class is not an actual connection pool; it does not actually pool Connections. It just serves as simple replacement for a full-blown connection pool, implementing the same standard interface, but creating new Connections on every call.

Useful for test or standalone environments outside of a J2EE container, either as a DataSource bean in a corresponding ApplicationContext or in conjunction with a simple JNDI environment.

IsolationLevelDataSourceAdapter.javaClass An adapter for a target javax.sql.DataSource , applying the current Spring transaction's isolation level (and potentially specified user credentials) to every getConnection call.
JdbcTransactionObjectSupport.javaClass Convenient base class for JDBC-aware transaction objects. Can contain a ConnectionHolder , and implements the org.springframework.transaction.SavepointManager interface based on that ConnectionHolder.

Allows for programmatic management of JDBC 3.0 java.sql.Savepoint Savepoints .

LazyConnectionDataSourceProxy.javaClass Proxy for a target DataSource, fetching actual JDBC Connections lazily, i.e.
SimpleConnectionHandle.javaClass Simple implementation of the ConnectionHandle interface, containing a given JDBC Connection.
SingleConnectionDataSource.javaClass Implementation of SmartDataSource that wraps a single Connection which is not closed after use.
SmartDataSource.javaInterface Extension of the javax.sql.DataSource interface, to be implemented by special DataSources that return JDBC Connections in an unwrapped fashion.

Classes using this interface can query whether or not the Connection should be closed after an operation.

TransactionAwareDataSourceProxy.javaClass Proxy for a target JDBC javax.sql.DataSource , adding awareness of Spring-managed transactions.
UserCredentialsDataSourceAdapter.javaClass An adapter for a target JDBC javax.sql.DataSource , applying the specified user credentials to every standard getConnection() call, implicitly invoking getConnection(username, password) on the target. All other methods simply delegate to the corresponding methods of the target DataSource.

Can be used to proxy a target JNDI DataSource that does not have user credentials configured.

WebSphereDataSourceAdapter.javaClassDataSource implementation that delegates all calls to a WebSphere target DataSource , typically obtained from JNDI, applying a current isolation level and/or current user credentials to every Connection obtained from it.

Uses IBM-specific API to get a JDBC Connection with a specific isolation level (and read-only flag) from a WebSphere DataSource (IBM code example). Supports the transaction-specific isolation level exposed by org.springframework.transaction.support.TransactionSynchronizationManager.getCurrentTransactionIsolationLevel . It's also possible to specify a default isolation level, to be applied when the current Spring-managed transaction does not define a specific isolation level.

Usage example, defining the target DataSource as an inner-bean JNDI lookup (of course, you can link to any WebSphere DataSource through a bean reference):

 <bean id="myDataSource" class="org.springframework.jdbc.datasource.WebSphereDataSourceAdapter">
 <property name="targetDataSource">
 <bean class="org.springframework.jndi.JndiObjectFactoryBean">
 <property name="jndiName" value="jdbc/myds"/>
 </bean>
 </property>
 </bean>
Thanks to Ricardo Olivieri for submitting the original implementation of this approach!
author:
   Juergen Hoeller
author:
   Lari Hotari
author:
   Ricardo N.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.