Open topic with navigation

TIBCO ActiveSpaces® 4.8.0

# Connection

Programs begin their interactions with an ActiveSpaces data grid by first creating a Connection object. The Connection object can then be used to retrieve grid metadata or to create Session objects.

From the Connection object, a program can create one or many Session objects.

## Grid Metadata

Grid metadata is retrieved from a Connection object by calling the get grid metadata API. Each time the GridMetadata is retrieved, the information returned reflects the current table information in the data grid.

A program must destroy the GridMetadata object after it has finished using it and before making any subsequent calls to retrieve updated GridMetadata.

To learn more about grid metadata, see the section on "Metadata" in Programming with ActiveSpaces.

## Table Metadata

Table information is retrieved from the GridMetadata object as a TableMetadata object. A TableMetadata object is retrieved by using the table's name.

If the application program does not know the names of the tables that have been defined in the data grid, the GridMetadata object provides a method to get an array of all table names that have been defined. This array can then be used to get a single TableMetadata object.

A column name or index name is used to get information about a particular column or index from a TableMetadata object. If the application program does not have the names of the columns or indexes of a table, the TableMetadata object provides methods to get an array of the column names or index names.

A separate method to get the name of the primary index is provided by the TableMetadata object. The name of the primary index is then used to retrieve information about the columns of the primary index. The columns of the primary index make up the primary key of the table.

The TableMetadata object and strings retrieved from it do not have to be destroyed as these objects are owned by the GridMetadata object and are destroyed when the grid metadata is destroyed.

Copyright © 2009-2022. Cloud Software Group, Inc. All Rights Reserved.