Java Doc for EmbedPooledConnection.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » jdbc » 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 DBMS » db derby 10.2 » org.apache.derby.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.jdbc.EmbedPooledConnection

All known Subclasses:   org.apache.derby.jdbc.EmbedPooledConnection40,  org.apache.derby.jdbc.EmbedXAConnection,
EmbedPooledConnection
class EmbedPooledConnection implements javax.sql.PooledConnection,BrokeredConnectionControl(Code)
A PooledConnection object is a connection object that provides hooks for connection pool management.

This is Derby's implementation of a PooledConnection for use in the following environments:

  • JDBC 3.0 - Java 2 - JDK 1.4, J2SE 5.0
  • JDBC 2.0 - Java 2 - JDK 1.2,1.3


Field Summary
 BrokeredConnectioncurrentConnectionHandle
    
final  ReferenceableDataSourcedataSource
    
 intdefaultIsolationLevel
    
protected  booleanisActive
    
 EmbedConnectionrealConnection
    

Constructor Summary
 EmbedPooledConnection(ReferenceableDataSource ds, String u, String p, boolean requestPassword)
    

Method Summary
final public synchronized  voidaddConnectionEventListener(ConnectionEventListener listener)
     Add an event listener.
final  voidcheckActive()
    
public  voidcheckAutoCommit(boolean autoCommit)
     Allow control over setting auto commit mode.
public  voidcheckCommit()
     Allow control over calling commit.
public  intcheckHoldCursors(int holdability, boolean downgrade)
     Are held cursors allowed.
public  voidcheckRollback()
     Allow control over calling rollback.
public  voidcheckSavepoint()
    
public synchronized  voidclose()
     Close the Pooled connection.
public  booleanclosingConnection()
     Close called on BrokeredConnection.
public synchronized  ConnectiongetConnection()
     Create an object handle for a database connection.
final  ConnectiongetNewCurrentConnectionHandle()
    
 StringgetPassword()
    
public synchronized  EngineConnectiongetRealConnection()
    
 StringgetUsername()
    
public  booleanisIsolationLevelSetUsingSQLorJDBC()
    
public synchronized  voidnotifyClose()
    
public synchronized  voidnotifyError(SQLException exception)
    
public  voidnotifyException(SQLException sqle)
     Notify the control class that a SQLException was thrown during a call on one of the brokered connection's methods.
public  voidonStatementClose(PreparedStatement statement)
    
public  voidonStatementErrorOccurred(PreparedStatement statement, SQLException sqle)
    
final  voidopenRealConnection()
    
final public synchronized  voidremoveConnectionEventListener(ConnectionEventListener listener)
     Remove an event listener.
public  voidresetIsolationLevelFlag()
     Reset the isolation level flag used to keep state in BrokeredConnection.
 voidresetRealConnection()
    
public  StringtoString()
     Get the string representation of this pooled connection. A pooled connection is assigned a separate id from a physical connection.
public  StatementwrapStatement(Statement s)
     No need to wrap statements for PooledConnections.
public  PreparedStatementwrapStatement(PreparedStatement ps, String sql, Object generatedKeys)
    
public  CallableStatementwrapStatement(CallableStatement cs, String sql)
    

Field Detail
currentConnectionHandle
BrokeredConnection currentConnectionHandle(Code)



dataSource
final ReferenceableDataSource dataSource(Code)



defaultIsolationLevel
int defaultIsolationLevel(Code)



isActive
protected boolean isActive(Code)



realConnection
EmbedConnection realConnection(Code)




Constructor Detail
EmbedPooledConnection
EmbedPooledConnection(ReferenceableDataSource ds, String u, String p, boolean requestPassword) throws SQLException(Code)




Method Detail
addConnectionEventListener
final public synchronized void addConnectionEventListener(ConnectionEventListener listener)(Code)
Add an event listener.



checkActive
final void checkActive() throws SQLException(Code)



checkAutoCommit
public void checkAutoCommit(boolean autoCommit) throws SQLException(Code)
Allow control over setting auto commit mode.



checkCommit
public void checkCommit() throws SQLException(Code)
Allow control over calling commit.



checkHoldCursors
public int checkHoldCursors(int holdability, boolean downgrade) throws SQLException(Code)
Are held cursors allowed.



