SQLJ connection-declaration-clause
The connection declaration clause declares a connection to a data source in an SQLJ application program.
Syntax
Description
- Java-modifiers
- Specifies modifiers that are valid for Java class declarations, such as static, public, private, or protected.
- Java-class-name
- Specifies a valid Java identifier. During the program preparation process, SQLJ generates a connection context class whose name is this identifier.
- implements-clause
- See "SQLJ implements-clause" for a description of this clause. In a connection declaration clause, the interface class to which the implements clause refers must be a user-defined interface class.
- with-clause
- See "SQLJ with-clause" for a description of this clause.
Usage notes
- SQLJ generates a connection class declaration for each connection declaration clause you specify. SQLJ data source connections are objects of those generated connection classes.
- You can specify a connection declaration clause anywhere that a Java class definition can appear in a Java program.