Java Doc for Pool.java in  » Database-JDBC-Connection-Pool » Primrose » uk » org » primrose » pool » core » 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 » Primrose » uk.org.primrose.pool.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   uk.org.primrose.pool.core.PoolConfigImpl
      uk.org.primrose.pool.core.PoolData
         uk.org.primrose.pool.core.Pool

Pool
public class Pool extends PoolData (Code)



Constructor Summary
public  Pool()
    

Method Summary
public  voidcutbackFromFailoverPool()
    
final public  ConnectiongetConnection()
     Get a pooled connection.
public  LoggergetLogger()
    
final public  Vector<ConnectionHolder>getPoolConnections()
    
protected  voidnotifyExceptionEvent()
     If a SQLException occurs and the parameter 'dumpConnectionOnSQLException' is true (default) then this method is called.
final public  voidrestart(boolean forceStop)
    
final protected  voidsetConnectionDefaults(ConnectionHolder ch, long id)
    
final public  voidstart()
    
final public  voidstop(boolean force)
     Close down all connection objects, and remove them from the connection list If force is true, then close the connection down immediately, else leave them to finish their job, and then close them.


Constructor Detail
Pool
public Pool()(Code)
CTOR - init some stuff




Method Detail
cutbackFromFailoverPool
public void cutbackFromFailoverPool()(Code)



getConnection
final public Connection getConnection() throws PoolException(Code)
Get a pooled connection. If the db is down, or all connections in the pool are busy, then wait until we can find a connection ... unless 1) queueConnectionRequests is false, or 2) waitForConnectionIfDatabaseIsDown is false whereupon we error, and the client will see a SQLException from the data source object linked to this pool



getLogger
public Logger getLogger()(Code)



getPoolConnections
final public Vector<ConnectionHolder> getPoolConnections()(Code)



notifyExceptionEvent
protected void notifyExceptionEvent()(Code)
If a SQLException occurs and the parameter 'dumpConnectionOnSQLException' is true (default) then this method is called. If the config requires emails to be sent on SQLExceptions, then send it. If we require notification of a possible DB crash, then see if we have, using the 'onExceptionCheckSQL' parameter SQL. If the config requires failover, then attempt that (if the db has crashed).



restart
final public void restart(boolean forceStop) throws PoolException(Code)
Restart the pool, calling stop(), then start()



setConnectionDefaults
final protected void setConnectionDefaults(ConnectionHolder ch, long id) throws PoolException(Code)
Apply default connection properties to the connection Called from fill() when a brand new connection is added to the pool, and from put() when a connection is returned to the pool If the check methods fail (SQLException), the underlying connection will be closed down, and removed from the pool list



start
final public void start() throws PoolException(Code)
Start the pool, filling it with the configured base of connections



stop
final public void stop(boolean force) throws PoolException(Code)
Close down all connection objects, and remove them from the connection list If force is true, then close the connection down immediately, else leave them to finish their job, and then close them. This means that pools can be stopped/started with no impact on live connections (ie safely).



Fields inherited from uk.org.primrose.pool.core.PoolData
final public static int CONNECTION_ACTIVE(Code)(Java Doc)
final public static int CONNECTION_DUMPED(Code)(Java Doc)
final public static int CONNECTION_INACTIVE(Code)(Java Doc)
final public static int ON_CLOSE_SHOULD_DIE(Code)(Java Doc)
final public static int ON_CLOSE_SHOULD_REUSE(Code)(Java Doc)
final public static int UNKNOWN_STATUS_CODE(Code)(Java Doc)
boolean bPoolHasBeenShutdown(Code)(Java Doc)
Vector<ConnectionHolder> connections(Code)(Java Doc)
FailoverCutBack failoverCutBackObj(Code)(Java Doc)
Pool failoverPoolObj(Code)(Java Doc)
protected long gid(Code)(Java Doc)
protected PoolLock lock(Code)(Java Doc)
protected Logger logger(Code)(Java Doc)
PoolMonitor monitor(Code)(Java Doc)
protected int numberOfWaitingThreads(Code)(Java Doc)
boolean poolAccessLocked(Code)(Java Doc)
protected int totalConnectionsHandedOut(Code)(Java Doc)

Methods inherited from uk.org.primrose.pool.core.PoolData
protected String getInternalConnectionTransactionIsolation()(Code)(Java Doc)
protected String getInternalConnectionTransactionIsolation(int level)(Code)(Java Doc)
public int getNumberOfWaitingThreads()(Code)(Java Doc)
public static String getStringStatus(int i)(Code)(Java Doc)
public int getTotalConnectionsHandedOut()(Code)(Java Doc)
public int numberOfActiveConnections()(Code)(Java Doc)
public int numberOfFreeConnections()(Code)(Java Doc)
protected void setInternalConnectionTransactionIsolation(String sConnectionTransactionIsolation)(Code)(Java Doc)
protected void setUpLogger()(Code)(Java Doc)

