Limitations of using the Oracle BLOB and CLOB datatype fields with CMP EJB attributes
 Technote (troubleshooting)
 
Problem(Abstract)
Problems with Oracle BLOB and CLOB fields that are mapped to CMP Enterprise JavaBeans attributes using Oracle Thin or OCI JDBC driver with IBM WebSphere Application Server V5.0 releases.
 
Cause
When mapping CMP EJB attributes to Oracle 8 CLOB columns, the getter method returns NULL.
 
Resolving the problem
There is a workaround for applications using the Oracle OCI JDBC driver. The workaround is to have your application subclass the OracleDataStoreHelper class and override the getResultSetConcurrency() method.

Instructions on how to subclass OracleDataStoreHelper are documented in the WebSphere Application Server V5.0 Information Center section, Example: Developing your own DataStoreHelper class.

Here are the important steps to implement the above workaround:
  1. Create a class that extends the classcom.ibm.websphere.rsadapter.OracleDataStoreHelper (this class is located
    in the rsaexternal.jar in $WAS_HOME/lib directory where $WAS_HOME is the
    directory where WebSphere Application Server V5.0.x is installed), for example:
    public class ExampleDataStoreHelper extends
    com.ibm.websphere.rsadapter.GenericDataStoreHelper

    {
    // Constructor
    public ExampleDataStoreHelper(java.util.Properties props)
    {
    super(props);
    }
    // Override method getResultSetConcurrency
    public int getResultSetConcurrency(AccessIntent intent)
    throws ResourceException
    {
    return java.sql.ResultSet.CONCUR_READ_ONLY;
    }
    }

  2. Compile your ExampleDataStoreHelper class. You need to have the following JAR files (located in $WAS_HOME/lib directory) in your CLASSPATH:
    • appprofile.jar

    • j2ee.jar

    • rsaadapterspi.jar

    • rsaexternal.jar

  3. After compiling your ExampleDataStoreHelper class, export it to a JAR file and put it in $WAS_HOME/lib.

  4. When creating the data source to be used with your CMP EJB, specify your ExampleDataStoreHelper class instead of com.ibm.websphere.rsadapter.OracleDataStoreHelper for the "DataSource Helper Classname" .


Important Note:

The workaround described above works only for Oracle JDBC OCI driver. It does not work with Oracle JDBC Thin driver.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > EJB Container
Operating system(s): Windows
Software version: 5.0
Software edition:
Reference #: 1166342
IBM Group: Software Group
Modified date: Sep 11, 2004