org.jboss.messaging.core.impl
Class JDBCSupport

java.lang.Object
  extended by org.jboss.messaging.core.impl.JDBCSupport
All Implemented Interfaces:
MessagingComponent
Direct Known Subclasses:
JDBCJMSUserManager, JDBCPersistenceManager, MessagingPostOffice

public class JDBCSupport
extends java.lang.Object
implements MessagingComponent

Common functionality for messaging components that need to access a database.

Version:
$Revision: 2726 $ $Id: JDBCSupport.java 2726 2007-05-24 19:25:06Z timfox $
Author:
Tim Fox

Nested Class Summary
protected  class JDBCSupport.JDBCTxRunner<T>
           
protected  class JDBCSupport.JDBCTxRunner2<T>
           
protected  class JDBCSupport.TransactionWrapper
           
 
Field Summary
protected  javax.sql.DataSource ds
           
protected  java.util.Properties sqlProperties
           
 
Constructor Summary
JDBCSupport()
           
JDBCSupport(javax.sql.DataSource ds, TransactionManager tm, java.util.Properties sqlProperties, boolean createTablesOnStartup)
           
 
Method Summary
protected  void closeConnection(java.sql.Connection conn)
           
protected  void closeResultSet(java.sql.ResultSet rs)
           
protected  void closeStatement(java.sql.Statement st)
           
protected  java.util.Map getDefaultDDLStatements()
           
protected  java.util.Map getDefaultDMLStatements()
           
protected  java.lang.String getSQLStatement(java.lang.String statementName)
           
protected  boolean ignoreVerificationOnStartup(java.lang.String statementName)
          Subclasses might choose to not cross check the maps on certain statements.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ds

protected javax.sql.DataSource ds

sqlProperties

protected java.util.Properties sqlProperties
Constructor Detail

JDBCSupport

public JDBCSupport()

JDBCSupport

public JDBCSupport(javax.sql.DataSource ds,
                   TransactionManager tm,
                   java.util.Properties sqlProperties,
                   boolean createTablesOnStartup)
Method Detail

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface MessagingComponent
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface MessagingComponent
Throws:
java.lang.Exception

getSQLStatement

protected java.lang.String getSQLStatement(java.lang.String statementName)

getDefaultDMLStatements

protected java.util.Map getDefaultDMLStatements()

getDefaultDDLStatements

protected java.util.Map getDefaultDDLStatements()

ignoreVerificationOnStartup

protected boolean ignoreVerificationOnStartup(java.lang.String statementName)
Subclasses might choose to not cross check the maps on certain statements. An example would be POPULATE.TABLES on JDBCJMSUserManagerService


closeResultSet

protected void closeResultSet(java.sql.ResultSet rs)

closeStatement

protected void closeStatement(java.sql.Statement st)

closeConnection

protected void closeConnection(java.sql.Connection conn)


Copyright © 2006 JBoss Inc. All Rights Reserved.