Senin, 16 Januari 2017

ADF BC With No Database Connection

Sometimes user need programmatic View object with no database connection.

If you want to disable database access for ADF BC application, you will need to update bc4j.xcfg

I would recommend to update this file from outside, not from JDeveloper - otherwise you may experience errors - seems like JDeveloper IDE is constantly scanning changes from bc4j.xcfg. Make sure to update bc4j.xcfg, for example RequiresConnection=false

Below is the snippet of the file:

<?xml version = '1.0' encoding = 'UTF-8'?>
<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">
   <AppModuleConfigBag ApplicationName="model.AppModule">
      <AppModuleConfig name="AppModuleLocal" ApplicationName="model.AppModule" DeployPlatform="LOCAL" jbo.project="model.Model">
         <Security AppModuleJndiName="model.AppModule"/>
         <Custom RequiresConnection="false" password=""/>
      </AppModuleConfig>
      <AppModuleConfig name="AppModuleShared" ApplicationName="model.AppModule" DeployPlatform="LOCAL" jbo.project="model.Model">
         <AM-Pooling jbo.ampool.maxpoolsize="1" jbo.ampool.isuseexclusive="false"/>
         <Security AppModuleJndiName="model.AppModule"/>
       <Custom RequiresConnection="false" password=""/>
      </AppModuleConfig>
   </AppModuleConfigBag>

</BC4JConfig>


Update <Custom JDBCDataSource="java:comp/env/jdbc/Connection1DS"/> with <Custom RequiresConnection="false" password=""/> at both the places. 

Tidak ada komentar:

Posting Komentar