Java Doc for DataSource.java in  » Database-JDBC-Connection-Pool » sequoia-2.10.9 » org » continuent » sequoia » driver » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 » Database JDBC Connection Pool » sequoia 2.10.9 » org.continuent.sequoia.driver 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.continuent.sequoia.driver.DataSource

DataSource
public class DataSource implements javax.sql.DataSource,Referenceable,Serializable(Code)
An implementation of the JDBC 2.0 optional package DataSource interface. It allows to set the URL, user name, and password to its properties. It can be bound via JNDI so that the properties can be set by an "application server" and a "ready-to-use" reference to DataSource can be retrieved via JNDI.
author:
   Marek Prochazka
version:
   1.0


Field Summary
final protected static  StringDESCRIPTION_PROPERTY
    
final protected static  StringDRIVER_CLASSNAME
    
final protected static  StringFACTORY_CLASSNAME
    
final protected static  StringPASSWORD_PROPERTY
    
final protected static  StringURL_PROPERTY
    
final protected static  StringUSER_PROPERTY
    
protected static  Driverdriver
     Wrapped driver for to get connections.
protected  PrintWriterlogWriter
    
protected  Stringpassword
    
protected  Stringurl
    
protected  Stringuser
    

Constructor Summary
public  DataSource()
     Default constructor.

Method Summary
public  java.sql.ConnectiongetConnection()
     Gets connection.
public  java.sql.ConnectiongetConnection(String user, String password)
     Gets connection.
protected  java.sql.ConnectiongetConnection(Properties props)
     Creates a connection using the specified properties.
Parameters:
  props - connection properties.
throws:
  SQLException - if an error occurs.
public  StringgetDescription()
     Return the description of this Datasource with the Driver version number.
public  java.io.PrintWritergetLogWriter()
     Gets the log writer.
public  intgetLoginTimeout()
     Gets the login timeout.
public  ReferencegetReference()
     Gets a reference to this.
public  StringgetURL()
     Gets URL of the Sequoia controller(s) to connect.
public  StringgetUrl()
     Gets url of the Sequoia controller(s) to connect.
public  StringgetUser()
     Gets user name to be used to connect the Sequoia controller(s).
public  voidsetLogWriter(PrintWriter output)
     Sets the log writer for this data source.
public  voidsetLoginTimeout(int seconds)
     Sets the timeout.
public  voidsetPassword(String pwd)
     Sets password to be used to connect the Sequoia controller(s).
public  voidsetURL(String url)
     Sets URL of the Sequoia controller(s) to connect.
public  voidsetUrl(String url)
     Sets url of the Sequoia controller(s) to connect.
public  voidsetUser(String userName)
     Sets user name to be used to connect the Sequoia controller(s).

Field Detail
DESCRIPTION_PROPERTY
final protected static String DESCRIPTION_PROPERTY(Code)



DRIVER_CLASSNAME
final protected static String DRIVER_CLASSNAME(Code)



FACTORY_CLASSNAME
final protected static String FACTORY_CLASSNAME(Code)



PASSWORD_PROPERTY
final protected static String PASSWORD_PROPERTY(Code)



URL_PROPERTY
final protected static String URL_PROPERTY(Code)
DataSource properties



USER_PROPERTY
final protected static String USER_PROPERTY(Code)



driver
protected static Driver driver(Code)
Wrapped driver for to get connections.



logWriter
protected PrintWriter logWriter(Code)



password
protected String password(Code)



url
protected String url(Code)
DataSource properties



user
protected String user(Code)




Constructor Detail
DataSource
public DataSource()(Code)
Default constructor.




Method Detail
getConnection
public java.sql.Connection getConnection() throws SQLException(Code)
Gets connection. Retrieves a new connection using the user name and password that have been already set.
throws:
  SQLException - if an error occurs. a new connection.



getConnection
public java.sql.Connection getConnection(String user, String password) throws SQLException(Code)
Gets connection. Retrieves a new connection using the user name and password specified.
Parameters:
  user - user name.
Parameters:
  password - password. a new connection.
throws:
  SQLException - if an error occurs.



getConnection
protected java.sql.Connection getConnection(Properties props) throws SQLException(Code)
Creates a connection using the specified properties.
Parameters:
  props - connection properties.
throws:
  SQLException - if an error occurs. a new connection.



getDescription
public String getDescription()(Code)
Return the description of this Datasource with the Driver version number. Datasource description



getLogWriter
public java.io.PrintWriter getLogWriter()(Code)
Gets the log writer. log writer.



getLoginTimeout
public int getLoginTimeout() throws SQLException(Code)
Gets the login timeout. login timeout
throws:
  SQLException - in case of an error occurs.



getReference
public Reference getReference() throws NamingException(Code)
Gets a reference to this. The factory used for this class is the DataSourceFactory class. a reference to this.
throws:
  NamingException - if DataSourceFactory not found.



getURL
public String getURL()(Code)
Gets URL of the Sequoia controller(s) to connect. The URL is stored in the DataSource.URL_PROPERTY property. URL to be used to connect Sequoia controller(s).



getUrl
public String getUrl()(Code)
Gets url of the Sequoia controller(s) to connect. The URL is stored in the DataSource.URL_PROPERTY property. URL to be used to connect Sequoia controller(s).



getUser
public String getUser()(Code)
Gets user name to be used to connect the Sequoia controller(s). The user name is stored in the DataSource.USER_PROPERTY property. user name to be used to connect Sequoia controller(s).



setLogWriter
public void setLogWriter(PrintWriter output) throws SQLException(Code)
Sets the log writer for this data source.
Parameters:
  output - print writer.
throws:
  SQLException - in case of an error occurs.



setLoginTimeout
public void setLoginTimeout(int seconds) throws SQLException(Code)
Sets the timeout. Actually does nothing.
Parameters:
  seconds - timeout in seconds.
throws:
  SQLException - in case of an error occurs.



setPassword
public void setPassword(String pwd)(Code)
Sets password to be used to connect the Sequoia controller(s). The method can be used by the "application server" to set the password (potentially according a deployment descriptor). The password is stored in the DataSource.PASSWORD_PROPERTY property. Note that there is not a getPassword method.
Parameters:
  pwd - password to be used to connect Sequoia controller(s).



setURL
public void setURL(String url)(Code)
Sets URL of the Sequoia controller(s) to connect. The method is used by the "application server" to set the URL (potentially according a deployment descriptor). The URL is stored in the "url" property.
Parameters:
  url - URL to be used to connect Sequoia controller(s).



setUrl
public void setUrl(String url)(Code)
Sets url of the Sequoia controller(s) to connect. The method is used by the "application server" to set the URL (potentially according a deployment descriptor). The url is stored in the DataSource.URL_PROPERTY property.
Parameters:
  url - URL to be used to connect Sequoia controller(s)



setUser
public void setUser(String userName)(Code)
Sets user name to be used to connect the Sequoia controller(s). The method can be used by the "application server" to set the user name (potentially according a deployment descriptor). The user name is stored in the DataSource.USER_PROPERTY property.
Parameters:
  userName - user name to be used to connect Sequoia controller(s).



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.