Red Hat Training

A Red Hat training course is available for Red Hat JBoss Data Virtualization

8.3. Handling Large Objects

The Translator API automatically handles large objects (BLOB/CLOB/SQLXML) through the creation of special purpose wrapper objects when it retrieves results.
Once the wrapped object is returned, the streaming of LOB is automatically supported. These LOB objects can then, for example, appear in client results, in user defined functions, or be sent to other translators.
An Execution is usually closed and the underlying connection is either closed/released as soon as all rows for that execution have been retrieved. However, LOB objects may need to be read after their initial retrieval of results. When LOBs are detected the default closing behavior is prevented by setting a flag using the ExecutionContext.keepAlive() method.
When the "keepAlive" flag is set, then the execution object is only closed when user's Statement is closed.
executionContext.keepExecutionAlive(true);