Discuss this tutorial. Printable version (PDF).
Go to Contents page. Go to previous page. Go up a level. Go to next page.

 

Setup


Following is a general procedure for setting up your system to use EJB QL in OC4J to query a bean based on the EMP table. OTN developers have already performed the steps required to use EJB QL in the FBS sample application.To configure your system to build and run the FBS sample application, see the Setup section of About the Financial Brokerage Service.

  1. Define a data source in your %J2EE_HOME%/config/data-sources.xml file to point to the schema you want to query. The FBS application uses a data source configured for OC4J.
    <data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OracleDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="scott"
    password="tiger"
    url="jdbc:oracle:thin:@localhost:1521:oracle"
    inactivity-timeout="30"
    />
  2. Make sure the orion-ejb-jar.xml file points to the data source you have defined. For example, the following element points to the jdbc/OracleDS data source.
    <entity-deployment name="Emp" data-source="jdbc/OracleDS" table="EMP"> 
  3. If the required tables (e.g., EMP) already exist, edit the orion-application.xml file to turn off the autocreate-tables feature. For example:
    <orion-application autocreate-tables="false" ... >

Discuss this tutorial. Printable version (PDF).
Go to Contents page. Go to previous page. Go up a level. Go to next page.
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy