Problem:Create JNDI without using Oracle Application Enterprise Manager
Solution:While you create Database JNDI using Oracle Application Enterprise Manager, it modifies two files in the SOA installed location.
1) data-sources.xml
2) oc4j-ra.xml
We can manually create JNDIs by adding contents to these files. This try was made just to make sure that JNDIs can be created without the help of Enterprise manager.
So here you go,
1) First you need to modify the data-sources.xml file located at <SOA_Home>\j2ee\<Active container name>\config. Open the file in notepad. Add your new pool information as:
<connection-pool name="TestPOOL">
<connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="database username" password="database password" url="jdbc:oracle:thin:@//host name:port/service name" commit-record-table-name=""/>
</connection-pool>
Give a pool name. You need to provide the database connection details such as username, password, host name, port, service name. Save the changes.
2) As the second step, you need to modify the oc4j-ra.xml file located at <SOA_Home>\j2ee\<Active container name>\application-deployments\default\DbAdapter. Open the file in notepad. Add your new JNDI information as:
<connector-factory location="eis/DB/Test" connector-name="Test DB Adapter JNDI">
<config-property name="xADataSourceName" value="jdbc/Test"/>
<config-property name="dataSourceName" value=""/>
<config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
<config-property name="usesNativeSequencing" value="true"/>
<config-property name="sequencePreallocationSize" value="50"/>
<config-property name="defaultNChar" value="false"/>
<config-property name="usesBatchWriting" value="true"/>
<connection-pooling use="none">
</connection-pooling>
<security-config use="none">
</security-config>
</connector-factory>
Provide the JNDI location and also the datasource name. Save the changes.
After the changes bounce the SOA Server. Now your database JNDI is ready to use.