7.3.3. Testing the Oracle DataSource

7.3.3. Testing the Oracle DataSource

Again we’ll use the CMP example to test out the new database connection. The jbosscmp-jdbc.xml file should contain the following.

<jbosscmp-jdbc> 
    <defaults> 
        <datasource>java:/XAOracleDS</datasource> 
        <datasource-mapping>Oracle9i</datasource-mapping> 
    </defaults> 
</jbosscmp-jdbc> 

There are other Oracle type-mappings available too. If you’re using an earlier version, have a look in the conf/standardjbosscmp-jdbc.xml file to find the correct name

Deploy the application as before, check the output for errors and then check that the tables have been created using Oracle SQLPlus again from the command line.

SQL> select table_name from user_tables;

TABLE_NAME
------------------------------
TEAMBEAN
LEAGUEBEAN
PLAYERBEAN
PLAYERBEAN_TEAMS_TEAM_1OFLZV8