The data source is configured in OC4J:
1.Application.xml element must indicate the file name and path of the Data-Sources.xml file, namely: General Application.xml file and data-sources .xml files are in J2EE / Home / Config /. So the PATH attribute of element includes only the file name of Data-Sources.xml;
2. Data-Sources.xml file define data source: Class property defines the required defined data source type; location, xa-location, and ejb-location definition JNDI names; Connection-Driver indicates the connection driver. E.g:
2. Program call: context env = new initialContext (); DataSource pool = (DataSource) Env.lookup ("JDBC / MyConnection"); connection conn = pool.getConnection ();