Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-01

oracle.AWXML
Class AWConnection

java.lang.Object
  |
  +--oracle.AWXML.AWConnection

public class AWConnection
extends java.lang.Object

A JDBC connection to an Oracle database and a context within the database for processing by the Analytic Workspace Java API. When instantiated, an AWConnection object invokes the GetConnection method in the oracle.jdbc.DriverManager class to load a JDBC driver and create a connection object.

Once the connection has been established, AWConnection creates an SPLExecutor object for this connection. SPLExecutor is a class within the OLAP API that passes OLAP DML commands to the OLAP processing engine within the Oracle Database. For the duration of the connection the SPLExecutor object transmits the commands that create, delete, and modify analytic workspaces.

AWConnection uses the new SPLExecutor object to execute the following OLAP DML command, which initializes the OLAP environment:

 aw attach sys.awxml last

This command attaches the sys.awxml analytic workspace to the OLAP session within this connection. The sys.awxml workspace contains the OLAP programs that implement the instructions generated by the Analytic Workspace Java API.

An AWConnection object is only used by client applications that connect through JDBC. It is not used to implement information stored in XML and executed by the INTERACTIONEXECUTE PL/SQL function.

For information about the SPLExecutor class, see the Oracle OLAP Developer's Guide to the OLAP API. For information about the OLAP DML, see the Oracle OLAP DML Reference. For information about Oracle JDBC, see the Oracle JDBC Developer's Guide and Reference.


Field Summary
static java.lang.String CommitMode
Indicates whether an action method updates the stored analytic workspace and commits those changes in the relational database tables.

Constructor Summary
AWConnection(java.lang.String user, java.lang.String pwd, java.lang.String inputConnectString)
Opens a database connection through JDBC and establishes the OLAP processing environment within the context of this connection.

Method Summary
java.sql.Connection getSQLConnection()
Gets the java.sql.Connection for this AWConnection.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

CommitMode

public static java.lang.String CommitMode
Indicates whether an action method updates the stored analytic workspace and commits those changes in the relational database tables. Action methods begin with an initial capital letter, such as Create, Delete, and so on. Specify TRUE if you want the action methods to update the stored analytic workspace and commit the changes. Specify FALSE if you want an update and commit to occur only when you use the AWAction package classes. The default value is FALSE.

Constructor Detail

AWConnection

public AWConnection(java.lang.String user,
                    java.lang.String pwd,
                    java.lang.String inputConnectString)
Opens a database connection through JDBC and establishes the OLAP processing environment within the context of this connection. The arguments to the AWConnection constructor are a user ID, a password, and a connect string.

For a thin connection (recommended) specify a connect string with the format:

 host_name:port#:SID
where host_name is the name of the host computer, port# is the number of the port for the connection, and SID is the name of this database instance (service identifier). AWConnection uses this input to construct the connect string jdbc:oracle:thin:@host_name:port#:SID which it passes to oracle.jdbc.DriverManager.GetConnection to create the connection.

For a thick connection specify the name of an entry in the tnsnames.ora file as the connect string. AWConnection uses this name to construct the connect string jdbc:oracle:oci:@tnsnames_descriptor which it passes to oracle.jdbc.DriverManager.GetConnection to create the connection.

The following illustrates a thin connection to the orcl instance of the Oracle Database at port 1521 on the machine myOracleServer:

  String user = "global_aw";
  String pwd = "global_aw";
  String conn = "myOracleServer:1521:orcl";
  try
  {
    AWConnection awConnection = new AWConnection(user, pwd, conn);
  }
  catch (Exception e) 
  {
    System.out.println(e);
  }
Parameters:
user - A String that contains the user ID for the connection.
pwd - A String that contains the password for the connection.
inputConnectString - A String that specifies the server, port, and database instance for the connection.

Method Detail

getSQLConnection

public java.sql.Connection getSQLConnection()
Gets the java.sql.Connection for this AWConnection.
Returns:
The java.sql.Connection for this AWConnection.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-01

Copyright © 2003, 2005 Oracle. All rights reserved.