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


java.lang.Object
   org.apache.derby.impl.drda.Database

All known Subclasses:   org.apache.derby.impl.drda.XADatabase,
Database
class Database (Code)
Database stores information about the current database It is used so that a session may have more than one database


Field Summary
protected  booleanRDBUPDRM_sent
    
protected  intaccessCount
    
 StringattrString
    
protected  intbyteOrder
    
protected  intccsidDBC
    
protected  StringccsidDBCEncoding
    
protected  intccsidMBC
    
protected  StringccsidMBCEncoding
    
protected  intccsidSBC
    
protected  StringccsidSBCEncoding
    
protected  byte[]crrtkn
    
protected  StringdbName
    
protected  StringdecryptedPassword
    
protected  StringdecryptedUserId
    
 DRDAStatementdefaultStatement
    
 booleanforXA
    
protected  Stringpassword
    
protected  byte[]passwordSubstitute
    
protected  booleanrdbAllowUpdates
    
protected  byte[]secTokenIn
    
protected  byte[]secTokenOut
    
protected  intsecurityMechanism
    
protected  booleansendTRGDFTRT
    
protected  StringshortDbName
    
protected  StringtypDefNam
    
protected  StringuserId
    

Constructor Summary
 Database(String dbName)
    

Method Summary
 StringappendAttrString(Properties p)
    
protected  StringbuildRuntimeInfo(String indent, LocalizedResource localLangUtil)
    
protected  voidclose()
    
protected  voidcommit()
    
final  EngineConnectiongetConnection()
    
protected  DRDAStatementgetCurrentStatement()
    
protected  DRDAStatementgetDRDAStatement(Pkgnamcsn pkgnamcsn)
    
protected  DRDAStatementgetDefaultStatement()
    
protected  DRDAStatementgetDefaultStatement(Pkgnamcsn pkgnamcsn)
    
final  intgetPrepareIsolation()
    
 voidmakeConnection(Properties p)
    
 voidmakeDummyConnection()
     This makes a dummy connection to the database in order to boot and/or create this last one.
protected  DRDAStatementnewDRDAStatement(Pkgnamcsn pkgnamcsn)
     Get a new DRDA statement and store it in the stmtTable if stortStmt is true.
protected  voidremoveStatement(DRDAStatement stmt)
    
public  voidreset()
     This method resets the state of this Database object so that it can be re-used. Note: currently this method resets the variables related to security mechanisms that have been investigated as needing a reset.
protected  voidrollback()
    
final  voidsetConnection(EngineConnection conn)
    
protected  voidsetCurrentStatement(DRDAStatement stmt)
    
final  voidsetDrdaID(String drdaID)
    
final  voidsetPrepareIsolation(int level)
     Set the internal isolation level to use for preparing statements.
protected  voidstoreStatement(DRDAStatement stmt)
    

Field Detail
RDBUPDRM_sent
protected boolean RDBUPDRM_sent(Code)



accessCount
protected int accessCount(Code)



attrString
String attrString(Code)



byteOrder
protected int byteOrder(Code)



ccsidDBC
protected int ccsidDBC(Code)



ccsidDBCEncoding
protected String ccsidDBCEncoding(Code)



ccsidMBC
protected int ccsidMBC(Code)



ccsidMBCEncoding
protected String ccsidMBCEncoding(Code)



ccsidSBC
protected int ccsidSBC(Code)



ccsidSBCEncoding
protected String ccsidSBCEncoding(Code)



crrtkn
protected byte[] crrtkn(Code)



dbName
protected String dbName(Code)



decryptedPassword
protected String decryptedPassword(Code)



decryptedUserId
protected String decryptedUserId(Code)



defaultStatement
DRDAStatement defaultStatement(Code)



forXA
boolean forXA(Code)



password
protected String password(Code)



passwordSubstitute
protected byte[] passwordSubstitute(Code)



rdbAllowUpdates
protected boolean rdbAllowUpdates(Code)



secTokenIn
protected byte[] secTokenIn(Code)



secTokenOut
protected byte[] secTokenOut(Code)



securityMechanism
protected int securityMechanism(Code)



sendTRGDFTRT
protected boolean sendTRGDFTRT(Code)



shortDbName
protected String shortDbName(Code)



