Database Adapter Polling

I am using Jdeveloper 10.1.3.1.0 to do the database polling. The adapter polls two tables joined by the foreign key.Then it will update the status code as logic deletion. However, when I tried to set the database rows per xml document to 1 on step 10 of 11 of the polling options. However, when I tried to set database row per transaction to 50, it won't allow me. My understanding is that this 50 will set the database commit every 50 records. The wizard basically stopped there. Only after I changed it to unlimited, it proceeded.Can anybody help me?

Hi,
The triggering instances will not depend on the Database rows/transaction but will only depend on the Database rows/xml document.
Database rows/transaction is internal to the DB and the DB adapter.
If u keep Database rows/transaction as 200 and no. of rows/ xml document as 100 and 1000 rows are to be processed, then it will create 10 instances.
However if you have 1000 rows for processing DB adapter will run a cursor in a loop to pick up 200 rows from the 1000
rows 5 times (this is a batch setting between DB and the DB adapter and will distribute the load of picking 1000 rows at a time into 5 transactions) and then these 200 rows will be distributed into 2 BPEL instances of 100 rows (this is a batch setting between DB adapter and BPEL).
Hope this clarifies.
With Regards,
Harshwardhan

Similar Messages

  • Database Adapter Polling, Instances in Running State

    Hello All,
    I have a composite in which the database adapter is a service (polling a table in SQL Server). Sometimes, when instances gets created, like 2 instances are being in a running state and not being completed at all. we terminated the instances last 2 times, and this scenario is being repeated again. If i click the instance which is running, i can only see the service which says it is completed, no BPEL component is being seen, can anyone faced this issue before ? why this is happening ?
    Please help....
    Naresh

    Could you provide more insight on how you wired the adapter and BPEL process inside the composite? What does the BPEL look like? You could add a BPEL component that persists some stuff just for test purposes. That could give you more feedback from the console.
    hth,
    Peter Paul

  • Oracle database Adapter polling in OSB Cluster

    Hi,
    I have OSB 11g with two nodes. I have a database adapter that polls a table after every 30 seconds and perform logical delete on the rows read. I came across interesting situation. When one node is up and PollingInterval=30, it works okay and polling is done right after 30 seconds but when both nodes are up the PollingInterval property doesnt work as expected.
    First node will poll after 24 seconds and then second node will again poll after 6 seconds (node1+node2=30 seconds in total).
    and After i restart the servers the first node is polling at 18 sec and second node is polling at 12 sec (node1 +node2=30 sec), so different polling intervals.
    How does it determines the first server should poll at 24 or 18 sec and second node should poll at 6 or 12 sec?
    I would like to know is there any property or configuration required to poll the table for each node for every 15 seconds (node1(15sec)+node2(15sec)=30 sec)?
    Please help me, It is very urgent?
    Thanks
    Rajesh.

    Hi,
          If any one has the same issue, please let me know.
    Also if you know the solution, can you please update here, it's very helpful for me.
    Thanks,
    Rejesh.

  • Jdev Database Adapter - polling updated rows

    Hello, I have a question reguarding the polling strategy available in the database adapter.
    I set it up and it works great with new inserted rows in the table.
    However, it doesn´t capture the updated rows!
    For instance, i have the following table:
    ID - NAME - AGE
    1 -John- 21
    2 -Mary- 25
    When I insert a new row, it is captured by comparing the last captured ID in the sequencing file.
    ID - NAME - AGE
    1 -John- 21
    2 -Mary- 25
    3 -Cindy- 20 <--------- New row
    But when i UPDATE an already existing row, it doesnt load the changed row!
    ID - NAME - AGE
    1 -John- 26 <----------- Age changed, but polling doesnt recognize it!
    2 -Mary- 25
    3 -Cindy- 20
    Is there a way to get this to work? Should I set an special option? Thank you very much.
    Im using jdeveloper 11g.

    Hi John, it depends on which type of polling strategy you are using to poll the new/updated records. You must have the necessary previleges to add the special field and creat triggers or your db team must have.
    i.Physical delete polling strategy: Cannot capture the UPDATE operations on the table.This because when the adapter listens to the table, when ever a record is polled, that record is deleted after the polling process. After polling the records, if it is not deleted, then the adapter knows that it’s a updated one but here when a record is polled, it is deleted. So when an adapter encounters a record, it’s a new record to the adapter though the record is updated before the polling cycle). So physical delete cannot capture UPDATED records.
    ii. Logical delete polling strategy: The logical delete polling strategy updates a special field of the table after processing each row (updates the where clause at runtime to filter out processed rows).The status column must be marked as processed after polling and the read value must be provided while configuring the adapter. Modified where clause and post-read values are handled automatically by the db adapter.
    Usage:
    <operation name="receive">
    <jca:operation
    ActivationSpec="oracle.tip.adapter.db.DBActivationSpec"
    PollingStrategyName="LogicalDeletePollingStrategy"
    MarkReadField="STATUS"
    MarkReadValue="PROCESSED"
    This polling strategy captures the updated records only if triggers are added.This is because when the record is polled, its status is updated to 'PROCESSED'. To capture this record if its updated, its status has to be 'UNPROCESSED'. So a trigger has to be added to update the status field to 'UNPROCESSED' whenever the record is updated. Below is the example.
    Ex:
    CREATE OR REPLACE TRIGGER nameOftrigger_modified
    BEFORE UPDATE ON table_name
    REFERENCING NEW AS modifiedRow
    FOR EACH ROW
    BEGIN
    *:modifiedRow.STATUS :='UNPROCESSED';*
    END;
    In this example, STATUS is the special field(of the polling table). When the record is updated, the trigger gets fired and updates the STATUS field to 'UNPROCESSED'. So when the table is polled, as this record's status is Unprocessed, this record ll be captured during polling.
    Other polling strategeis like "Sequencing Table Last Updated","Sequencing Table Last-Read Id" Polling strategy,etc also can be used to capture the updated records. In these strategies also, you need to add the triggers like the above. These need an extra helping table also to poll.
    Logical delete polling strategy is good enough to poll the updated records.
    Hope this helps.
    Thank you.

  • Database Adapter Poll doubt

    My requirement is, when ever a new recored inserted to CREDITCARDINFOPARENT table need to insert the same record to CREDITCARDINFORESULT;
    desc CREDITCARDINFOPARENT;
    Name Null? Type
    SNO NUMBER
    SSN NOT NULL VARCHAR2(15)
    FIRST_NAME VARCHAR2(30)
    LAST_NAME VARCHAR2(30)
    CCNUMBER NOT NULL VARCHAR2(20)
    CREDITRATING NUMBER
    STATUS NOT NULL VARCHAR2(20)
    CCNumber is my primary key
    desc CREDITCARDINFORESULT;
    Name Null? Type
    NO NUMBER
    SN NOT NULL VARCHAR2(15)
    FIRSTNAME VARCHAR2(30)
    LASTNAME VARCHAR2(30)
    CCNUMBER VARCHAR2(20)
    CRATING NUMBER
    CCSTATUS NOT NULL VARCHAR2(20)
    CCNUMBER is Foreign Key.
    I tried Poll DB adapter example in the following way
    Created a project with "Composite with Mediator"
    under exposed services I dragged DB Adapter
    Service Name-> Example Service
    Step 4 of 13 -> selected Poll or Changed Records in a table
    step 5 of 13 -> imported 2 tables (CREDITCARDINFOPARENT, CREDITCARDINFORESULT)
    step 6 of 13 -> displayed the Relationships
    step 8 of 13 -> After Read -> selected Update a Sequencing Table
    step 9 of 13 -> Sequencing Table: CREDITCARDINFORESULT
         Sequence Name Field: CCNUMBER
         Sequence Value Field: STATUS
         Sequence ID Field: CCNUMBER
    step 10 of 13 -> Polling Options: SQL
              Pre Polling SQL:
    SELECT STATUS FROM CREDITCARDINFORESULT WHERE (CCNUMBER = 'CREDITCARDINFOPARENT')
    Polling SQL:
    SELECT SNO, SSN, FIRST_NAME, LAST_NAME, CCNUMBER, CREDITRATING, STATUS FROM CREDITCARDINFOPARENT WHERE ((STATUS = 'VALID') AND (CCNUMBER > #STATUS)) ORDER BY CCNUMBER ASC
    After Read SQL:
    UPDATE CREDITCARDINFORESULT SET STATUS = #STATUS WHERE (CCNUMBER = 'CREDITCARDINFOPARENT')
    step 11 of 13 ->Define Selection Criteria:
              Parameters:ccno
              SQL: SELECT SNO, SSN, FIRST_NAME, LAST_NAME, CCNUMBER, CREDITRATING, STATUS FROM CREDITCARDINFOPARENT WHERE ((STATUS = 'VALID') AND (CCNUMBER > #STATUS)) ORDER BY CCNUMBER ASC
    Under External Services : I dragged DB Adapter and i selected Perform an Operation on a table as Insert Only. and I imported CREDITCARDINFORESULT
    I deployed the the Project. Project depolyed successfully;
    under EnterpriseManager command prompt I got
    <Jun 29, 2010 2:25:46 PM IST> <Warning> <oracle.soa.adapter> <BEA-000000> <JCABinding=> ExampleProject JNDI lookup of 'eis/DB/soademodatabase' f
    ailed due to: Unable to resolve 'eis.DB.soademodatabase'. Resolved 'eis.DB'>
    <Jun 29, 2010 2:25:46 PM IST> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> ExampleProject Error while performing endpoint Activation:
    BINDING.JCA-12561
    JCA Resource Adapter location error (WebLogic).
    Unable to locate the JCA Resource Adapter via .jca binding file element <connection-factory/>
    The JCA Binding Component is unable to startup the Resource Adapter specified in the <connection-factory/> element: location='eis/DB/soademodata
    base'.
    The reason for this is most likely that either
    1) the Resource Adapters RAR file has not been deployed successfully to the WebLogic J2EE Application server or
    2) the JNDI <jndi-name> setting in the WebLogic JCA deployment descriptor has not been set to eis/DB/soademodatabase. In the last case you might
    have to add a new 'connector-factory' entry (connection) to the deployment descriptor.
    Please correct this and then restart the WebLogic Application Server
    >
    I confugired the Connection factory properly; I checked at DB Adapter -> Configuration -> Outbound Connection Pools -> xADataSourceName -     jdbc/soadeoDatabase
    when I checked at JNDI tree I dont have any value under it.
    in Firefox EM, when I clicked on Example Project Test button is disabled. and I inserted one record to CREDITCARDINFOPARENT; but CREDITCARDINFORESULT table is not updated.
    can any body help me in this?
    Please let me know whether I follwed correct procedure or not?
    If I am wrong, please provide me the correct steps.
    Thanks in Advance.

    This error is usually raised if there is no outbound pool connections with the "eis/db/soademodata" name in the database adapter.
    First create a data source to the database in the JDBC Resources.
    Next in Weblogic server console --> Deployments --> DBAdapter --> Configurations --> Outbound Pool Connections --> create a new outbound pool connection with the name "eis/db/soademodata".
    Now update the "xADataSourceName" property of this connection pool with the JNDI name of the datasource created in the first step.
    Regards,
    KSN Pavan
    Edited by: KSN Pavan on Jun 30, 2010 2:51 AM

  • Database Adapter - Polling updated rows

    Hello, I have a question reguarding the polling strategy available in the database adapter.
    I set it up and it works great with new inserted rows in the table.
    However, it doesn´t capture the updated rows!
    For instance, i have the following table:
    ID - NAME - AGE
    1 -John- 21
    2 -Mary- 25
    When I insert a new row, it is captured by comparing the last captured ID in the sequencing file.
    ID - NAME - AGE
    1 -John- 21
    2 -Mary- 25
    3 -Cindy- 20 <--------- New row
    But when i UPDATE an already existing row, it doesnt load the changed row!
    ID - NAME - AGE
    1 -John- 26 <----------- Age changed, but polling doesnt recognize it!
    2 -Mary- 25
    3 -Cindy- 20
    Is there a way to get this to work? Should I set an special option? Thank you very much.
    Im using jdeveloper 11g.

    Hi John,
    I guess you're talking about BPEL? If so, try the BPEL forum for a better response.
    Best,
    John

  • Database Adapter Polling problem

    Hi All,
    The polling option is processing all the rows in a table at a time instead of using polling frequency. I have used an option of update a field (logical delete) where I have initialized unread value='N' and read value='Y'. Now ,the problem is i have to poll a single row from the table for every 60 seconds ( second row should be processed only after 60 seconds), but all the rows are processing at a same time. Can somebody let me know what could be the problem?
    The options that I set in db adapter are:
    Polling Frequency: 60 seconds
    Database &rows per XML Document: 1
    Database Rows per transaction: 1
    JDBC options , Query & Timeout: 60
    Thanks,

    Hi Vlad,
    please find the jca file
    <endpoint-activation portType="PollEvent_ptt" operation="receive">
    <activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
    <property name="DescriptorName" value="PollEvent.HolxSrEventData"/>
    <property name="QueryName" value="PollEventSelect"/>
    <property name="MappingsMetaDataURL" value="PollEvent-or-mappings.xml"/>
    <property name="PollingStrategy" value="LogicalDeletePollingStrategy"/>
    <property name="MarkReadColumn" value="PROCESSED_FLAG"/>
    <property name="MarkReadValue" value="Y"/>
    <property name="MarkUnreadValue" value="Yes"/>
    <property name="PollingInterval" value="60"/>
    <property name="MaxRaiseSize" value="1"/>
    <property name="MaxTransactionSize" value="1"/>
    <property name="NumberOfThreads" value="1"/>
    <property name="ReturnSingleResultSet" value="false"/>
    <property name="SequencingColumn" value="INCIDENT_ID"/>
    <property name="DelayCommit" value="true"/>
    </activation-spec>
    </endpoint-activation>

  • Database Adapter Polling 100 large size messages at one time.

    We have a BPEL process which polls a header & detail table on a Oracle DB.
    Typically we are having a scenario that we have around 1000 detail line items for each header.In the night when we start the process we have around 100 such headers each having 1000 detail lines.
    We have configured the adapter in following way.Hence according to us having MaxRaiseSize="1" will create individual instace for each row that adapter fetches.is that correct?
    We do get one instace per header in console.
    Currently when we run the interface with 3 headers + each having 3000 details BPEL works fine.
    But when i increase the load to have 50 headers + each having 3000 details , i dont see messages coming to BPEL console & also BPEL goes down & comes up on its own.
    While i was monitoring it i saw that invoke_message table in dehydration store was fetching the records from messages from DB & gradually creating rows in the table & after like 30 mins it stopped we were getting internal server error on BPEL console and then it comes up on its own after some time & again rows are added in the invoke_message.
    Althoug out of 100 instances that i think i should get, i see just 2 created in spam of almost 2 hrs.
    My question is how can make this processing faster ? can configure something in DB adapter liek increase numberofthreads or something wich willmake the processing faster?
    Any idea how BPEL works in this scenario?
    Appreciate if someone can help me in this regard.
    Thanks
    **&lt;binding name="DBRMSTransferPoll_binding" type="tns:DBRMSTransferPoll_ptt"&gt;*
    *&lt;pc:inbound_binding/&gt;*
    *&lt;operation name="receive"&gt;*
    *&lt;jca:operation*
    ActivationSpec="oracle.tip.adapter.db.DBActivationSpec"
    DescriptorName="DBRMSTransferPoll.XxlcbTsfHdrV"
    QueryName="DBRMSTransferPoll"
    PollingStrategyName="SequencingPollingStrategy"
    SequencingFieldName="LAST_UPDATE_DATETIME"
    SequencingFieldType="java.sql.Timestamp"
    SequencingTableNameFieldValue="TSF_HDR_V"
    SequencingTableName="SEQUENCING_HELPER"
    SequencingTableNameFieldName="TABLE_NAME"
    SequencingTableValueFieldName="LAST_READ_DATE"
    MaxRaiseSize="1"
    MaxTransactionSize="unlimited"
    PollingInterval="5400"
    NumberOfThreads="1"
    DelayCommit="false"
    PollForChildUpdates="true"
    ReturnSingleResultSet="false"
    MappingsMetaDataURL="DBRMSTransferPoll_toplink_mappings.xml" /&gt;
    *&lt;input/&gt;*
    *&lt;/operation&gt;*
    *&lt;/binding&gt;**

    The issue you are facing is memory. SOA Suite is not really designed to handle large payloads because of this issue.
    What I would do in the first instance is shorten the frequency so you are only selecting a small number of rows at a time. This may not have an impact because the data maybe produced via a batch program so you will always get these large volumes.
    What you could do is just select the header still using the MaxRaiseSize="1" so you get just one instance per header but then you select the lines via a db adapter in the BPEL process.
    The other option is to have some other mechanism that invokes the process with the full payload, e.g. setup a DB schedule that runs PL/SQL selects the data and places it on a AQ.
    cheers
    James

  • Database Adapter Polling - Setting arguments in runtime

    Hi!
    I have a bpel-process with a DB-adapter that polls a table for new records every 10 second. I have a Where clause for the Select query, that reacts on all new records where the first argument (a field in the table) is equal to the second argument that is a literal value that will be hardcoded in the adapter.
    But in the future it might be possible that the second argument might change and I want to be able to edit that without redeploying the process. Is there anyway I could set the second argument as a parameter and change it in run-time, as a property in the BPEL console for example?

    DB Adapter does not have possibility to change toplink mappings in runtime :-(
    But maybe you can move this adapter to separate process (or even to ESB flow)which will be responsible just for receiving the data from DB and this process will call your main process. In future you will change just this small process and not the main one. Could be a workaround.

  • Rollback in database adapter with delete polling strategy

    Hi All,
    We have designed a database adapter with "Delete the Rows That Were Read" after read strategy with auto-retry attempts as 5. In BPEL process, where we are receiving the DB records, we are throwing a rollback fault in case of any fault.
    Database adapter polling is being re-tried 5 times in case of faults but the data is being deleted from the tables after 5 retries. Is this is the expected behavior of DB adapter? Doesn't the rollback fault rollback the complete transaction and leave the failed data back in the tables?
    Can any one provide more information on this polling strategy after the number of auto-retries are completed?.
    Thanks.
    -Pavan

    You need to include your bpel process in the same DB adapter transaction
    Use the following properties in the bpel component to do this
    <property name="bpel.config.transaction" type="xs:string" many="false">requiresNew</property>
        <property name="bpel.config.oneWayDeliveryPolicy" type="xs:string"
                  many="false">sync</property>
    Make sure the connection factory that you are using in the DB adapter is XA transaction enabled

  • Database Adapter Advanced Polling Technique

    I would like to create a polling database adapter on an SOA application. The data is statistical and changes frequently. I have developed the SQL in sqldeveloper to get the data (hard part done, or so I thought). I would like the adapter to poll the database with this query and fetch the results. I plan to use a sequential table to keep track of the fields at a separate database. Now, I understand I could turn the SQL script into a view and have the database adapter poll the view. However, my requirements are that the process be as unobtrusive to the database as possible. In other words: they do not want me to put that view on the database. So, my question is: has anyone created a database adapter polling mechanism that can execute a pure SQL select statement such as the one i have created. Of course, the SQL script is rather complex and it cannot be implemented using the TopLink commands on the database adapter wizard in jDeveloper. Does anyone know of a way i can do this? and if so, how? Thanks in advance.

    Could you provide more insight on how you wired the adapter and BPEL process inside the composite? What does the BPEL look like? You could add a BPEL component that persists some stuff just for test purposes. That could give you more feedback from the console.
    hth,
    Peter Paul

  • BPEL: invalid namespace error with DB adapter polling and java embedding

    Hello
    I'm using bpel 10.1.3.1.0, and I'm experiencing the following problem: I'm am not able to use the SetTitle() function in a process which polls for records using the db adapter.
    Steps to reproduce the problem:
    - I create a very simple bpel process which poll for records in a table.
    - I deploy it, write manually a record in the polled table and the process start.
    - I can see the record picked up through the visual flow in the console
    - everything looks ok and the process ends correctly
    - now I add a java embedding activities just after the receive
    - I set the instance title like this: setTitle("Go");
    - redeploy, write a record in the polled table and the process start.
    - but the process ends in error with the following message "XMLDOMException has been thrown. invalid namespace for prefix xmlns"
    And there is no way to make it work. Consider:
    If I put the same java embedding activity in another process, for example a simple asynchronous process which just copy the input to the output, and I run from the console, the instance title is set as I want ("Go")
    If I remove the three lines from the polling process
    <bpelx:exec name="Java_Embedding_1" language="java" version="1.3">
    <![CDATA[setTitle("Go");]]>
    </bpelx:exec>
    then the process is executed correctly again. I add them again and then namespace error.
    Whatever statement I put in the java embedding activity (for example a string concatenation or even just a comment I have the same result: invalid namespace for prefix xmlns.
    Does anybody has a suggestion to evercome the problem? I need to set the title because its a mess to find out which instance processed a specific record.
    Thanks by
    Paolo

    I made a lot of further tests, and I can say the problem is related only to the database adapter polling mechanism.
    If I create an asynchronous process, with any kind of database activity (for example select) I can set the title normally.
    If I create a process which start with database table polling, then I cannot use the java embedding.
    try this:
    - create BPEL empty project
    - drop a database adapter service and follow the wizard:
    - select a connection (I tried both oracle or sqlserver connection)
    - select "poll for new or changed record"
    - select any table empty or with few record inside (1 or 2)
    - press next 4 times
    - chose delete record after read (press next)
    - chose order by "no ordering" in polling options (press next 2 times)
    - now drop a receive activity on the process, and connect with the polling partner link
    - drop a java embedding and write any valid java statement
    - deploy; if the table is empty, write a recod in the table
    - the process is instantiated, but the it fails in the --> receive <-- activity with "invalid namespace" error

  • Use of current time for polling Database Adapter query

    I am writing a simple BPEL process with a Polling Database Adapter and a Recieve. The idea is that we are polling an XE database for any entries in a TRIP table which have an expiration date/time field that has passed.
    The Adapter was build using JDeveloper 10.1.3.2 (with Oracle Application Server patched to 10.1.3.3.0) as a "Poll for New Changed Records in a Table" Operation type with a STATUS field (0 for live, 1 for expired) as the Logical Delete Field.
    I was unable to find a way to generate a SELECT query expression with the wizard that would allow me to use current/system time as an attribute, so I finished the wizard and edited the Toplink Descriptor to use a custom SQL expression for the query. This resulted in the following code in the toplink_mappings.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)"
    xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>ExpiredTripPoller</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>ExpiredTripPoller.Trip</opm:class>
    <opm:alias>Trip</opm:alias>
    <opm:primary-key>
    <opm:field table="TRIP" name="ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="ExpiredTripPoller" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:call xsi:type="toplink:sql-call">
    <toplink:sql>SELECT ID, LPN, START_TIME, EXPIRY_TIME, STATUS FROM TRIP WHERE ((STATUS = '0') AND (EXPIRY_TIME < SYSDATE)) ORDER BY EXPIRY_TIME ASC</toplink:sql>
    </toplink:call>
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    <opm:query name="findAllTrip" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    <toplink:does-exist-query xsi:type="toplink:does-exist-query">
    <toplink:existence-check>check-database</toplink:existence-check>
    </toplink:does-exist-query>
    <toplink:read-all-query xsi:type="toplink:read-all-query">
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </toplink:read-all-query>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TRIP" name="ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.math.BigDecimal</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>lpn</opm:attribute-name>
    <opm:field table="TRIP" name="LPN" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>startTime</opm:attribute-name>
    <opm:field table="TRIP" name="START_TIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>expiryTime</opm:attribute-name>
    <opm:field table="TRIP" name="EXPIRY_TIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>status</opm:attribute-name>
    <opm:field table="TRIP" name="STATUS" xsi:type="opm:column"/>
    <opm:attribute-classification>java.math.BigDecimal</opm:attribute-classification>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
    <toplink:tables>
    <toplink:table name="TRIP"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    </opm:class-mapping-descriptors>
    </toplink:object-persistence>
    To test I used the above custom SQL at the command line and it filtered the records by EXPIRY_TIME as expected.
    When deployed, the polling process updates the STATUS file dof table entries, but all entries with status 0 regardless of EXPIRY_DATE. My modification appears to be being ignored. I was unsure as to whether the QUERY was being determined in some other way so I modified the descriptor (with the toplink expression editor) to compare against a literal time value, producing the following modified toplink_mappings.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)"
    xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>ExpiredTripPoller</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>ExpiredTripPoller.Trip</opm:class>
    <opm:alias>Trip</opm:alias>
    <opm:primary-key>
    <opm:field table="TRIP" name="ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="ExpiredTripPoller" xsi:type="toplink:read-all-query">
    <opm:criteria operator="lessThan" xsi:type="toplink:relation-expression">
    <toplink:left name="expiryTime" xsi:type="toplink:query-key-expression">
    <toplink:base xsi:type="toplink:base-expression"/>
    </toplink:left>
    <toplink:right xsi:type="toplink:constant-expression">
    <toplink:value xsi:type="xsd:date">2007-07-30</toplink:value>
    </toplink:right>
    </opm:criteria>
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    <opm:query name="findAllTrip" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    <toplink:does-exist-query xsi:type="toplink:does-exist-query">
    <toplink:existence-check>check-database</toplink:existence-check>
    </toplink:does-exist-query>
    <toplink:read-all-query xsi:type="toplink:read-all-query">
    <toplink:reference-class>ExpiredTripPoller.Trip</toplink:reference-class>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </toplink:read-all-query>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TRIP" name="ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.math.BigDecimal</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>lpn</opm:attribute-name>
    <opm:field table="TRIP" name="LPN" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>startTime</opm:attribute-name>
    <opm:field table="TRIP" name="START_TIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>expiryTime</opm:attribute-name>
    <opm:field table="TRIP" name="EXPIRY_TIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>status</opm:attribute-name>
    <opm:field table="TRIP" name="STATUS" xsi:type="opm:column"/>
    <opm:attribute-classification>java.math.BigDecimal</opm:attribute-classification>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
    <toplink:tables>
    <toplink:table name="TRIP"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    </opm:class-mapping-descriptors>
    </toplink:object-persistence>
    On deployment, this version of the BPEL process behaved as expected - only modifying the records with EXPIRY_TIME less thatn the literal time specified. (Also, I can't really pass in the time as a parameter as this is a polling model).
    Can anyone shed any light on what is happening or suggest how I might go about polling in the desired way?
    Cheers

    Please take a look at this article which states SYSDATE is not supported in a
    where clause.
    http://www.oracle.com/technology/pub/articles/bpel_cookbook/qualcomm-bpel.html
    Excerpt from the article:
    Here are three important things you should do in implementing the above design:
    Have the status of the record being processed stored in the database. The status includes the process state, next process attempt time, and processing attempt count.
    Create an updatable view that exposes only records that are ready to be processed. A view is needed because the database adapter cannot handle a where clause that compares against SYSDATE.
    Design logic that determines if a process instance that has faulted should be retried and when the retry should occur. This information will be updated in the database by use of a stored procedure. This can also be done with an update partner link and additional logic in BPEL.
    mahalo,
    a iii

  • How to use Database adapter as inbound adapter without having polling strategies?

    Hi All,
    I have a requirement wherein I have to use Database adapter to retrieve the data for every half an hour from one(X app) database and update that data into another application(Y app) .That database adapter will be along with BPEL process.My Flow would be like this:
    Database Adapter( In 'exposed services' section) ----->   BPEL (in 'Components') -----> Y app service( in 'External References' section)
    My questions for each step are below
         1) I have to retrieve the data from database(x app database) for every half an hour.So I have to schedule my whole process such that it should execute for every half an hour.
    Means I have to get  whatever the data is updated in the last half an hour in that database.
          The database adapter should be inbound in SOA composite editor(in 'Exposed services' section).
    But in order to have inbound adapter,we have select the 'Poll for New or Changed Records in a Table' option in turn we have to select one of polling operations below:
             Delete the Row(s) that were Read
    Update a Field in the [Table_Name] Table (Logical Delete)
    Update a Sequencing Table
    Update an External Sequencing Table on a Different Database
    Control Table Strategy
    But the problem is I don't have any control on the database(X app database) ,So (I can't update any data on that table,because that table may not have a field or table to update the processed rows)I can't choose any of the above operations.
    How can I achieve what I want that is to retrieve the data and schedule the process?
    Thanks in advance.

    Hi Heckler,
      Thank you very much for your answer that I can proceed further somehow.
    I still need to have some clarifications.
    In order to have a process which retrieves the data (Inbound operation) and updates the data into other application, the data(from X app)  should be the request(through DB adapter) of the BPEL process.
    X app does not do anything to send.We have(the BPEL process) to receive the data (or) no event is triggered.
    The flow :
    Database Adapter( In 'exposed services' section to retrieve data) ----->   BPEL (in 'Components') -----> Y app service( in 'External References' section)
    How can we ensure the data will be  request to BPEL process(means it will be in 'exposed services' section in SOA composite editor) for every half an hour if we use pick activity and database adapter as first activity?
    When we use ''Poll for New or Changed Records in a Table' ,then only adapter becomes inbound and comes into the 'exposed services' section.I can't use it as I don't have any control on the source table.
    I have this confusion before starting the process.Please help me to clear out the doubts.
    And this whole process should be executed automaticallly for every half an hour(means it creates instance for every half an hour)  Once we build the BPEL process.
    How to schedule it?
    And where do I need to create control table ?You mean I have to use some different database where in I have to create the table?

  • DB Adapter polling and logical delete: Process succeed but lock on database

    We have the following busisness flow, that reseult in a BPEL behaviour we did not expect. I hope that some of you had the same exeprience.
    The database adpater polls from a table new records based on a value (20) in a status field. When it finds records, it will process them and update the status field (20 -> 30).
    When we update from sqlplus a record, select for update on record with status 20, then We see in the logging that the update fails, but the process ran sucessfully. At the database we see an outstanding lock. If we commit the sqlplus session (after a few minutes), the status field is updated to 30.
    This is strange to me, the BPEL process was already sucessfully finished.
    Anyone seen this behaviour?
    Regards,
    Marc
    The logging
    <2006-05-02 13:06:37,052> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> SELECT STATUS,
    USERID FROM AQADM.TEST_UPDATE_VANUIT_BPEL WHERE ((STATUS = ?) AND ((STATUS <> ?) OR (STATUS IS NULL)))
    /ORA-
    <2006-05-02 12:03:21,473> <DEBUG> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Delivery Thread 'JCA-work-instance:Database Adapter-0 pe
    rforming unsynchronized post() to localhost
    <2006-05-02 12:03:21,879> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> begin transact
    ion
    <2006-05-02 12:03:21,881> <DEBUG> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.TopLinkLogger log> UPDATE PROV.PR
    OV_USER_ACCOUNT SET STATUS_CMMAC = ? WHERE (PUAT_ID = ?)
    bind => [30, 81600]
    <2006-05-02 12:03:22,188> <WARN> <default.collaxa.cube.activation> <Database Adapter::Inbound> <oracle.tip.adapter.db.InboundWork runOnce> Exception dur
    ing polling of the database ORABPEL-11624
    DBActivationSpec Polling Exception.
    Query name: [prov_cmmac], Descriptor name: [PROVprocessmacaddress.ProvUserAccount]. Polling the database for events failed on this iteration.
    If the cause is something like a database being down successful polling will resume once conditions change. Caused by Exception [TOPLINK-4002] (OracleAS
    TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.DatabaseException
    Exception Description: java.sql.SQLException: ORA-20220: MDB3 ERR: session not in admin mode
    ORA-06512: at "PROV.PUAT_BUR", line 90
    ORA-04088: error during execution of trigger 'PROV.PUAT_BUR'

    The following entry:
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2008-12-11T17:50:20.119+01:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>tip</COMPONENT_ID>
    <MSG_TYPE TYPE="TRACE"></MSG_TYPE>
    <MSG_LEVEL>16</MSG_LEVEL>
    <HOST_ID>u514603.cmcdev.be</HOST_ID>
    <HOST_NWADDR>10.151.70.3</HOST_NWADDR>
    <MODULE_ID>esb.server.service.impl.inadapter</MODULE_ID>
    <THREAD_ID>18</THREAD_ID>
    <USER_ID>orasoad</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>10.151.70.3:11323:1229014220014:8</UNIQUE_ID><SEQ>0</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>JCA: &lt;oracle.tip.adapter.db.TopLinkLogger log> SELECT UNIQUE_SUPPLIER_ID, SUPPLIER_NAME, SUPPLIER_NUMBER, NUMBER_TYPE, CM_SUPPLIER_TYPE, VAT_REGISTRATION_NUM, M_NUMBER, ADM_ID, OFB_PARTY_ID, CENTURY, LANGUAGE, ATTRIBUTE_CATEGORY, SPARE6, SPARE8, SPARE9, SPARE10, SPARE11, SPARE12, SPARE13, SPARE14, SPARE15, STATUS, ERROR_CODE, FILE_ID FROM XXCM.XXCM_AP_SUPPLIERS WHERE (STATUS = ?) ORDER BY UNIQUE_SUPPLIER_ID ASC FOR UPDATE NOWAIT
         bind => [MINE[undef:instance]]
    </MSG_TEXT>
    </PAYLOAD>
    </MESSAGE>
    can be found in $ORACLE_HOME/j2ee/oc4j_soa/log/oc4j_soa_default_group_1/oc4j/*.xml
    Regards

Maybe you are looking for

  • Twice in nine months... I must be unlu

    Well, I had my Zen Micro sent in in September due to the fact that it locked up. Once again... more troubles ever since I bought it last May. First off, I'm not a heavy user, I use it at most 4 day a week, an hour at most a day. Tonight I clicked on

  • What's the security code for my C3?

    I forgot to ask the password for my nokia c3 ,pliz help me to put the security code Moderator's note: The subject was amended. Better subject was provided.

  • Interactive chart in Numbers

    Is it possible to delete bars in an interactive chart in Numbers? The chart part, not the table. In other words, the chart is too wide and I only want 3 bars, not 5.

  • Can I get the time where the playback is

    I'm using FMP, is perfect! But now I have a need, I want to let the user that uploaded the video to select the post image, what I'm thinking is to show the video with FMP on a web page and let him to select the minute he wants to upload it to my serv

  • 3.3 RC - need camera profile for Nikon D7000?

    I'm kind of a knucklehead about Adobe so please be patient with me.... I have a Nikon D7000 (not a D700).  Downloaded 3.3 RC and can edit my RAW pics - works for me. But there are no profiles in the camera calibration.  What am I missing ?  Is it a C