BBjCollapsableJDBCConnection

Description

In BBj 9.0 and higher, a BBjCollapsableJDBCConnection is a SQL connection (an implementation of the interface java.sql.Connection) that does not consume an additional license. The BBjCollapsableJDBCConnection shares (collapses) the license consumed by the BBjInterpreterServer.

Creation

BBjAPI > BBjCollapsableJDBCConnection

A BBjCollapsableJDBCConnection object is created through the following BBjAPI object method:

Return Value

Method

java.sql.Connection

getJDBCConnection()

Methods of BBjCollapsableJDBCConnection

See Sun's online documentation.

Remarks

The BBj program can invoke methods of this connection in the same way it would invoke methods on any other connection.  But this connection can not be passed to other embedded Java code and used by that code. Any method invocation made by the embedded Java will generate a SecurityException. This allows the developer to have access to the complete capabilities of the JDBC API connection interface without consuming an additional license for each connection.

Constants

None.

Example

connectString$ = jdbc:basis:localhost?database=ChileCompany&user=guest&password="
connectMode$ = ""
connection! = BBjAPI().getJDBCConnection(connectString$, connectMode$)
print connection!.isReadOnly())

See Also

BBjAPI

BBj Object Variables

BBj Object Assignment

BBj Object Error Handling

BBj Object Operators

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.