SQL/MX Programming Manual for Java
SQLJ Programming
HP NonStop SQL/MX Programming Manual for Java—523726-003
3-10
Explicit Connection Contexts
There are several ways of instantiating the connection context object. See Connection
Context Constructors and Methods on page 3-10.
Connection Context Constructors and Methods
The connection context class includes several constructors for instantiating the
connection context object:
Constructor Description
public CtxClassName(java.sql.Connection conn)
throws java.sql.SQLException
Constructs a connection
context object based on an
existing JDBC
Connection object. The
connection context object
and JDBC Connection
object share the underlying
database session. See
Using an Existing JDBC
Connection Object on
page 3-12.
public CtxClassName(ConnectionContext other)
throws java.sql.SQLException
Constructs a connection
context object based on an
existing connection context
object. The new
connection context object
and the preexisting
connection context object
share the underlying
database session. See
Using an Existing
Connection Context Object
on page 3-13.
public CtxClassName(String url,
String user,
String password,
boolean autoCommit)
throws java.sql.SQLException
Constructs a connection
context object based on a
JDBC URL and sets these
properties for the
connection: a user name, a
password, and an
autocommit setting. See
Using JDBC URL
Constructors on page 3-14.