public interface ConnectionFactory
You create a ConnectionFactory instance by using
SlContext.getService(Class).
| Modifier and Type | Method and Description |
|---|---|
void |
close(SlResource resource)
Releases the resource to avoid memory leak.
|
OlapConnection |
createOlapConnection(java.lang.String name,
java.lang.String dbms,
java.lang.String networkLayer)
Creates an OLAP connection.
|
RelationalConnection |
createRelationalConnection(java.lang.String name,
java.lang.String dbms,
java.lang.String networkLayer)
Creates a relational connection.
|
RelationalConnection createRelationalConnection(java.lang.String name, java.lang.String dbms, java.lang.String networkLayer)
Every created resource must be released with the method close(SlResource) to avoid memory leak.
name - The name of the relational connectiondbms - The underlying database of the connection
For example, set the value to MS SQL Server 2008 to create a connection to the MS SQL
Server 2008 database. See the "Connection Parameter Reference" section of the BI Semantic Layer Java SDK Developer Guide for a detailed list of supported parameters.
networkLayer - The underlying network layer of the connection
For example, set the value to JDBC Drivers to create a JDBC connection.
RelationalConnection objectOlapConnection createOlapConnection(java.lang.String name, java.lang.String dbms, java.lang.String networkLayer)
Every created resource must be released with the method close(SlResource) to avoid memory leak.
name - The name of the OLAP connectiondbms - The underlying database of the connection
For example, set the value to SAP BW 7.x to create a connection to the SAP
Netweaver BI. See the "Connection Parameter Reference" section of the BI Semantic Layer Java SDK Developer Guide for a detailed list of supported parameters.
networkLayer - The underlying network layer of the connection
For example, set the value to SAP BICS Client to create the connection to SAP Netweaver
BI 7.x.
OlapConnection objectvoid close(SlResource resource)
If a method is still using this resource after it has been closed, an SlException is raised.
The following methods also release this resource:
resource - The resource to release