checkRollback
public void checkRollback() throws SQLException(Code)
Allow control over calling rollback.



checkSavepoint
public void checkSavepoint() throws SQLException(Code)
Allow control over creating a Savepoint (JDBC 3.0)



close
public synchronized void close() throws SQLException(Code)
Close the Pooled connection.
exception:
  SQLException - - if a database-access error occurs.



closingConnection
public boolean closingConnection() throws SQLException(Code)
Close called on BrokeredConnection. If this call returns true then getRealConnection().close() will be called. Don't close the underlying real connection as it is pooled.



getConnection
public synchronized Connection getConnection() throws SQLException(Code)
Create an object handle for a database connection. a Connection object
exception:
  SQLException - - if a database-access error occurs.



getNewCurrentConnectionHandle
final Connection getNewCurrentConnectionHandle()(Code)



getPassword
String getPassword()(Code)



getRealConnection
public synchronized EngineConnection getRealConnection() throws SQLException(Code)



getUsername
String getUsername()(Code)



isIsolationLevelSetUsingSQLorJDBC
public boolean isIsolationLevelSetUsingSQLorJDBC() throws SQLException(Code)
Returns true if isolation level has been set using either JDBC api or SQL



notifyClose
public synchronized void notifyClose()(Code)



notifyError
public synchronized void notifyError(SQLException exception)(Code)



notifyException
public void notifyException(SQLException sqle)(Code)
Notify the control class that a SQLException was thrown during a call on one of the brokered connection's methods.



onStatementClose
public void onStatementClose(PreparedStatement statement)(Code)
Dummy implementation for the actual methods found in org.apache.derby.jdbc.EmbedPooledConnection40
Parameters:
  statement - PreparedStatement



onStatementErrorOccurred
public void onStatementErrorOccurred(PreparedStatement statement, SQLException sqle)(Code)
Dummy implementation for the actual methods found in org.apache.derby.jdbc.EmbedPooledConnection40
Parameters:
  statement - PreparedStatement
Parameters:
  sqle - SQLException



openRealConnection
final void openRealConnection() throws SQLException(Code)



removeConnectionEventListener
final public synchronized void removeConnectionEventListener(ConnectionEventListener listener)(Code)
Remove an event listener.



resetIsolationLevelFlag
public void resetIsolationLevelFlag() throws SQLException(Code)
Reset the isolation level flag used to keep state in BrokeredConnection. It will get set to true when isolation level is set using JDBC/SQL. It will get reset to false at the start and the end of a global transaction.



resetRealConnection
void resetRealConnection() throws SQLException(Code)



toString
public String toString()(Code)
Get the string representation of this pooled connection. A pooled connection is assigned a separate id from a physical connection. When a container calls PooledConnection.toString(), it gets the string representation of this id. This is useful for developers implementing connection pools when they are trying to debug pooled connections. a string representation of the uniquie id for this pooledconnection.



wrapStatement
public Statement wrapStatement(Statement s) throws SQLException(Code)
No need to wrap statements for PooledConnections.



wrapStatement
public PreparedStatement wrapStatement(PreparedStatement ps, String sql, Object generatedKeys) throws SQLException(Code)
Call the setBrokeredConnectionControl method inside the EmbedPreparedStatement class to set the BrokeredConnectionControl variable to this instance of EmbedPooledConnection This will then be used to call the onStatementErrorOccurred and onStatementClose events when the corresponding events occur on the PreparedStatement
Parameters:
  ps - PreparedStatment to be wrapped
Parameters:
  sql - String
Parameters:
  generatedKeys - Object returns the wrapped PreparedStatement
throws:
  java.sql.SQLException -



wrapStatement
public CallableStatement wrapStatement(CallableStatement cs, String sql) throws SQLException(Code)
Call the setBrokeredConnectionControl method inside the EmbedCallableStatement class to set the BrokeredConnectionControl variable to this instance of EmbedPooledConnection This will then be used to call the onStatementErrorOccurred and onStatementClose events when the corresponding events occur on the CallableStatement
Parameters:
  cs - CallableStatment to be wrapped
Parameters:
  sql - String returns the wrapped CallableStatement
throws:
  java.sql.SQLException -



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.