typDefNam
protected String typDefNam(Code)



userId
protected String userId(Code)




Constructor Detail
Database
Database(String dbName)(Code)
Database constructor
Parameters:
  dbName - database name




Method Detail
appendAttrString
String appendAttrString(Properties p)(Code)



buildRuntimeInfo
protected String buildRuntimeInfo(String indent, LocalizedResource localLangUtil)(Code)



close
protected void close() throws SQLException(Code)
Close the connection and clean up the statement table
throws:
  SQLException - on conn.close() error to be handled in DRDAConnThread.



commit
protected void commit() throws SQLException(Code)



getConnection
final EngineConnection getConnection()(Code)
Get the connection connection



getCurrentStatement
protected DRDAStatement getCurrentStatement()(Code)
Get current DRDA statement DRDAStatement
exception:
  SQLException -



getDRDAStatement
protected DRDAStatement getDRDAStatement(Pkgnamcsn pkgnamcsn)(Code)
Get DRDA statement based on pkgnamcsn
Parameters:
  pkgnamcsn - - key to access statement DRDAStatement



getDefaultStatement
protected DRDAStatement getDefaultStatement()(Code)
Get default statement for use in EXCIMM DRDAStatement



getDefaultStatement
protected DRDAStatement getDefaultStatement(Pkgnamcsn pkgnamcsn)(Code)
Get default statement for use in EXCIMM with specified pkgnamcsn The pkgnamcsn has the encoded isolation level
Parameters:
  pkgnamcsn - package/ section # for statement DRDAStatement



getPrepareIsolation
final int getPrepareIsolation() throws SQLException(Code)



makeConnection
void makeConnection(Properties p) throws SQLException(Code)
Make a new connection using the database name and set the connection in the database
Parameters:
  p - Properties for connection attributes to pass to connect



makeDummyConnection
void makeDummyConnection()(Code)
This makes a dummy connection to the database in order to boot and/or create this last one. If database cannot be found or authentication does not succeed, this will throw a SQLException which we catch and do nothing. We don't pass a userid and password here as we don't need to for the purpose of this method - main goal is to cause the database to be booted via a dummy connection.



newDRDAStatement
protected DRDAStatement newDRDAStatement(Pkgnamcsn pkgnamcsn) throws SQLException(Code)
Get a new DRDA statement and store it in the stmtTable if stortStmt is true. If possible recycle an existing statement. When the server gets a new statement with a previously used pkgnamcsn, it means that client-side statement associated with this pkgnamcsn has been closed. In this case, server can re-use the DRDAStatement by doing the following: 1) Retrieve the old DRDAStatement associated with this pkgnamcsn and close it. 2) Reset the DRDAStatement state for re-use.
Parameters:
  pkgnamcsn - Package name and section DRDAStatement



removeStatement
protected void removeStatement(DRDAStatement stmt) throws SQLException(Code)



reset
public void reset()(Code)
This method resets the state of this Database object so that it can be re-used. Note: currently this method resets the variables related to security mechanisms that have been investigated as needing a reset. TODO: Investigate what all variables in this class need to be reset when this database object is re-used on a connection pooling or transaction pooling. see DRDAConnThread.parseACCSEC (CodePoint.RDBNAM) where database object is re-used on a connection reset.



rollback
protected void rollback() throws SQLException(Code)



setConnection
final void setConnection(EngineConnection conn) throws SQLException(Code)
Set connection and create the SQL statement for the default statement
Parameters:
  conn - Connection
exception:
  SQLException -



setCurrentStatement
protected void setCurrentStatement(DRDAStatement stmt)(Code)
Make statement the current statement
Parameters:
  stmt -



setDrdaID
final void setDrdaID(String drdaID)(Code)



setPrepareIsolation
final void setPrepareIsolation(int level) throws SQLException(Code)
Set the internal isolation level to use for preparing statements. Subsequent prepares will use this isoalation level
Parameters:
  level - internal isolation level
throws:
  SQLException -
See Also:   EngineConnection.setPrepareIsolation



storeStatement
protected void storeStatement(DRDAStatement stmt) throws SQLException(Code)
Store DRDA prepared statement
Parameters:
  stmt - DRDA prepared statement



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.