@Deprecated
public class EmbeddedDriver
extends io.snappydata.jdbc.EmbeddedDriver
The driver automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
Loading this JDBC driver boots the database engine within the same Java virtual machine.
The correct code to load the GemFireXD engine using this driver is (with approriate try/catch blocks):
Class.forName("com.pivotal.gemfirexd.jdbc.EmbeddedDriver").newInstance();
// or
new com.pivotal.gemfirexd.jdbc.EmbeddedDriver();
When loaded in this way, the class boots the actual JDBC driver indirectly.
The JDBC specification recommends the Class.ForName method without the .newInstance()
method call, but adding the newInstance() guarantees
that GemFireXD will be booted on any Java Virtual Machine.
Note that you do not need to manually load the driver this way if you are running on Jave SE 6 or later. In that environment, the driver will be automatically loaded for you when your application requests a connection to a GemFireXD database.
Any initial error messages are placed in the PrintStream supplied by the DriverManager. If the PrintStream is null error messages are sent to System.err. Once the GemFireXD engine has set up an error logging facility (by default to gemfirexd.log) all subsequent messages are sent to it.
By convention, the class used in the Class.forName() method to boot a JDBC driver implements java.sql.Driver. This class is not the actual JDBC driver that gets registered with the Driver Manager. It proxies requests to the registered GemFireXD JDBC driver.
This is class is only for backward compatibility. Use
EmbeddedDriver instead.
DriverManager,
DriverManager.getLogStream(),
Driver,
SQLException| Constructor and Description |
|---|
EmbeddedDriver()
Deprecated.
|
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.