Logical Deletes

I'm working on a project with a database where database entries are deleted logically (a column deletets is set to the current time).
How can I handle this with JDO/Kodo?
Requirements:
1. Records with a deletets != null must not be read. Is there a generic way to do this?
2. If the Store Manager decides to remove a record it should not delete the record but send an update set deletets=xx
Thanks for any help

It is dirty but you could try this:
- Map your model onto views which have deleted=false criterion
- Decorate Kodo PM class (and register it in kodo.properties) with delete
methods overrides where you will:
- mark object as logically deleted
- remove any references to it whether N-1 or 1-N, M-N
- Decorate commit method so after commit you inspect all transactional
objects (get them into a list before calling commit) and make all logically
deleted object transient to get them out of your PM
Potential issues are
- you still have them in database so any uniquiness constraints will fire
and you have no way of pre-verifying them
- kodo might clash this filtering view during database flush
- You need to track and remove all references to a logically deleted object
- any other issue I missed :-)
It might give you desired transparency but might cause some subtle problems
down the road
<Laurent Goldsztejn> wrote in message news:[email protected]..
1. Kodo doesn't offer a generic way for updating the boolean type column
instead of deleting the records. This column should be managed and
updated as any generic boolean column.
2. A delete call shouldn't be called there but an update query on the
delete column for the physical delete not to occur.
So the best way is IMHO to manage this column manually (set true or false)
and not use JDO specific method for deletion.
Laurent

