public class PooledDBConnection extends ngmObject
name | required | default | description |
Database.JDBCDriver | * | NA | driver name |
Database.ConnectionURL | * | NA | connectionurl |
Database.User | * | NA | login user |
Database.Password | * | NA | login password |
Database.Password.CipherProcessor | * | NA | CipherProcessor class name for password |
Database.AutoCommit | true | true/false | |
Database.TransactionIsolation | NA | one of TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ or TRANSACTION_SERIALIZABLE. When this property is given, the pool will initialize new connections with the specified transaction isolation. | |
WatchDog.Interval | 300000 | time in miliseconds. When you set this 0, WatchDog won't run. | |
WatchDog.Connection.Timeout | 300000 | time in miliseconds | |
WatchDog.Name | Patrasche | name of your watch dog | |
WatchDog.ThreadDumpModeOnEliminating | NA | "related" or "full". Output mode of the thread dump on eliminating a connection. Case "related": only the pool element related threads are targeted, case "full": full thread dump, default: turned off. | |
PooledDBConnection.PoolName | same as the properties file name | name of the pool | |
PooledDBConnection.Log | standard output | log file path | |
PooledDBConnection.DebugMode | false | true/false. when true, detail action logs will be written to log. | |
PooledDBConnection.LoginTimeout | 0 | timeout seconds on creating a new connection to the database | |
PooledDBConnection.MaxConnections | 32 | max number of connections | |
PooledDBConnection.Retry.Interval | 1000 | time in miliseconds | |
PooledDBConnection.Retry.Count | 0 | retry count | |
PooledDBConnection.Life.NumberOfTimes | 0 | When set a value more than 0, the connection in an element will be discarded and reconnect on releasing after the specified number of times. | |
PooledDBConnection.Life.NumberOfFluctuation | 0 | Additional fluctuation value to the value of "PooledDBConnection.Life.NumberOfTimes". | |
PooledDBConnection.ForceRollbackOnRelease | true | true/false | |
PooledDBConnection.HealthCheck.onAssign.class | NA | health checker class name | |
PooledDBConnection.HealthCheck.onRelease.class | NA | health checker class name | |
PooledDBConnection.HealthCheck.onIdle.class | NA | health checker class name | |
PooledDBConnection.HealthCheck.AlertMail.To | NA | when the health status changes, the pool will send an email to this email address. You can set the property "Mail.SMTPHostname" in your db connection properties file, otherwise "127.0.0.1" will be applied as an smtp server address. | |
PooledDBConnection.Connection.UseWrapper | false | true/false when true, #getConnection(String) will return the wrapped connection with DBConnectionWrapper . | |
PooledDBConnection.Statistics.JMX.Enabled | false | true/false when true, JMX MBean for PooledDBConnection will be generated to monitor. | |
PooledDBConnection.Statistics.Recorder.Filename | NA | When specified, the statitics data will be recorded on the specified file. | |
PooledDBConnection.Statistics.Recorder.Interval | 60 (sec) | interval seconds on statitics recording. | |
PooledDBConnection.Statistics.Recorder.ItemGroup | CURRENT,CUMULATIVE | csv list of item name groups to output, CURRENT,CUMULATIVE or/and DIFFERENTIAL | |
PooledDBConnection.Statistics.Recorder.AutoStart | true | true/false when true, recorder thread will start after initializing. |
修飾子とタイプ | クラスと説明 |
---|---|
class |
PooledDBConnection.PDBCStat
PooledDBConnectionに関するJMXインタフェース実装。
|
static interface |
PooledDBConnection.PDBCStatMBean
PooledDBConnectionに関するJMXインタフェース。
|
修飾子とタイプ | フィールドと説明 |
---|---|
protected static java.util.Hashtable<java.sql.Connection,java.lang.String> |
dbcon_map |
protected static java.util.Hashtable<java.lang.String,PooledDBConnection> |
pools |
com.ngMAT.Common.PooledDBConnection.WatchDog |
watchdog |
C_BACKSLASH, C_BLOCK_CLOSE, C_BLOCK_OPEN, C_COMMA, C_CR, C_DOUBLE_BYTE_SPACE, C_DOUBLE_QUATATION, C_DOUBLE_QUOTATION, C_EQUAL, C_HYPHEN, C_LF, C_SINGLE_QUATATION, C_SINGLE_QUOTATION, C_SPACE, C_TAB, S_BACKSLASH, S_BLOCK_CLOSE, S_BLOCK_OPEN, S_COMMA, S_CR, S_CRLF, S_DOUBLE_QUATATION, S_DOUBLE_QUOTATION, S_EQUAL, S_HYPHEN, S_LF, S_SINGLE_QUATATION, S_SINGLE_QUOTATION, S_SPACE, S_TAB
修飾子とタイプ | メソッドと説明 |
---|---|
void |
_releaseConnection(java.sql.Connection con) |
HTMLComponent |
_toHTMLComponent() |
static java.lang.String |
_toString()
現在のプールの状態の文字列表現値を返す。
|
static java.lang.String |
_toString(java.lang.String propfilename)
現在のプールの状態の文字列表現値を返す。
|
static java.sql.Connection |
expandPool(java.lang.String propfilename)
強制的にプールを拡張する。
|
void |
forceRelease(int i) |
static void |
forceRelease(java.lang.String propfilename,
int i) |
static java.sql.Connection |
getConnection(java.lang.String propfilename)
指定されたプロパティファイルから設定に基づき使用可能なコネクションをプールから取り出すか、
新たにDBに接続し、Connectionを返す。
|
boolean |
getDebugMode() |
static int |
getPoolSize(java.lang.String propfilename)
現在のプールのサイズを返す。
|
static java.sql.Connection |
newConnection(java.lang.String propfilename)
指定されたプロパティファイルから設定に基づき新たにDBに接続し、Connectionを返す。
|
static void |
prepare(java.lang.String propfilename)
最大接続数分の接続を準備する。
|
static void |
prepare(java.lang.String propfilename,
int count)
指定個数分の接続を用意する。
|
static void |
releaseConnection(java.sql.Connection con)
使用済みコネクションをプールに返却する。
|
void |
removeConnection(java.sql.Connection con)
指定された要素をプールから取り除く。
|
void |
removeConnection(int index)
指定された要素をプールから取り除く。
|
static void |
removeConnection(java.lang.String propfilename,
java.sql.Connection con)
指定された要素をプールから取り除く。
|
static void |
removeConnection(java.lang.String propfilename,
int index)
指定された要素をプールから取り除く。
|
static HTMLComponent |
toHTMLComponent()
現在のプールの状態を表現するHTMLコンポーネントを返す。
|
static HTMLComponent |
toHTMLComponent(java.lang.String propfilename)
現在のプールの状態を表現するHTMLコンポーネントを返す。
|
clone, debug, debug, equals_n, equals_n2, getBooleanProperty, getBooleanProperty, getGroupedProperties, getIntProperty, getIntProperty, getLog, getLongProperty, getLongProperty, getProperties, getPropertiesForMe, getProperty, getProperty, getShortProperty, getShortProperty, setLog, setNgmObject, setProperties, sysoutprintln
protected static java.util.Hashtable<java.lang.String,PooledDBConnection> pools
protected static java.util.Hashtable<java.sql.Connection,java.lang.String> dbcon_map
public com.ngMAT.Common.PooledDBConnection.WatchDog watchdog
public boolean getDebugMode()
public static void prepare(java.lang.String propfilename) throws java.lang.Exception
propfilename
- java.lang.Exception
public static void prepare(java.lang.String propfilename, int count) throws java.lang.Exception
propfilename
- count
- java.lang.Exception
public static java.sql.Connection getConnection(java.lang.String propfilename) throws java.lang.Exception
java.lang.Exception
public static java.sql.Connection newConnection(java.lang.String propfilename) throws java.lang.Exception
java.lang.Exception
public static java.sql.Connection expandPool(java.lang.String propfilename)
public static void releaseConnection(java.sql.Connection con)
public void _releaseConnection(java.sql.Connection con)
public static void removeConnection(java.lang.String propfilename, int index)
public static void removeConnection(java.lang.String propfilename, java.sql.Connection con)
public void removeConnection(int index)
public void removeConnection(java.sql.Connection con)
public static java.lang.String _toString()
public static java.lang.String _toString(java.lang.String propfilename)
public static void forceRelease(java.lang.String propfilename, int i)
public void forceRelease(int i)
public static HTMLComponent toHTMLComponent()
public static HTMLComponent toHTMLComponent(java.lang.String propfilename)
public HTMLComponent _toHTMLComponent()
public static int getPoolSize(java.lang.String propfilename)