This content has been marked as final. Show 44 replies
I need few clarifications on synchronization aspect.
1. Can we use Synchronization API's for synchronizing Oracle Lite Web OC4J clients?
2. How can we restrict few tables from getting synchronized in an application?
it may help for the second part:
You can set the information and call for a synchronization through the OracleEngine class without bringing up the GUI.
If you accept the default synchronization settings, provide true as the input parameter to automatically synchronize, as follows:
You can execute the synchronize method with three input parameters that define a specific server: the server name, username and password.
OracleEngine.Synchronize("S11U1", "manager", "myserver.mydomain.com")
Alternatively, you can configure a string that contains the options listed in Table 4-31 with a single String input parameter and synchronize, as follows:
In the above example, the String args input parameter is a combination of the options in Table 4-31.
String args = "S11U1firstname.lastname@example.org /save /ssl /force"
Include as many of the options that you wish to enable in the String.
Table 4-31 Command Line Options
Automatically synchronize to the specified server.
Automatically synchronize to saved preferred server.
Save user info and exit.
Connect by specific proxy server and port.
Synchronize with SSL encryption.
Do not synchronize specific Web-to-Go application data. Synchronize with other applications.
Do not synchronize specific publication data. Synchronize with other publications.
Do not synchronize specific table data. Synchronize with other tables.
Synchronize only specific Web-to-Go application data. Do not synchronize with other applications.
Synchronize only specific publication data. Do not synchronize with other publications.
Synchronize only specific table data. Do not synchronize with other tables.
Enable high priority data synchronization.
there is for the 4.4.1 Use the OracleSync Class for Synchronization
4.4.5 Manage What Tables Are Synchronized With Selective Sync
Update the table flags for selective sync. Call this for each table to specify whether it should be synchronized(1) or not (0) for the next session. Selective sync only works if you have first performed at least one synchronization for the client. Then, set the flag so that on the next synchronize—that is, before the next invocation of the Synchronize method—a selective sync occurs.
The default setting is TRUE (1) for all the tables; that is, all tables are flagged to be synchronized. If you want to selectively synchronize specific tables, you must first disable the default setting for all tables and then enable the synchronization for only the specific tables that you want to synchronize.
Automatic synchronization is based on a different model than manual synchronization. Automatic synchronization operates on a transactional basis. Thus, the selective sync option is not supported when you use automatic synchronization for a publication, since we are no longer concerned with synchronization of only a subset of data.
void SetTableSyncFlag (string pubName, string tableName, bool sync_flag)
Table 4-5 lists the name and description of parameters for the setTableSyncFlag function.
Table 4-35 setSyncFlag Parameters
The name of the publication which is being synchronized. If the value for the pubName is NULL, it means all publications in the database. This string is the same as the client name supplied to the Consolidator Manager when creating the publication. In most cases, you will use NULL for this parameter. For more information, see Section 2.4, "Creating Publications Using Oracle Database Lite APIs".
This is the name of the snapshot. It is the same as the name of the store, the third parameter of createPublicationItem(). For more information, see Section 2.4, "Creating Publications Using Oracle Database Lite APIs".
If the sync_flag is set to TRUE, you must synchronize the publication. If the sync_flag is set to FALSE, then do not synchronize. The value for the sync_flag is not stored persistently. Each time before Synchronize(), you must call SetTableSyncFlag().
This function allows client applications to select the way specific tables are synchronized.
Set sync_flag for each table or each publication. If sync_flag = FALSE, the table is not synchronized. To synchronize specific tables only, you must perform the following steps:
Disable the default setting by setting it to FALSE (0). By default, the setting is set to TRUE (1) for all the tables. Setting them all to FALSE then enables you to select which tables are to be synchronized, which is performed in step 2.
Where <pubName> must be replaced by the actual name of your publication, and where the value null is specified to mean all the tables for that publication without exception.
Enable the selective sync for specific tables.
Alternatively, see the following code snippet on how to enable the selective sync flag for EVERY table EXCEPT the OrdersODB.TEST table.
m_sync.SetTableSyncFlag("","",(short)1); //turn on sync flag for all the tables
//turn off sync flag for OrdersODB.TEST
hope it helped for the second question of yours.
Thanks for the quick response.
I'm proceeding with a Oracle Lite Web OC4J application.
I can understand from your reply that tables can be restricted of synchronization. But is this applicable for Oracle Lite Web OC4J also?
The plan is to have a application, with few screens utilizing synchronization capabilty and other screens not to utilize since the other screens are not expected to access database directly.
Edited by: user10291345 on Aug 25, 2010 5:40 AM
I get the following exception when running the quick wizard in MDW.
CLASSPATH = -Djava.class.path=D:\Olite10g_1\Mobile\Sdk\bin\;D:\Olite10g_1\Mobil
PATH = PATH=D:\Olite10g_1\Mobile\Sdk\bin;D:\software\Java\jdk1.5.0_03\jre\bin\c
Exception occurred during event dispatching:
Any clues on this?
Your JDK in the path is showing JDK 1.5_03 Try to get it to the latest JDK for 1.5. That's a Java Swing exception.
I tried with Jdk1.5.0_22 and Jdk1.5.0_12 but still getting the same exception.
1. Can you let me know the exact version of jdk to be tried?
2. Also using API to create publications, where exactly the code should be run? And how should it be run?
There is one sample in the demo folder, which appears to be a standalone class. How this can be done with ADF?
Can you let me know on the exact version of jdk requried for Olite 10.3.0.3.0 for MDW in windows?. Currently I tried with jdk 1.5.0_12,jdk 1.5.0_22 and jdk1.5.0_1.
jdk 1.5 but there isn't a subversion that you require.
I will take a second look at the stack trace and see what else I can find.
Thanks for all your replies till now and I got lot of clues from them.
I have one urgent requirement. Can an application module be tested with sqlflavour as Olite and type as java?
I want to test an application module in 10.1.3.3.0.4157 and follwing are the steps I did.
1. I've included the olite40.jar and webtogo.jar in the Manage libraries under users.
2. I've included them in the Model-> project properties also.
3. While creating ADF business components I chose, Olite for SQL Flavour and Type Map as java. Here I'm connecting to a normal Oracle database(something similar to adfconn in the tutorials for Web_tutorial for webtogo with oc4j).
Now when I try to test the application module I get the following exception.
(oracle.jbo.common.ampool.ApplicationPoolException) JBO-30003: The application pool (.12AF6C43464) failed to checkout an application module due to the following exception:
----- LEVEL 1: DETAIL 0 -----
(oracle.jbo.JboException) JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
----- LEVEL 2: DETAIL 0 -----
(oracle.jbo.JboException) JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
----- LEVEL 3: DETAIL 0 -----
(oracle.jbo.JboException) JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
----- LEVEL 4: DETAIL 0 -----
(oracle.jbo.DMLException) JBO-26061: Error while opening JDBC connection.
----- LEVEL 5: DETAIL 0 -----
(java.sql.SQLException) No suitable driver
Your help is much appreciated.
I tried your posting in this link http://kr.forums.oracle.com/forums/thread.jspa?threadID=594017&tstart=225
I want to connect to my local client lite db. My client is Oracle Lite WEb OC4J, US.
But the webtogo connection throws 10/09/16 14:57:04 Connection: Invalid Oracle URL specified when tried via jdeveloper. Here my db connection is pointing to a regular oracle database..
My connection string goes this way. conn = DriverManager.getConnection("jdbc:polite:USERNAME_mylocaldb", "system", "PASSWORD");
I replaced it using conn=DriverManager.getConnection("jdbc:oracle:webtogo"); but it doesnt seem to connect to USERNAME_mylocaldb due to the above exception.
How this should be done?
What driver are you using?
First I used
Connection conn = DriverManager.getConnection("jdbc:polite:ANURADHA_mylocaldb", "system", "ANURADHA");
Then I tried,
Connection conn = DriverManager.getConnection("jdbc:oracle:webtogo");
The first one was successful, but the second one failed.
Also my viewcontroller and model layers both have webtogo.jar in the library.
Am I missing anything?
The webtogo driver will ony work from the workspace... after you sync. It doesn't work from a standalone sevlet container.
Btw, please open a new thread for new issues. Easier to keep track of issues relayed to the subject.
Thanks. Will keep you posted in a new thread!!
Hi, I have the same problem,could you help me how to sovle and the reason?Thanks!