WebSphere 4 Data Sources Configuration

The follow configuration work only with i-net SEROPTO or i-net ORANXO.

  1. Start the WebSphere Console
  2. Select the node “JDBC Drivers”
  3. Click on the “New” button and add the driver.
  4. Select “User-defined JDBC Driver”.
  5. Edit the driver properties.
  6. Select the “Data Sources” Node of the driver and click on the “New” button.
  7. You need to add a name (for example Oracle) and a JNDI name (for example jdbc/Oracle)
  8. Add driver specific properties to the data source.
  9. Shut down and start your application server again, it should now recognize the data source jdbc/Oracle. If you now create a mapping in your bean's ejb-jar.xml
    <resource-ref id="ResourceRef_18">
       <description>Default DS (factory setting: maps to jdbc/Oracle)</description>
       <res-ref-name>jdbc/DefaultDS</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
    </resource-ref>


    And in your bean's ibm-ejb-jar-bnd.xml:

    <resRefBindings xmi:id="ResourceRefBinding_21" jndiName="jdbc/Oracle">
       <bindingResourceRef href="META-INF/ejb-jar.xml#ResourceRef_18"/>
    </resRefBindings>


    Then your application can use this data source by calling:

      dbName = "java:comp/env/jdbc/DefaultDS";
      if(ic == null) ic = new javax.naming.InitialContext();
      javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup(dbName);


    After you've installed i-net SEROPTO, please check if your config.xml (located in the config directory of your Websphere application server) contains jtaEnabled=“true” and the classpath to your driver jar file (in the example below /opt/drivers/Seropto.jar) is properly set. Also verify that the serviceName, and optionally the server and port properties are correctly set.

    config.xml:

    [...]
    <resourceProviders xmi:type="resources:JDBCDriver" xmi:id="JDBCDriver_3" name="i-net Seropto" description="Oracle JDBC Driver for two-phase commit (JTA/XA) from i-net software" implementationClassName="com.inet.ora.XDataSource">
        <urlPrefix xsi:nil="true"/>
        <factories xmi:type="resources:DataSource" xmi:id="DataSource_9" name="O" jndiName="jdbc/Oracle" jtaEnabled="true" statementCacheSize="100"     defaultUser="scott" defaultPassword="{xor}KzY4Oi0=" disableAutoConnectionCleanup="false">
            <propertySet xmi:id="J2EEResourcePropertySet_9">
                <resourceProperties xmi:id="J2EEResourceProperty_15" name="serviceName" type="java.lang.String" value="GLDBNAME">
                    <description xsi:nil="true"/>
                </resourceProperties>
            </propertySet>
        </factories>
        <propertySet xmi:id="J2EEResourcePropertySet_1"/>
    </resourceProviders>
     
    <nodes xmi:id="Node_1" name="linux3.intern.de">
    [...]
    <installedResourceProviders xmi:id="ResourceProviderRef_4" classpath="/opt/drivers/Seropto.jar" resourceProvider="JDBCDriver_3"/>
    </nodes>
    [...]

Known problems

  • The message “Synchronization is not supported”: Check that jtaEnabled=“true”' is set (see the excerpt from config.xml above).
  • The message “Unknown property sid”: The property for the SID is serviceName, not sid.
 

© Copyright 1996 - 2017, i-net software; All Rights Reserved.