|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.queue.jdbc.JdbcConnectionPool
public class JdbcConnectionPool
A Pool of connections to the database to be used for a persistent queue. To keep genericity, queries and update strings are read from properties.
Constructor Summary | |
---|---|
JdbcConnectionPool()
The default constructor currently does nothing. |
Method Summary | |
---|---|
java.sql.Connection |
createNewConnection(boolean doLog)
Independend of pool. |
void |
discardConnection(java.sql.Connection conn)
Discards the passed connection from the pool and instead adds a new fresh connection to the pool. |
void |
disconnect()
Closes all connections to the Database. |
void |
dumpMetaData()
|
void |
finalize()
|
java.lang.String |
getColNamePrefix()
|
java.sql.Connection |
getConnection()
Returns a free connection. |
Global |
getGlobal()
Returns the global object associated with this pool. |
static java.lang.String |
getIsolationLevel(java.sql.Connection conn)
|
java.util.Hashtable<java.lang.String,java.lang.String> |
getMapping()
The mapping is taken out of the xmlBlaster.properties file. |
java.util.Properties |
getPluginProperties()
returns the plugin properties, i.e. |
int |
getProp(java.lang.String key,
int def)
|
java.lang.String |
getProp(java.lang.String key,
java.lang.String def)
|
int |
getQueryTimeout()
|
int |
getStatus()
returns true if the connection is temporarly lost (and the pool is polling for new connections) |
int |
getTableAllocationIncrement()
|
java.lang.String |
getTableNamePrefix()
|
java.lang.String |
getUrl()
|
java.lang.String |
getUserName()
|
void |
initialize(Global glob,
java.util.Properties pluginProperties)
Is called after the instance is created. |
boolean |
isBatchModeEnabled()
The batch mode means that insertions in the database are made in batch mode, i.e. |
boolean |
isCascadeDeleteSuppported()
|
boolean |
isDbAdmin()
|
boolean |
isInitialized()
returns true if the pool already is initialized, false otherwise. |
boolean |
isNestedBracketsSuppported()
|
static java.lang.String |
isolationToString(int isolation)
|
static void |
main(java.lang.String[] args)
|
void |
registerManager(java.lang.Object manager)
|
boolean |
registerStorageProblemListener(I_StorageProblemListener storageProblemListener)
Sets the connection listener. |
void |
releaseConnection(java.sql.Connection conn,
boolean success)
Used to give back a connection to the pool. |
void |
setDatabaseLost()
informs this pool that the connection to the DB has been lost |
void |
shutdown()
|
void |
timeout(java.lang.Object userData)
Invoked by the timer when a check for reconnection is wanted again |
void |
unregisterManager(java.lang.Object manager)
|
boolean |
unRegisterStorageProblemListener(I_StorageProblemListener storageProblemListener)
Unregisters the storageProblemListener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcConnectionPool()
Method Detail |
---|
public java.util.Properties getPluginProperties()
public void timeout(java.lang.Object userData)
timeout
in interface I_Timeout
userData
- You get bounced back your userData which you passed
with Timeout.addTimeoutListener()I_Timeout.timeout(Object)
public boolean registerStorageProblemListener(I_StorageProblemListener storageProblemListener)
registerStorageProblemListener
in interface I_StorageProblemNotifier
public boolean unRegisterStorageProblemListener(I_StorageProblemListener storageProblemListener)
unRegisterStorageProblemListener
in interface I_StorageProblemNotifier
public Global getGlobal()
public boolean isInitialized()
public void discardConnection(java.sql.Connection conn) throws XmlBlasterException
conn
-
XmlBlasterException
public static java.lang.String isolationToString(int isolation)
public static java.lang.String getIsolationLevel(java.sql.Connection conn)
public java.sql.Connection createNewConnection(boolean doLog) throws java.sql.SQLException
doLog
-
java.sql.SQLException
public java.lang.String getProp(java.lang.String key, java.lang.String def)
public int getProp(java.lang.String key, int def)
public void initialize(Global glob, java.util.Properties pluginProperties) throws java.lang.ClassNotFoundException, java.sql.SQLException, XmlBlasterException
java.lang.ClassNotFoundException
java.sql.SQLException
XmlBlasterException
public java.lang.String getTableNamePrefix()
public java.lang.String getUserName()
public java.lang.String getColNamePrefix()
public int getTableAllocationIncrement()
public java.util.Hashtable<java.lang.String,java.lang.String> getMapping()
public void disconnect()
public void finalize()
finalize
in class java.lang.Object
public final int getStatus()
public final void setDatabaseLost()
public java.sql.Connection getConnection() throws XmlBlasterException
XmlBlasterException
public void releaseConnection(java.sql.Connection conn, boolean success) throws XmlBlasterException
XmlBlasterException
public void dumpMetaData()
public boolean isDbAdmin()
public int getQueryTimeout()
public static void main(java.lang.String[] args)
public void shutdown()
public void registerManager(java.lang.Object manager)
public void unregisterManager(java.lang.Object manager)
public boolean isBatchModeEnabled()
public boolean isCascadeDeleteSuppported()
public boolean isNestedBracketsSuppported()
public java.lang.String getUrl()
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |