NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.0+)
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/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 will 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( );
// add BlobInfo Properties
prop.put("BlobInfo1", ","$VOL1.MYVOL.PRODUCT, PICTURE, $VOL.CTLG, $VOL1.SUBVOL1, \
> $VOL2.SUBVOL2");
prop.put("BlobInfo2", ","$VOL2.MYVOL.EMPLOYEE, EMPPIC, $VOL.CTLG, $VOL2.SUBVOL2");
");//add BlobMapFile Property
prop.put("BlobMapFile", ","$VOL2.MYVOL.BLOBMAP");
");// add other properties to java.util.Properties object.....
The BLOB table name, column name, and catalog name are required by JDBC. At least one file location per BlobInfo
property is required to provide BLOB support. If more than one file location is provided, the JDBC driver will round-robin
through the list of file locations when creating BLOB files.
Note: The table name and catalog name must be provided in the $volume.subvolume format. Aliases for
table names or catalog names cannot be substituted for BLOB properties.
The Properties object can also contain other connection-related properties and their values, such as logon ID, password, alias,
and so on. The Properties object can also be created by loading the properties from a file. In either case, the format for all
BLOB properties must be the same.
Note: After a Properties object has been specified while creating a database connection, the connection is aware
of only those BLOB properties specified during connection creation. Any changes or updates made to the
Properties object after the connection has been granted will be invisible to that connection.
The JDBC driver uses the specified Properties object to ascertain which columns will be used for storing BLOBs for every