6 Replies Latest reply on Mar 22, 2011 2:30 PM by HVT

    jdeveloper and mobile client blackberry data sync

    782686
      Hi all, I would firstly like to apologies for my noob questions as I'm new to these oracle products. I'm trying to build a "proof of concept" product using ADF Mobile Client and oracle database lite sync technology.

      I've started on this tutorial i've found (and yes I did notice that the doco is still in its beta form) :-

      http://www.oracle.com/technology/obe/obe11jdev/ps1/mobile/mobile.html


      also referred to these other 2 links :

      http://www.oracle.com/technology/tech/wireless/Mobile_Client_Dev_Guide_April_23.pdf
      http://www.oracle.com/technology/tech/wireless/dev_blackberry.pdf

      I've managed to deploy the mobile client app and run it on a blackberry simulator (mounted with the given BlackBerrySDCard) as a disconnected app and its all running nicely. Now, what I would like to know is how to set the mobile server so that I am able to sync changes and do a full end to end transaction. I understand that I need to do a "publish Application data" deployment action and some how load this in the mobile server. However, the tutorials that I've mentioned above doesn't seem to have enough info on how to go about doing this. It would be great if someone could point me to the right direction.
        • 1. Re: jdeveloper and mobile client blackberry data sync
          Denis T-Oracle
          First off, we're happy to hear you've been successful so far with ADF Mobile Client! We'd love to hear about your application and what you're trying to do and what (new?) requirements you have that might require changes/additions to the framework. Please email me with any info you can provide.

          First off, you would need to obtain a copy of the Mobile Server (actually called Oracle Database Lite) version 10.3.0.3 with the latest patch. You can find the download link here: http://www.oracle.com/technology/software/products/lite/index.html. Note that you can use this for development purposes but you'll need to aquire a license for production use.

          1) Install Mobile Server and Mobile Development Kit
          Once you get the install bits, you need to run the install. This requires you have an 11g Oracle database that the Mobile Server would install it's schema to. It is highly recommended to install the Mobile Server onto the same Oracle database that contains your application data schema. If you don't, you'll have a manual step to perform to make this work that is documented in the Mobile Server (MS)documentation. By default the MS install also installs an App Server so just use that. It is possible to install MS into an already existing WebLogic but that also requires some more manual steps and for development it's probably too much work. The second part to the install is the Mobile Development Kit (MDK). That has to be installed on the machine where your JDev is installed. Be sure to write down all the usernames and passwords that it asks you because you'll need them later.

          2) Verify Mobile Server is working
          Now you can test your mobile server is running by going to a web browser and typing: http://<MS host:port>/webtogo
          This will launch the web admin. Once you enter your password you should get an option to load the console. This should all work or something is not configured properly and you'd have to consult the MS documentation.

          3) Set your preferences in JDev
          Once the install is completed, you need to go to your JDev and in the Tools/Preferences/Mobile Client section, specify the location of the MDK. Typically this is just C:\Olite10g_1.

          4) Configuring the sync deployment profile:
          Configuring the deployment profile: From JDeveloper we allow you to publish the synchronization information directly to your MS. The Application Data Publication screen of the deploy profile is where you configure how to connect to your MS. Create a database connection to your MS repository. (The default username is MOBILEADMIN). Pick a synchronization user/password. That is something you would enter into the mSync application on the device and use it as your sync credentials. Note: You only need to add this to one deployment profile if you have multiple. In the production version this is split out into its own deploy profile type.

          5) Install the client portion, called mSync onto your device.
          This should already be done for you by our ADF Mobile Client runtime deployment. Verify that you have an application called mSync on your simulator. If you don't, copy the mSync.cod and osync_rim.cod files from your Mobile Server folder in this location: (example: C:\Olite10g_1\Mobile\Sdk\blackberry). If you are running Windows Mobile, it willl be a CAB install that you copy to the device and run.

          6) Deploy the Application Data to the Mobile Server
          From your project, right click and select deploy. This time select to deploy the application data. Watch the console output and it should show the deployment of the publication and then a publication item for every EO that you have. Let us know if this fails.

          7) Sync the data to the device.
          Go to your simulator and run mSync. Enter the username/password you defined as the sync user in step 4. You should see this complete. If not, make sure you have connection to your Mobile Server and make sure the MS is running (test using webtogo again).

          This should get you up and running. Then you can make changes in your mobile client and/or on your server and it will sync the data back and forth.

          Let us know if you have any issues.
          1 person found this helpful
          • 2. Re: jdeveloper and mobile client blackberry data sync
            782686
            Thanks for the quick reply. Tried what you said and its all working great :). Just a quick question, is there a way to sync a subset of data from the main db. i.e. only sync data that are related to specific user.

            example scenario:

            Server database holds both Rep A and Rep B data.

            Rep A should only be able to see Rep A data and Rep B should only be able to see Rep B data.

            Reason for this is because our data set are quite large and we wouldn't want Rep A's device to sync Rep B's data onto it.
            • 3. Re: jdeveloper and mobile client blackberry data sync
              782686
              Thanks for the quick reply. Tried what you said and its all working great . Just a quick question, is there a way to sync a subset of data from the main db. i.e. only sync data that are related to specific user.

              example scenario:

              Server database holds both Rep A and Rep B data.

              Rep A should only be able to see Rep A data and Rep B should only be able to see Rep B data.

              Reason for this is because our data set are quite large and we wouldn't want Rep A's device to sync Rep B's data onto it.
              • 4. Re: jdeveloper and mobile client blackberry data sync
                ajochems
                Hi,
                Yes you can accomplish that with data subsetting. In your queries in mobile workbench you can use parameters which you can set runtime from the mobile server console for every device that is registered.
                Kind Regards,
                Andre
                • 5. Re: jdeveloper and mobile client blackberry data sync
                  519957
                  For the subsetting, you can use a predefined variable - :CLIENTID - in your publication item query. It automatically gets set to the sync user name.
                  • 6. Re: jdeveloper and mobile client blackberry data sync
                    HVT
                    Hi Denis,
                    We have followed the instructions given by you on this thread you here is what we have done as per those 7 steps mentioned by you above:
                    1) Install MS (c:\olite10g_1) & MDK (c:\olite10g_2): both installed on same machine as the oracle 10g server db and jdev (with its inbuilt weblogic server) +simulator
                    2) Verified MS is working by opening the "webtogo" url...and here, if I go to http://<MS host:port>/webtogo and then the mobile manager, under devices, i do not see any registered device, should I see the simulator here?
                    3) Set preferences in JDev (MDK c:\olite10g_2)
                    4) Configuring the sync deployment profile: Created a db connection to MS repository (MOBILEADMIN). chose syncuser/syncuser as synchronization user/password.
                    I also changed the client db params since the default FOD instructions talk abt standalone DB, hence I changed it to "synchronized database on client" with name as just MOBILEFOD. Is this correct?
                    5) client portion, mSync was already installed onto my device by ADF Mobile Client runtime deployment
                    6) Deployed the Application Data to the Mobile Server, output as shown above in my previous post
                    7) Sync the data to the device - this is not working for us if we give syncuser/syncuser/localhost (or ip address etc), it keeps giving the error: "element databases is invalid in this document".


                    And then since this was not working and we saw some reference to the need for having an ADF Mobile Transaction Replay Service running, so we went ahead and installed the same on the WebLogic server that came with JDev following the instructions mentioned in the "Installation Guide for ADF Mobile Transaction Replay Service" (11g Release 1 (11.1.1) E15492-01 March 2011), but that also does not seem to have helped.
                    Now I am wondering if we do need this transaction replay service for the purpose of syncing the base and mobile fod apps.

                    Can someone assist us please?
                    Regards,
                    Hemant