com.metamatrix.jdbc
Class EmbeddedDriver

java.lang.Object
  extended by com.metamatrix.jdbc.BaseDriver
      extended by com.metamatrix.jdbc.EmbeddedDriver
All Implemented Interfaces:
java.sql.Driver

public final class EmbeddedDriver
extends BaseDriver

The java.sql.DriverManager class uses this class to connect to MetaMatrix. The Driver Manager maintains a pool of MMDriver objects, which it could use to connect to MetaMatrix.


Field Summary
static java.lang.String DRIVER_NAME
           
 
Constructor Summary
EmbeddedDriver()
           
 
Method Summary
 boolean acceptsURL(java.lang.String url)
          Returns true if the driver thinks that it can open a connection to the given URL.
 java.sql.Connection connect(java.lang.String url, java.util.Properties info)
          This method tries to make a metamatrix connection to the given URL.
 java.lang.String getDriverName()
          Get's the name of the driver.
 int getMajorVersion()
          Get's the driver's major version number.
 int getMinorVersion()
          Get's the driver's minor version number.
static void shutdown()
          Shutdown the DQP instance which has been started using the given URL
 
Methods inherited from class com.metamatrix.jdbc.BaseDriver
getPropertyInfo, jdbcCompliant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DRIVER_NAME

public static final java.lang.String DRIVER_NAME
See Also:
Constant Field Values
Constructor Detail

EmbeddedDriver

public EmbeddedDriver()
Method Detail

connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties info)
                            throws java.sql.SQLException
This method tries to make a metamatrix connection to the given URL. This class will return a null if this is not the right driver to connect to the given URL.

Parameters:
The - URL used to establish a connection.
Returns:
Connection object created
Throws:
java.sql.SQLException - if it is unable to establish a connection to the MetaMatrix server.

acceptsURL

public boolean acceptsURL(java.lang.String url)
                   throws java.sql.SQLException
Returns true if the driver thinks that it can open a connection to the given URL. Typically drivers will return true if they understand the subprotocol specified in the URL and false if they don't. Expected URL format is jdbc:metamatrix:VDB@pathToPropertyFile;version=1;logFile=;logLevel=;txnAutoWrap=

Parameters:
The - URL used to establish a connection.
Returns:
A boolean value indicating whether the driver understands the subprotocol.
Throws:
SQLException, - should never occur
java.sql.SQLException

getMajorVersion

public int getMajorVersion()
Get's the driver's major version number. Initially this should be 1.

Returns:
major version number of the driver.

getMinorVersion

public int getMinorVersion()
Get's the driver's minor version number. Initially this should be 0.

Returns:
major version number of the driver.

getDriverName

public java.lang.String getDriverName()
Get's the name of the driver.

Specified by:
getDriverName in class BaseDriver
Returns:
name of the driver

shutdown

public static void shutdown()
Shutdown the DQP instance which has been started using the given URL

Parameters:
dqpURL -


Copyright © 2009. All Rights Reserved.