user manual

188 BES Developers Guide
Container-managed data access support
Support for Oracle Large Objects (LOBs)
There are two types of Large Objects (LOBs), Binary Large Objects (BLOBs)
and Character Large Objects (CLOBs).
BLOBs are mapped to CMP fields with the following data types:
byte[]
java.io.Serializable
java.io.InputStream
CLOBs, by virtue of being Character Large Objects, can only be mapped to
cmp-fields with the java.lang.String data type.
By default, the Borland CMP engine does not automatically map cmp-field to
LOBs. If you intend to use LOB data types, you must inform the CMP engine
explicitely in the ejb-borland.xml deployment descriptor. You do this by setting
the Column Property createColumnSql. For example:
<column-properties>
<column-name>CLOB-column</column-name>
<property>
<prop-name>createColumnSql</prop-name>
<prop-type>String></prop-type>
<prop-value>CLOB</prop-value>
</property>
</column-properties>
<column-properties>
<column-name>BLOB-column</column-name>
<property>
<prop-name>createColumnSql</prop-name>
<prop-type>String></prop-type>
<prop-value>BLOB</prop-value>
</property>
</column-properties>
Container-created tables
You can instruct the Borland EJB Container to automatically create tables for
container-managed entities based on the entity's container-managed fields by
enabling the create-tables property. Because table creation and data type
mappings vary among vendors, you must specify the JDBC database dialect
in the deployment descriptor to the Container. For all databases (except for
JDataStore) if you specify the dialect, then the Container automatically creates
tables for container-managed entities for you if the create-tables property is
set to true. The Container will not create these tables unless you specify the
dialect.