Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (10.1.3.5.0)

Part Number E13981-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Configuring a Data Source for a Third-Party Database

To create a data source for a third-party (non-Oracle) database, you create a native datasource. You can create a native data source using the Application Server Control Console (see "Using Application Server Control Console") or deployment XML (see "Using Deployment XML").

For more information, see the following:

Using Application Server Control Console

You can use Application Server Control Console to create a native data source dynamically without restarting OC4J.

For more information, see http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html.

Using Deployment XML

Example 20-2 shows how to define a native data source element for a third-party database (in this example, SQLServer).

Example 20-2 data-sources.xml for a Third-Party Database

<native-data-source
  name="nativeDataSource"
  jndi-name="jdbc/nativeDS"
  description="Native DataSource"
  data-source-class="com.ddtek.jdbcx.sqlserver.SQLServerDataSource"
  user="frank"
  password="frankpw"
  url="jdbc:datadirect:sqlserver://server_name:1433;User=usr;Password=pwd">
</native-data-source>

By default, a native data source supports only local transactions. For global (two-phase commit) transactions, configure a managed data source. For more information, see "What Transaction Types do Data Sources Support?").

For more information, see the following:

If you configure a native data source using this method, you must restart OC4J to apply your changes. Alternatively, you can use Application Server Control Console to create a native data source dynamically without restarting OC4J (see "Using Application Server Control Console")