NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.1+)
The Properties object should contain one 'BlobInfo' property for every table column that contains BLOBs. A BlobInfo
property is identified by a key of type 'BlobInfoN', where N represents a unique number used to identify that property.
Format of a BlobInfo property
The format of a BlobInfo property is as follows:
BlobInfoN, sqlmp_table_name, column_name, sqlmp_catalog_of_Blob_table, $vol.subvol [,
... ]
where
N
is a unique number used to identify the BlobInfo property.
sqlmp_table_name
is the name of the BLOB table.
column_name
is the name of the column to be associated with the BLOB. This column should be defined to SQL/MP as CHAR or
VARCHAR 36.
sqlmp_catalog
is the name of the catalog associated with the BLOB table.
$vol.subvol [, ... ]
is a list of one or more locations in the Guardian file system where BLOB files can be stored. You must have write
access to these volume and subvolume locations.
BlobMapFile Property
A BlobMapFile property is used to specify a unique file name in the $volume.subvolume.filename format. If the
specified file does not already exist, the JDBC driver creates a key-sequenced Enscribe file using the specified name. This file
is used to store a list of all BLOB files created by the driver for that particular application. The BLOB map file is secured for
use only by its owner. A BlobMapFile property is identified by a 'BlobMapFile' key. This property is required for
BLOB support. The BlobMapFile property is used for later cleanup of obsolete BLOB files.
Format of a BlobMapFile property
The format of a BlobMapFile property is as follows:
BlobFileMap,$volume.subvolume.filename
where
BlobFileMap
is the key to the property.
$volume.subvolume.filename
is a file name in Guardian format.
Example Using BlobInfo Properties and the BlobMapFile Property
The following example illustrates how to create BlobInfo properties. Two BlobInfo properties are created by this
example.
The column PICTURE in table $VOL1.MYVOL.PRODUCT is used to contain BLOBs. The catalog for this table is
$VOL.CTLG. BLOB files associated with this column should be created in $VOL1.SUBVOL1 and $VOL2.SUBVOL2. The
column EMPPIC in table $VOL2.MYVOL.EMPLOYEE is used to contain BLOBs. The catalog for this table is $VOL.CTLG.
BLOB files associated with this column should be created in $VOL2.SUBVOL2.
A BlobMapFile property has also been defined for this example. The file $VOL2.MYVOL.BLOBMAP is created by the
driver to store a list of all the BLOB files created by the driver for this application.
java.util.Properties prop = new java.util.Properties( );