Fields inherited from uk.org.primrose.pool.core.PoolConfigImpl
protected String adminEmail(Code)(Java Doc)
protected boolean bConnectionAutoCommit(Code)(Java Doc)
protected boolean bDumpConnectionOnSQLException(Code)(Java Doc)
protected boolean bQueueConnectionRequests(Code)(Java Doc)
protected boolean bRunPooledMode(Code)(Java Doc)
protected boolean bWaitForConnectionIfDatabaseIsDown(Code)(Java Doc)
protected String checkSQL(Code)(Java Doc)
protected String driverClass(Code)(Java Doc)
protected String driverURL(Code)(Java Doc)
protected String emailEvents(Code)(Java Doc)
protected String encryptionFileKey(Code)(Java Doc)
protected String failoverPool(Code)(Java Doc)
protected int iBase(Code)(Java Doc)
protected int iConnectionTransactionIsolation(Code)(Java Doc)
protected int iCycleConnections(Code)(Java Doc)
protected int iIdleTime(Code)(Java Doc)
protected int iKillActiveConnectionsOverAge(Code)(Java Doc)
protected int iNumberOfConnectionsToInitializeWith(Code)(Java Doc)
protected List<LoadRule> loadRules(Code)(Java Doc)
protected String log(Code)(Java Doc)
protected String logLevel(Code)(Java Doc)
protected String onExceptionCheckSQL(Code)(Java Doc)
protected String password(Code)(Java Doc)
protected String poolName(Code)(Java Doc)
protected String smtpMailExchangeServer(Code)(Java Doc)
protected String user(Code)(Java Doc)

Methods inherited from uk.org.primrose.pool.core.PoolConfigImpl
public String getAdminEmail()(Code)(Java Doc)
public String getBase()(Code)(Java Doc)
public String getCheckSQL()(Code)(Java Doc)
public String getConnectionAutoCommit()(Code)(Java Doc)
public String getConnectionTransactionIsolation()(Code)(Java Doc)
public String getCycleConnections()(Code)(Java Doc)
public String getDriverClass()(Code)(Java Doc)
public String getDriverURL()(Code)(Java Doc)
public String getDumpConnectionOnSQLException()(Code)(Java Doc)
public String getEmailEvents()(Code)(Java Doc)
public String getEncryptionFileKey()(Code)(Java Doc)
public String getFailoverPool()(Code)(Java Doc)
public String getIdleTime()(Code)(Java Doc)
public String getKillActiveConnectionsOverAge()(Code)(Java Doc)
public String getLog()(Code)(Java Doc)
public String getLogLevel()(Code)(Java Doc)
public String getNumberOfConnectionsToInitializeWith()(Code)(Java Doc)
public String getOnExceptionCheckSQL()(Code)(Java Doc)
public String getPassword()(Code)(Java Doc)
public String getPoolName()(Code)(Java Doc)
public String getQueueConnectionRequests()(Code)(Java Doc)
public String getRunPooledMode()(Code)(Java Doc)
public String getSmtpMailExchangeServer()(Code)(Java Doc)
public String getUser()(Code)(Java Doc)
public String getWaitForConnectionIfDatabaseIsDown()(Code)(Java Doc)
public void setAdminEmail(String adminEmail)(Code)(Java Doc)
public void setBase(String base)(Code)(Java Doc)
public void setCheckSQL(String checkSQL)(Code)(Java Doc)
public void setConnectionAutoCommit(String connectionAutoCommit)(Code)(Java Doc)
public void setConnectionTransactionIsolation(String connectionTransactionIsolation)(Code)(Java Doc)
public void setCycleConnections(String cycleConnections)(Code)(Java Doc)
public void setDriverClass(String driverClass)(Code)(Java Doc)
public void setDriverURL(String driverURL)(Code)(Java Doc)
public void setDumpConnectionOnSQLException(String dumpConnectionOnSQLException)(Code)(Java Doc)
public void setEmailEvents(String emailEvents)(Code)(Java Doc)
public void setEncryptionFileKey(String encryptionFileKey)(Code)(Java Doc)
public void setFailoverPool(String failoverPool)(Code)(Java Doc)
public void setIdleTime(String idleTime)(Code)(Java Doc)
public void setKillActiveConnectionsOverAge(String killActiveConnectionsOverAge)(Code)(Java Doc)
public void setLog(String log)(Code)(Java Doc)
public void setLogLevel(String logLevel)(Code)(Java Doc)
public void setNumberOfConnectionsToInitializeWith(String numberOfConnectionsToInitializeWith)(Code)(Java Doc)
public void setOnExceptionCheckSQL(String onExceptionCheckSQL)(Code)(Java Doc)
public void setPassword(String password)(Code)(Java Doc)
public void setPoolName(String poolName)(Code)(Java Doc)
public void setQueueConnectionRequests(String queueConnectionRequests)(Code)(Java Doc)
public void setRunPooledMode(String runPooledMode)(Code)(Java Doc)
public void setSmtpMailExchangeServer(String smtpMailExchangeServer)(Code)(Java Doc)
public void setUser(String user)(Code)(Java Doc)
public void setWaitForConnectionIfDatabaseIsDown(String waitForConnectionIfDatabaseIsDown)(Code)(Java Doc)

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.