com.metamatrix.jdbc
Class EmbeddedConnection

java.lang.Object
  extended by com.metamatrix.jdbc.WrapperImpl
      extended by com.metamatrix.jdbc.MMConnection
          extended by com.metamatrix.jdbc.EmbeddedConnection
All Implemented Interfaces:
java.sql.Connection, java.sql.Wrapper

public class EmbeddedConnection
extends MMConnection

This class simple wrapper on top of MMConnection for the EmbeddedDriver and EmbeddedDataSource. The specific reason for this class is to have a management API on the a JDBC Connection.

Since:
4.3

Field Summary
 
Fields inherited from class com.metamatrix.jdbc.MMConnection
propInfo, serverConn
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
EmbeddedConnection(EmbeddedConnectionFactoryImpl manager, ServerConnection serverConn, java.util.Properties info, ConnectionListener listener)
          ctor
 
Method Summary
 void close()
          This method will release the MMDriverConnection's connection to the server and all resources immediately instead of waiting for them to be automatically released.
 Admin getAdminAPI()
          Get the Admin API interface, so that the caller can manager various aspects of configuring the DQP, like adding, deleteing a VDB.
 BaseDriver getBaseDriver()
           
 java.lang.String getDatabaseName()
          Get the database name that this connection is representing
 boolean isSameProcess(MMConnection conn)
           
 
Methods inherited from class com.metamatrix.jdbc.MMConnection
clearWarnings, commit, commitTransaction, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endTransaction, forgetTransaction, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getConnectionId, getHoldability, getMetaData, getTransactionIsolation, getTransactionXid, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareTransaction, recoverTransaction, recycleConnection, releaseSavepoint, rollback, rollback, rollbackTransaction, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap, startTransaction
 
Methods inherited from class com.metamatrix.jdbc.WrapperImpl
isWrapperFor, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Constructor Detail

EmbeddedConnection

public EmbeddedConnection(EmbeddedConnectionFactoryImpl manager,
                          ServerConnection serverConn,
                          java.util.Properties info,
                          ConnectionListener listener)
ctor

Method Detail

getAdminAPI

public Admin getAdminAPI()
                  throws java.sql.SQLException
Get the Admin API interface, so that the caller can manager various aspects of configuring the DQP, like adding, deleteing a VDB. Look at Java Docs for Admin all supported functionality.

Returns:
retuns reference to API, never null.
Throws:
SQLException
java.sql.SQLException
Since:
4.3

getDatabaseName

public java.lang.String getDatabaseName()
Description copied from class: MMConnection
Get the database name that this connection is representing

Specified by:
getDatabaseName in class MMConnection
Returns:
String name of the database
See Also:
MMConnection.getDatabaseName()

getBaseDriver

public BaseDriver getBaseDriver()
Specified by:
getBaseDriver in class MMConnection

isSameProcess

public boolean isSameProcess(MMConnection conn)
Specified by:
isSameProcess in class MMConnection

close

public void close()
           throws java.sql.SQLException
Description copied from class: MMConnection

This method will release the MMDriverConnection's connection to the server and all resources immediately instead of waiting for them to be automatically released. Fatal errors will close a connection as will a garbage collection on this object.

Specified by:
close in interface java.sql.Connection
Overrides:
close in class MMConnection
Throws:
java.sql.SQLException - if a MetaMatrix server access error occurs.


Copyright © 2009. All Rights Reserved.