Version 4

    Step 3 - Replace the HSQLDB Datasource configuration file with your own.

     

     

    1.  Remove deploy{-hasingleton}/hsqldb-ds.xml

     

     

     

     

    2.  Copy docs/examples/jca/$-ds.xml to deploy{-hasingleton}

    Find the -ds.xml file that corresponds to your driver.  Most JDBC drivers already have a configuration that can be copied.

     

     

     

     

    3.  Or make your own datasource configuration deployment

     

     

    Gotya:  In each of the -ds.xml files you will find an entry at the bottom that describes the Object to type mappings that are used for EJB2.1 persistence.  Keep in mind that EJBtimers are also used.  If you omit the following metadata tags from the -ds.xml file you are using, you will most likely have an exception when the EJBTimers start.

     

     

     

     

    This metadata element that is in the -ds.xml file points to an entry in the standardjbosscmp-jdbc.xml that specifies the type mappings for that particular driver.  In EJB2.1 CMP, information had to be kept about what primitives and objects mapped to types of jdbc fields.  Hibernate/EJB3 does this by setting the dialect, which is a jdbc driver specific mapping of exceptions and field types.  This entry is very similar to a dialect.

     

     

     

    Example metadata mapping that should be in the -ds.xml file. Look for it's matching type mapping for EJB2.1 CMP in standardjbosscmp-jdbc.xml.

    <metadata>
        <type-mapping>Oracle9i</type-mapping>
    </metadata>