Similar Messages

  • Logical delete in database adapter

    Hello
    I was wondering if someone has solution the problem with polling database. You can specify the logical delete column and you can give values for READ, UNREAD and RESERVED states. The problem is that when for example ESB project polls some specific table and starts an instance for every new row with specified logical delete field with value UNREAD, when something unexpected happens and something goes wrong the database adapter updates the row with READ value. This is problematic if we have thousands of rows, and we would like to separate the errored rows from the successfully read rows. Is there anyway (easy) way to update those rows that went wrong to some other value than READ?
    I don't know if anyone understood me, but just for clarification here's a example:
    I have a ESB-project which poll specific database table and parses and XML from the data. After this the ESB-project sends the data to some Web Service. The database table has column CONDITION_CODE in which value 0 means unread and value 1 means read. Now if everything goes fine there is no problems. But if the Web Service is unavailable or the data is malformed, the database adapter still updates the CONDITION_CODE to 1! We have no ways (except to listen ESB_ERROR topic and implement some error handling there) to know what rows were successfully delivered and which were not...
    Hope I was able to clarify the problem... And I hope someone could be able to provide me with answer.
    Best Regards Tuomas

    Did you use the RESERVED value property? How about the transaction mechanism? Do you have global transactions? I gues you would have to use them!

  • Logical delete in a DBAdapter

    Hi,
    I am using a logical delete to poll a table. A simple logic of unproccesed records assigned to 'N', processed ones to 'Y' and locked once to 'X' doesnt seem to work. The process doesnt pickup any inserted records.
    Are any other additional settings required for this logical delete to get working.
    Thanks,
    Valli.

    When you have the table definition which has the primary key defined already, the database adapter directly takes the field and constructs a where condition(update tbl set col1="", col2="" where primarykey=#input) based on the primary key; in this case your input should have the primary key field mapped from the BPEL process!
    If you don't have a primary key defined on that you obviously have to choose one otherwise db adapter will not proceed further and rest all the is the same logic!
    You can also observe that you can't select only few fields for updation as the XML schema generated will have all the columns available in the table. You can simply assign/tranform input data to what ever the fields which require for updation and rest all will not be treated as null but they will have the same value which is already existing in the database!!
    Hope it helps!! ( You can still have a question !! how do I change my primary key if required by the business !! ) - well I have no answer for this yet !!

  • Logical Delete in DB Polling - OSB

    Hello All,
    I have a question in polling. I have a logical delete column with Read value as 'P and unread value as 'N', Unlike BPEL, OSB's polling, does not make a record to 'P' until the process completes successfully. My DB polling adapter polls the same records while the previous instance is under processing or the previous instance ended in error. Is there a way to logically delete the record immediately once the record is read?
    To avoid this scenario, I added an error handler to make the record to 'E' if the instance encountered any error. By the time the error handler kicks in and updates the record, OSB polls the record a few times. I increased my polling frequency from 5 seconds to 30 seconds, but no luck. Any clue how to handle this scenario?
    Thanks,
    Dwarak

    Is there a way to logically delete the record immediately once the record is read?Dont do any logic in db adapter proxy. Instead make the proxy to just write to a jms queue and then have your processing logic in the jms proxy service which reads off the jms queue.

  • How to hide row from table after logical delete

    Hello.
    I am using Jdeveloper 11.1.1.3.0, ADF BC and ADF Faces.
    I want to implement Logical delete in my application.
    In my Entity object I have Deleted attribute and I override the remove() method in my EntityImpl class.
        @Override
        public void remove()
           setDeleted("Y");
        }and I added this condition to my view object
    WHERE NVL(Deleted,'N') <> 'Y'in my page I have a table. this table has a column to delete each row. I dragged and drop RemoveRowWithKey action from the data control
    and set the parameter to *#{row.rowKeyStr}* .
    I what I need is this:
    when the user click the delete button I want to hide the roe from the table. I tried to re-execute the query after the delete but the row is still on the page. Why execute query does not hide the row from the screen.
    here is the code I used for delete and execute query
        public String deleteLogically()
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("removeRowWithKey");
            Object result = operationBinding.execute();
            DCBindingContainer dc=(DCBindingContainer) bindings;
            DCIteratorBinding iter=dc.findIteratorBinding("TakenMaterialsView4Iterator");
            iter.getCurrentRow().setAttribute("Deleted", "Y");
            //iter.getViewObject().executeQuery();
            iter.executeQuery();
            return null;
        }as you see I used two method iter.getViewObject().executeQuery(); and  iter.executeQuery(); but the result is same.

    Thank you Jobinesh.
    I used this method.
        @Override
        protected boolean rowQualifies(ViewRowImpl viewRowImpl)
          Object attrValue =viewRowImpl.getAttribute("Deleted"); 
            if (attrValue != null) { 
             if ("Y".equals(attrValue)) 
                return false; 
             else 
                return true; 
            return super.rowQualifies(viewRowImpl);
        }But I have one drawback for using it, and here is the case:
    If the user clicks the delete button *(no commit)* the row will be hidden in the table, but when the user click cancel changes the row is not returned since it is not returned due to the rowQualifies(ViewRowImpl viewRowImpl) (the Deleted attribute is set to "N" now).
    here is the code for delete and cancel change buttons
        public String deleteLogically()
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding =
                bindings.getOperationBinding("removeRowWithKey");
            Object result = operationBinding.execute();
            DCBindingContainer dc = (DCBindingContainer)bindings;
            DCIteratorBinding iter =
                dc.findIteratorBinding("TakenMaterialsView4Iterator");
            iter.getCurrentRow().setAttribute("Deleted", "Y");
             iter.executeQuery();
            AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
            adfFacesContext.addPartialTarget(this.getTakenMaterialsTable());
            return null;
        public String cancelChanges(String iteratorName)
            System.out.println("begin cancel change");
            BindingContainer bindings =
                BindingContext.getCurrent().getCurrentBindingsEntry();
            DCBindingContainer dc = (DCBindingContainer)bindings;
            DCIteratorBinding iter =
                (DCIteratorBinding)dc.findIteratorBinding(iteratorName);
            ViewObject vo = iter.getViewObject();
            //create a secondary RowSetIterator to avoid disturbing row currency
            RowSetIterator rsi = vo.createRowSetIterator(null);
            //move the currency to the slot before the first row.
            rsi.reset();
            while (rsi.hasNext())
                    currentRow = rsi.next();
                    currentRow.setAttribute("Deleted", "N");
            rsi.closeRowSetIterator();
            iter.executeQuery();
            AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
            adfFacesContext.addPartialTarget(this.getTakenMaterialsTable());
            return null;
        }as example, if the user initially has 8 rows, then deleted 2 rows, in cancelChanges only 6 rows appears. and the deleted rows are not there??
    any suggestion?

  • How to specify custom SQL in polling db adapter with logical delete option

    Hi all,
    I am writing a SOA composite app using JDeveloper SOA Suite 11.1.1.4 connecting to a SQL Server db using a polling DB Adapter with the logical delete option to send data to a BPEL process.
    I have requirements which go beyond what is supported in the JDeveloper UI for DB Adapter polling options, namely:
    * update more than one column to mark each row read, and
    * specify different SQL for the logical delete operation based on whether bpel processing of the data polled was successful or not.
    A complicating factor is that the polling involves two tables. Here is my full use-case:
    1) Polling will select data derived from two tables: e.g. 'headers' and 'details' simplified for this example:
    table: headers
    hid - primary key
    name - data label
    status - 'unprocessed', 'processed', or 'error'
    processedDate - null when data is loaded, set to current datetime when row is processed
    table: details
    hid - foreign key pointed at header.hid
    attr - data attribute name
    value - value of data attribute
    2) There is a many:1 relationship between detail and header rows through the hid columns. The db adapter polling SELECT shall return results from an outer join consisting of one header row and the associated detail rows where header.status = 'unprocessed' and header.hid = details.hid. (This is supported by the Jdeveloper UI)
    3) The polled data will be sent to be processed by a bpel process:
    3.1) If the bpel processing succeeds, the logical delete (UPDATE) operation shall set header.status = 'processed', and header.processedDate = 'getdate()'.
    3.2) If bpel processing fails (e.g. hits a data error while processing the selected data) the logical delete (UPDATE) operation shall set header.status = 'failed', header.processedDate = 'getdate()', and header.errorMsg = '{some text returned from bpel}'.
    Several parts of #3 are not supported by the JDeveloper UI: updating multiple columns to mark the row processed, using getdate() to populate a value of one of those column updates, doing different update operations based on the results of the BPEL processing of the data (success or error), and using data obtained from BPEL processing as a value of those column updates (error message).
    I have found examples which describe specifying custom SQL using the polling delete option to create a template then modifying the toplink file(s) to specify custom select and update SQL to implement a logical delete. (e.g. http://dlimiter.wordpress.com/2009/11/05/advanced-logic-in-oracle-bpel-polling-database-adapter/ and http://myexperienceswithsoa.blogspot.com/2010/06/db-adapter-polling-tricks.html). But none of them match what I've got in my project, in the first case because maybe because I'm using a higher version of JDeveloper, and in the second I think because in my case two tables are involved.
    Any suggestions would be appreciated. Thanks, John

    Hi John,
    You've raised a good scenario.
    First of all let me say that the purpose of the DB polling transaction, is to have an option to initiate a process from a DB table/view and not to update multiple fields in a table (or have other complex manipulation on the table).
    So, when choose to update a field in a record, after reading it, you are "telling" the engine not to poll this record again. Sure, i guess you can find a solution/workaround for it, but I don't think this is the way....
    The question now is what to do?
    You can have another DB adapter where you can update the data after finishing the process. In that case, after reading the data (on polling transaction) - update the header.status = 'processed' for example, and after processing the selected data update the rest of the fields.
    Hope it make some sense to you.
    Arik

  • Issue in workflow - Logically Deleted Scenario

    Hi,
    We have an issue in Journal Entry Workflow. The user has tried to upload a document for Journal Entry Posting. Document is in Parked Status. In the workflow, when it has come to the required step of workflow approval and checks for the document type, it has got logically deleted. Thereby the workflow got terminated.
    Kindly let us know as how to proceed further. What would have been the reason for this automatic logical delete? Mail us the solution regarding the same.
    Regards,
    Veera

    Automatic Logical deletion ! I think this is not possible check with the log of the workitem whose user id is appearing then in the code check weter you have assigned any FM to locially delete the work item which is being trigered by mistake if not just start another WF and proceed with your work.
    Regards
    Bikas

  • Send step in BPM is "logical deleted"

    Hi everybody,
    we are sending IDOCs from BPM to receiver determination (R/3 Backend).
    The BPM protocol marks the send step as "logically deleted".
    In SXMB_MONI strange!
    Sender = Receiver = BPM
    Any ideas?
    Regards Mario

    The required number in the fork was wrong!

  • ORACLE ADF - Performing logical deletes in Oracle ADF

    [http://www.youtube.com/watch?v=zl5QjihrU0k]
    hi..
    i am currently doing a system using oracle adf framework.
    i want to do a process of withdrawing a subject that have been registered by a student, but i don't want to permanently delete the data from the database..i just want to change their GRADE to W for withdrawal process..
    so, i perform a logical deletes and its work fine to me...
    the problem is it does not catch the date of withdrawing the subject..
    i have learn this from a video that i found in youtube...
    from that video, they show me how to catch the date when performing a logical delete..but it wont work for me..
    here is the video :
    [http://www.youtube.com/watch?v=zl5QjihrU0k]
    please help me to find the solution...
    Edited by: 947202 on Jul 18, 2012 1:19 AM
    Edited by: 947202 on Jul 18, 2012 1:21 AM

    thanks for your answer...
    but i already do the steps and it works...
    the problem now is it does not catch the date...
    How to Track Created Dates Using the History Column?
    i already do the steps but still wont work for me...

  • Changes and Logical Delete in View Maintenance

    Hi everybody.
    I've defined a table view maintenance V_TABLE for T_TABLE, with five fields. One of them is defined as 'R' (not editable field).
    I defined an event 05 and an event 02 (for create and save) where I move SY-DATUM to the CREATED_DATE or UPDATE_DATE fields depending on it is a new record or a modification.
    But if I modify several records only one is updated.
    Besides, if the action is "delete" in the view maintenance, it must be a logical delete and move an 'X' to one of the editable fields.
    Can you help me please ?
    I can't see the action for each record in global tables.
    Event f_save  ( 02 )
      IF t_table-created_date IS INITIAL.
        t_table-created_date = sy-datum.
      ELSE.
        t_table-last_upd_date = sy-datum.
      ENDIF.
      MODIFY t_table.
    Event f_new_entry ( 05 )
      t_table-created_date = sy-datum.
    Thanks in advance,
    Liliana.

    Hello Karol, thank you for your answer.
    Now, when  I create new entries and select modify, hidden fields are updated.
    But when I select the delete option, it must be a logical delete, not physical. I must update one field with an 'X', but not delete. Can you help me with this ?
    Below is the include up now.
    FORM f_delete
    TYPES: BEGIN OF t_data.
    INCLUDE STRUCTURE /tenr/t_ppintwc.
    TYPES: action,
    END OF t_data.
    DATA: ls_total   TYPE t_data.
    DATA: lt_total   TYPE TABLE OF t_data.
    DATA: ls_extract TYPE t_data.
    DATA: lt_extract TYPE TABLE OF t_data.
    * get data from table maintenance
    lt_total[] = total[].
    lt_extract[] = extract[].
    LOOP AT lt_total INTO ls_total WHERE action = 'D'.
    IF sy-datum BETWEEN ls_total-begda AND ls_total-endda.
    ls_total-endda = sy-datum.
    IF ls_total-created_date IS INITIAL.
    ls_total-created_date = sy-datum.
    ls_total-created_time = sy-uzeit.
    ls_total-created_by = sy-uname.
    ELSE.
    ls_total-last_upd_date = sy-datum.
    ls_total-last_upd_time = sy-uzeit.
    ls_total-last_upd_by = sy-uname.
    ENDIF.
    ENDIF.
    IF sy-datum < ls_total-begda.
    ls_total-endda = ls_total-begda.
    IF ls_total-created_date IS INITIAL.
    ls_total-created_date = sy-datum.
    ls_total-created_time = sy-uzeit.
    ls_total-created_by = sy-uname.
    ELSE.
    ls_total-last_upd_date = sy-datum.
    ls_total-last_upd_time = sy-uzeit.
    ls_total-last_upd_by = sy-uname.
    ENDIF.
    ENDIF.
    MODIFY lt_total FROM ls_total.
    total[] = lt_total[].
    append ls_total to lt_extract.
    extract[] = lt_extract[].
    ENDLOOP.
    ENDFORM.                    " F_DELETE
    Thanks in advance.
    Liliana.
    Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 3:12 PM

  • Logical delete in DB adapter with 2 columns to update

    Hi',
    I am using Oracle SOA 11G.
    I am polling a DB table and after reading the data I have to update 2 columns.
    With logical delete we can update 1 field, is it possible to update 2 fields.
    If Yes, then I have to update the first column BPEL_FLAG = R and BPEL_TIME = currentTime()
    Please advice,
    Thanks
    Yatan

    Hi Yatan,
    Came across the possible solution at this link.
    Could not try and validate though.
    http://myexperienceswithsoa.blogspot.in/2010/06/db-adapter-polling-tricks.html
    Please try and let us know if it works.
    Thanks,
    Deepak.

  • Logical delete flag in fixed assets extract

    I have to create a flat file of Fixed Assets data. I am asked to put the 'Logical Delete Flag' in it. My data will be based on the t.code AR01(report RABEST_ALV01). It uses the logical database ADA. My question is where can i find the logical delete flag and what does this field exactly mean?
    Plz reply soon

    I m closing this thread as I found the answer to it. An asset is never physically deleted in the system. But it can be marked for deletion(logical deletion).

  • Database Adapter using Logical Delete Polling Strategy not updating field

    I have an ESB database adapter defined against a table. The adapter is set to use the Logical Delete Polling Strategy, and the table has an extra column defined as the "delete" field. When I register the adapter to the ESB and add a record to the table, the adapter reads the contents of the record as expected. However, 15 seconds later (that being the polling interval) it reads it again, and again 15 seconds after that, ad infinitum.
    I have defined the logical delete field as a single character field and set the Read value for "T" (a record is normally inserted with that field having a null value). Results as outlined in the previous paragraph. I redefined the field as a number and set the Read value to "1" (with a record normally inserted with that field having a value of "0"). Results as outlined in the previous paragraph.
    Apparently the update of the logical delete value to the Read value is not occurring. My question (obviously) is: Why?
    Thanks for your time.

    Here is the adapter WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    name="Poll_PM_LOG"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/Poll_PM_LOG/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/Poll_PM_LOG/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/PollPMLOG"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/PollPMLOG"
    schemaLocation="PollPMLOG_table.xsd"/>
    </schema>
    </types>
    <message name="LogCollection_msg">
    <part name="LogCollection" element="top:LogCollection"/>
    </message>
    <portType name="Poll_PM_LOG_ptt">
    <operation name="receive">
    <input message="tns:LogCollection_msg"/>
    </operation>
    </portType>
    <binding name="Poll_PM_LOG_binding" type="tns:Poll_PM_LOG_ptt">
    <pc:inbound_binding/>
    <operation name="receive">
    <jca:operation
    ActivationSpec="oracle.tip.adapter.db.DBActivationSpec"
    DescriptorName="PollPMLOG.Log"
    QueryName="Poll_PM_LOG"
    PollingStrategyName="LogicalDeletePollingStrategy"
    MarkReadFieldName="PROCESSED"
    MarkReadValue="T"
    SequencingFieldName="ID"
    MaxRaiseSize="1"
    MaxTransactionSize="unlimited"
    PollingInterval="15"
    NumberOfThreads="1"
    UseBatchDestroy="false"
    ReturnSingleResultSet="false"
    MappingsMetaDataURL="PollPMLOG_toplink_mappings.xml" />
    <input/>
    </operation>
    </binding>
    <service name="Poll_PM_LOG">
    <port name="Poll_PM_LOG_pt" binding="tns:Poll_PM_LOG_binding">
    <jca:address location="eis/DB/PM"
    UIConnectionName="PM"
    ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
    />
    </port>
    </service>
    <plt:partnerLinkType name="Poll_PM_LOG_plt" >
    <plt:role name="Poll_PM_LOG_role" >
    <plt:portType name="tns:Poll_PM_LOG_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    The field PROCESSED is defined as CHAR(1), and is normally null when a record is inserted. The value of the field is to be set to 'T' when the record is read by the polling adapter.

  • Database Adapter Logical Delete Not Working....

    Hi,
    I have an issue with the DB Adapter under BPEL GA 10.1.3.1. I'm trying to do a logical delete on a table however the logical delete isn't updating the records to show that they've been processed.
    I've created a simple test case with a 3 column table sitting in Oracle XE DB with the third column containing the logical delete flag. I've created a new process consisting of a DB Adapter partnerlink and a receive. In the logs (below) I can see the Select statement followed by the Update (logical delete) occurring but the Update statement just actually run against the DB. I can copy the update statement and run this through SQL as the same DB user and it updates the records.
    Has anyone seen this before?
    Thanks.
    <2006-11-13 15:06:30,901> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> client acquired
    <2006-11-13 15:06:30,917> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> SELECT A, B, C FROM F_TABLE WHERE (C = ?)
         bind => [IN]
    <2006-11-13 15:06:30,917> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> client acquired
    <2006-11-13 15:06:30,917> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> TX beginTransaction, status=NO_TRANSACTION
    <2006-11-13 15:06:30,917> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> TX Internally starting
    <2006-11-13 15:06:30,917> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> external transaction has begun internally
    <2006-11-13 15:06:30,917> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.DBAdapterConstants isElementFormDefaultQualified> Element is FTABLE namespace is http://xmlns.oracle.com/pcbpel/adapter/db/top/ReadTABLE
    <2006-11-13 15:06:30,933> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.ox.O_XParser parse> Transforming the row(s) [<FTABLE Record A />, <FTABLE Record B />, <FTABLE Record C />] read from the database into xml.
    <2006-11-13 15:06:30,933> <DEBUG> <default.collaxa.cube.activation> <AdapterFramework::Inbound> [Read_TABLE_ptt::receive(FTABLECollection)]Posting inbound JCA message to BPEL Process 'Read_TABLE' receive activity:
    <FTABLECollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/ReadTABLE">
    <FTABLE>
    <a>Record</a>
    <b>A</b>
    <c>IN</c>
    </FTABLE>
    <FTABLE>
    <a>Record/a>
    <b>B</b>
    <c>IN</c>
    </FTABLE>
    <FTABLE>
    <a>Record</a>
    <b>C</b>
    <c>IN</c>
    </FTABLE>
    </FTABLECollection>
    <2006-11-13 15:06:30,933> <DEBUG> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Delivery Thread 'JCA-work-instance:Database Adapter-6 performing unsynchronized post() to localhost
    <2006-11-13 15:06:31,073> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> Begin batch statements
    <2006-11-13 15:06:31,073> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> UPDATE F_TABLE SET C = ? WHERE ((A = ?) AND (B = ?))
    <2006-11-13 15:06:31,073> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log>      bind => [OUT, Record, A]
    <2006-11-13 15:06:31,073> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log>      bind => [OUT, Record, B]
    <2006-11-13 15:06:31,073> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log>      bind => [OUT, Record, C]
    <2006-11-13 15:06:31,073> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> End Batch Statements
    <2006-11-13 15:06:31,073> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> TX commitTransaction, status=STATUS_ACTIVE
    <2006-11-13 15:06:31,073> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> TX Internally committing
    <2006-11-13 15:06:31,323> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> external transaction has committed internally
    <2006-11-13 15:06:31,323> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> client released
    <2006-11-13 15:06:31,323> <DEBUG> <default.collaxa.cube.activation> <AdapterFramework::Inbound> onBatchBegin: Batch 'bpel___localhost_default_Read_TABLE_1_4__1163389596916.ReadTABLE.FTABLE1163394391323' (bpel___localhost_default_Read_TABLE_1_4__1163389596916.ReadTABLE.FTABLE1163394391323) starting...
    <2006-11-13 15:06:31,323> <DEBUG> <default.collaxa.cube.activation> <AdapterFramework::Inbound> onBatchComplete: Batch 'bpel___localhost_default_Read_TABLE_1_4__1163389596916.ReadTABLE.FTABLE1163394391323' (bpel___localhost_default_Read_TABLE_1_4__1163389596916.ReadTABLE.FTABLE1163394391323) has completed - final size = 3
    <2006-11-13 15:06:31,323> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> client released
    <2006-11-13 15:06:31,339> <DEBUG> <default.collaxa.cube.engine.bpel> <BPELExecution::Read_TABLE> entering <scope> at line [no line]
    <2006-11-13 15:06:31,339> <DEBUG> <default.collaxa.cube.engine.bpel> <BPELExecution::Read_TABLE> entering <scope> at line [no line]
    <2006-11-13 15:06:31,339> <DEBUG> <default.collaxa.cube.engine.bpel> <BPELExecution::Read_TABLE> entering <sequence> at line 55
    <2006-11-13 15:06:31,339> <DEBUG> <default.collaxa.cube.engine.bpel> <BPELExecution::Read_TABLE> entering <sequence> at line 55
    <2006-11-13 15:06:31,339> <DEBUG> <default.collaxa.cube.engine.bpel> <BPELEntryReceiveWMP::Read_TABLE> executing <receive> at line 58
    <2006-11-13 15:06:31,339> <DEBUG> <default.collaxa.cube.engine.bpel> <BPELEntryReceiveWMP::Read_TABLE> set variable 'Read_TABLE_receive_InputVariable' to be readOnly, payload ref {FTABLECollection=108e2d22815529ac:-3067a9ff:10edf296212:-78da}
    <2006-11-13 15:06:31,339> <DEBUG> <default.collaxa.cube.engine.bpel> <BPELEntryReceiveWMP::Read_TABLE> variable 'Read_TABLE_receive_InputVariable' content {FTABLECollection=oracle.xml.parser.v2.XMLElement@1303465}
    <2006-11-13 15:06:31,339> <DEBUG> <default.collaxa.cube.engine.bpel> <BPELInvokeWMP::Read_TABLE> executing <invoke> at line 61

    Hi,
    I haven't yet used 10.1.3, but we had a number of issues under 10.1.2.0.2 around caching and upd/ins/del.
    A number of things we changed were
    - set usesBatchWriting to false in oc4j-ra.xml file
    - set identityMap to NoIdentityMap via toplink work bench
    - set should-always-refresh-cache-on-remote,should-disable-cache-hits,should-disable-cache-hits-on-remote to true in toplink mappings.xml file (note this last one is only if toplink was not used to insert the source data).
    Ashley

  • Databse polling without using logical delete or physical delete

    Hi all,
    Without using logical delete or physical delete how can i poll to the database????
    Thanks
    Phani

    Whatever table are you interested in polling, have a duplicate table for it. Whenever an event (update, delete, insert etc) happens on the source table, fire a trigger to perform that activity in your dup table. Now, from the other tier poll a query for a change. Once the change is consumed clear the dup table.
    Hope this help!
    Regards,
    Yousuf Baig

  • Duplicate processing by DBAdapter when using Distributed Polling with Logical Delete Strategy

    We have DBAdapter based polling services in OSB running across two Active-Active clusters (total 20 managed service across 2 clusters),
    listening to the same database table. (Both clusters read from the same source DB). We want to ensure distributed polling without duplication,
    hence in the DBAdapter we have selected Distributed Polling option, meaning we are using "Select For Update Skip Locking".
    But we see that sometimes, same rows are processed by two different nodes and transactions are processed twice.
    How do we ensure that only one managed server processes a particular row using select for update? We do not want to use the markReservedValue option which was preferred in older version of DBAdapter.
    We are using following values in DB Adapter configuration, the Jdev project for DBAdapter and the OSB proxy using DBAdapter are attached.
    LogicalDeletePolling Strategy
    MarkReadValue = Processed
    MarkUnreadValue = Initiate
    MarkReservedValue = <empty as we are using Skip Locking>
    PollingFrequency = 1 second
    maxRaiseSize = 1
    MaxTransactionSize = 10
    DistributionPolling = checked   (adds lock-n-wait in properties file and changes the SQL to SELECT FOR UPDATE SKIP LOCKED)
    Thanks and Regards

    Hi All,
    Actually I'm also facing the same problem.
    Step I follwed:
    1) Created a job_table in database
    create talbe job_table(id, job_name, job_desc, job_status)
    2)created a bpel process to test the Inbound distributed polling.
    3)Configure the DBAdapter for polling.
    a)update a field in the job_table with logical delete.
    b)select the field name form the drop down
    c) change the read value-->Inprogress and unRead value--->Ready
    d) dont change the value for Reserved value
    e) select the check box for "distributed polling".
    f) the query will be appended with "For update NoWait."
    g)click next and then finish.
    4) Then i followed the below steps.
    To enable pessimistic locking, run through the wizard once to create an inbound polling query. In the Applications Navigator window, expand Application Sources, then TopLink, and click TopLink Mappings. In the Structure window, click the table name. In Diagram View, click the following tabs: TopLink Mappings, Queries, Named Queries, Options; then the Advanced… button, and then Pessimistic Locking and Acquire Locks. You see the message, "Set Refresh Identity Map Results?" If a query uses pessimistic locking, it must refresh the identity map results. Click OK when you see the message, "Would you like us to set Refresh Identity Map Results and Refresh Remote Identity Map Results to true?Ó Run the wizard again to regenerate everything. In the new toplink_mappings.xml file, you see something like this for the query: <lock-mode>1</lock-mode>.
    5) lock-mose is not changed to 1 in toplink_mappingss.xml
    Can we edit the toplink_mappings.xml manually.
    If yes, what allt he values Ineed to change in toplink_mappings.xml file, so that it will not pick the same record for the multiple times in clustered environment.
    Please help me out this is urgent.
    Thanking you in advance.

Maybe you are looking for