From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/installation/build_android_adfmobile.html | 275 +++++++++++++++++++++++++ 1 file changed, 275 insertions(+) create mode 100644 docs/installation/build_android_adfmobile.html (limited to 'docs/installation/build_android_adfmobile.html') diff --git a/docs/installation/build_android_adfmobile.html b/docs/installation/build_android_adfmobile.html new file mode 100644 index 00000000..7f5ffcf5 --- /dev/null +++ b/docs/installation/build_android_adfmobile.html @@ -0,0 +1,275 @@ + + + + + + Using the JDBC Driver in ADF Mobile for Android + + + + + + + + + +
+
+
+
+

Using the JDBC Driver in ADF Mobile for Android

+
+
+
+

+ This section describes how to build and use BDB JDBC + driver for Android in ADF Mobile. +

+
+
    +
  1. +

    + Setup the ADF Mobile environments: +

    +
    +
      +
    • +

      + ADF Business Components: 11.1.2.4.39.64.36.1 +

      +
    • +
    • +

      + ADF Mobile Framework: 11.1.2.4.39.64 +

      +
    • +
    • +

      + JDeveloper: 11g Release 2(11.1.2.4.0) +

      +
    • +
    +
    +
  2. +
  3. +

    + Prepare the building environment. +

    +
    +
      +
    1. +

      + Download the OJEC1.1.1 headless package from +

      +

      + http://www.oracle.com/technetwork/java/embedded/downloads/javame/index.html#2 +

      +

      + Unzip it and move btclasses.zip from OJEC1.1.1_HOME to OJEC1.1.1_HOME/lib. +

      +
    2. +
    3. +

      + Modify BDB_HOME/lang/sql/jdbc/config.ojec11 as follows: +

      +
      +
        +
      • +

        + Specify OJEC_HOME with the location where OJEC1.1.1 is unzipped to +

        +
      • +
      • +

        + Specify JDBCSQLITE_HOME with BDB_HOME/build_unix/jdbc +

        +
      • +
      • +

        + Remove foundation.jar from BOOT_CLASSPATH +

        +
      • +
      • + Remove the last line which is "./configure" +
      • +
      +
      +
    4. +
    5. +

      + Export the variables in config.ojec11 to the environment using an appropriate + shell command for example, ". BDB_HOME/lang/sql/jdbc/config.ojec11". +

      +
    6. +
    +
    +
  4. +
  5. +

    + Build the Android JDBC driver. +

    +

    + For instructions on how to build Android JDBC driver, + see Building the Android JDBC + Driver. +

    +

    + Ensure that the JDBC driver includes SQLite/JDBC0 classes by "jar tf sqlite.jar". +

    +
  6. +
  7. +

    + Apply Android JDBC in ADF Mobile. +

    +
    +
      +
    1. +

      + Download the ADF Mobile in JDeveloper by selecting + Help -> Check for Updates. The ADF Mobile extension will be downloaded in + jdev_install/jdeveloper/jdev/extensions/oracle.adf.mobile. +

      +
    2. +
    3. +

      + In JDeveloper, open the HR sample application in + jdev_install/jdeveloper/jdev/extensions/oracle.adf.mobile/Samples/HR. +

      +
    4. +
    5. +

      + Add BDB Android JDBC to application libraries and classpath. +

      +
    6. +
    7. +

      + Replace the JDBC driver in ADF Mobile framework as follows. +

      +
      +$ cd jdev_install/jdeveloper/jdev/extensions/oracle.adf.mobile
      +/Android
      +$ unzip Oracle_ADFmf_Framework.zip
      +...
      +$ cp <db>/build_unix/jdbc/sqlite.jar ./framework/Android/build/
      +java_res_<release and debug>/assets/storage/jvm/lib/
      +$ cp <db>/build_android/jdbc/libs/armeabi/liboracle-jdbc.so .
      +/framework/Android/build/java_res_<release and debug>/assets/storage
      +/jvm/lib/
      +$ zip -9 -r Oracle_ADFmf_Framework.zip framework
      +...
      +$ rm -fr framework
      +
      +
    8. +
    +
    +
  8. +
  9. +

    + Modify the sample application. +

    +
    +
      +
    1. +

      + Migrate the database file from SQLite to BDB by the following commands: +

      +
      +$ cd HR_SAMPLE/.adf/META-INF
      +$ mv HR.db HR.db.orig
      +$ mv hr.sql hr.sql.orig
      +$ vi hr.sql (Remove all lines with "COMMIT" and "REM") $ 
      +BDB_HOME/build_unix/dbsql HR.db
      +.read hr.sql
      +.exit
      +
      +
    2. +
    3. +

      + Modify LifeCycleListernImpl.start() method by replacing the try + catch block of getting a connection and executing the query with copyDB(). +

      +
    4. +
    +
    +
  10. +
  11. +

    + Run the sample application. +

    +
    +
      +
    1. +

      + Configure the ADF Mobile preferences for Android. + Select Tools -> Preferences -> ADF Mobile -> Platforms -> Android. + Specify the locations of Android SDK, Android platform, and the + keystore in the Release mode which is used to sign on the application. +

      +
    2. +
    3. +

      + Create a deployment profile. Select Application -> Deploy -> New Deployment Profile. + Choose ADF Mobile for Android as profile type. In the form of deployment profile + properties, choose Release Mode. +

      +
    4. +
    5. +

      + Launch the Android SDK Manager and start the AVD emulator. +

      +
    6. +
    7. +

      + Deploy the application by selecting Application -> deploy -> + (the_just_created_deployment_profile). Before deployment, ensure that the folder HR_SAMPLE/deploy is removed. +

      +
    8. +
    9. +

      + Run the application by clicking the application icon in the emulator. +

      +
    10. +
    +
    +
  12. +
+
+
+ + + -- cgit v1.2.1