Polling query

Hi all,
I am facing two problems in polling.
1. I want to select fields from more than one table. Is that possible in polling designing steps.
2. Currently I am using the Logical Delete in polling. The problem is, polling flag is getting updated even when my instance is not executing successfully. How I can remove this problem.
Thanks.
Edited by: vicky_007 on Sep 14, 2009 11:25 AM

Is anybody here to reply :(

Similar Messages

  • DBadapter: Numeric OverflowError in polling query

    Hi,
    When using a database adapter to poll for new records I encounter the following error in the opmn.log:
    <Database Adapter::Inbound> <oracle.tip.adapter.db.InboundWork handleException> Same exception during polling of the database Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Numeric OverflowError Code: 17026
    Call:SELECT A, B, C, D, E FROM XXBPEL_Table WHERE (B = ?)
    bind => [20]
    Query:ReadAllQuery(bpel___localhost_EBS_TestDbAppt_1_0_1.schema.tablename)
    I use the database adapter to poll for new records in a table on a remote database.
    The db adapter uses a public synonym in my local database, defined for the remote table.
    If I run the query directly on the local database all goes well. The datatypes in the generated xsd in my BPEL process are according to the datatypes of the columns in the remote table.
    The error occurs when I switch the process state to 'on'. If I redeploy the polling process, polling resumes for a certain time. Occasionally, restarting the SOA Suite helps but not for long.
    SOA Suite Version = 10.1.3.1.0
    Any suggestions as to what's going on here?
    regards, Rob

    Problem is solved,
    one of the selected column was of type number(10), which in the toplink_mappings.xml is mapped to an int. The error occured when the number-value exceeds maxin (2**32), which is 4294967296. Modifying the int to long datatype solved the issue.

  • DB polling : query with subquery

    Hi,
    We are upgrading the 10g code to 11g, where one process has the DB polling with custom SQQL. This SQL has a subquery like,
    Select Name, ID, CID from tabl1 where lastdate + (select num_value from table2 where column2 = "xxx") <= sysdate
    We want the similar functionality in 11g. The upgraded code generated few artifiacts like toplink. We have bulilt that and deployed to server. But it is not polling the data eventhough the matching records are present in the tables.
    Please let us know how to fix this issue.
    Thanks,
    Vinoth

    Hi,
    Not sure about your question.
    But you say when you uss 01-apr-10 you get the expected results.
    So why dont you try using trunc on botht sides
    SELECT vfn.cat
      FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
       AND vfn.cat = vf.cat
       AND vf.permit_year = 2010
       AND vf.moratorium_fishery = 'T'
       AND vfn.vp_num = 211652
       AND vfn.ap_year = 2010
       AND vfn.plan = 'MUL'
       AND trunc(vfn.date_issued) = (SELECT MAX(trunc(date_issued))
                                FROM vps_fishery_ner
                               WHERE vp_num = 211652
                                 AND ap_year = 2010);Rememeber if you are couting on some Index to be used you might want to recheck.
    IN answer to your question why it does not return with subquery included, because the TIME PART is not the same.
    You yourself proved it by using the supplying only the date part.
    Regards,
    Bhushan

  • DB adapter polling error

    Dear All,
    I am getting below error while polling from a SQL Server DB
    Database Adapter PROTEST <oracle.tip.adapter.db.InboundWork handleException> Encountered a fatal exception while polling. Will continue polling but with minimal logging. Please investigate the fault and manually stop polling from the console if in development and this appears to be a modeling mistake. BINDING.JCA-11624
    Supplemental Detail DBActivationSpec Polling Exception.
    Query name: [PROTESTSelect], Descriptor name: [PROTEST.Mes2Otcmessage]. Polling the database for events failed on this iteration.
    Caused by java.sql.SQLSyntaxErrorException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'MES2OTCMessage'..
    This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-208" to your deployment descriptor (i.e. weblogic-ra.xml). This polling process will shut down, unless the fault is related to processing a particular row, in which case polling will continue but the row will be rejected (faulted).
    at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:682)
    at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:648)
    at oracle.tip.adapter.db.exceptions.DBResourceException.inboundReadException(DBResourceException.java:483)
    at oracle.tip.adapter.db.InboundWork.handleException(InboundWork.java:922)
    at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:826)
    at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:578)
    at oracle.tip.adapter.db.inbound.InboundWorkWrapper.run(InboundWorkWrapper.java:43)
    at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
    at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
    at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: java.sql.SQLSyntaxErrorException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'MES2OTCMessage'.
    at weblogic.jdbc.sqlserverbase.dda4.b(Unknown Source)
    at weblogic.jdbc.sqlserverbase.dda4.a(Unknown Source)
    at weblogic.jdbc.sqlserverbase.dda3.b(Unknown Source)
    at weblogic.jdbc.sqlserverbase.dda3.a(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.v(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.a(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddq.a(Unknown Source)
    at weblogic.jdbc.sqlserver.tds.ddr.a(Unknown Source)
    at weblogic.jdbc.sqlserver.ddj.m(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddde.e(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddde.a(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb9.a(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddde.v(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddde.u(Unknown Source)
    at weblogic.jdbc.sqlserverbase.ddb9.executeQuery(Unknown Source)
    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:135)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:888)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:598)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeCall(AbstractSession.java:980)
    at org.eclipse.persistence.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:131)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:206)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.cursorSelectAllRows(DatasourceCallQueryMechanism.java:74)
    at org.eclipse.persistence.queries.CursoredStreamPolicy.execute(CursoredStreamPolicy.java:64)
    at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:395)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1076)
    at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:740)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1036)
    at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:380)
    at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2392)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1291)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273)
    at oracle.tip.adapter.db.inbound.DestructivePollingStrategy.poll(DestructivePollingStrategy.java:456)
    at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:699)
    Plese help.
    Thanks,

    Hi,
    Please verify first that you can run a simple query (not polling) using the same data source.
    If not, probably there is a problem with the data source definition.
    If yes, verify your polling query is correct, restart SOA server and redeploy your process.
    Please post your results...
    Arik

  • Polling for new Data in Tables with SQL-functions

    Hi
    In my table I have 2 columns:
    event_state : integer (0 = unread, 1 = read)
    min_process_time : date
    In the DB-Adapter-Wizard I can configure my event_state-Field for using as logical delete field. In the SQL-Query there is a
    ... WHERE event_state=0
    But, I only want to query all new entries in this table, where
    min_process_time > SYSDATE.
    How can I configure my toplink-mapping, that SYSDATE can be used in the polling-query? If I use plain-sql instead of the expression from the Wizard (last page), then this sql-statement is ignored. In an expression I only can use a constant-value.
    Any idea?
    Thanks
    Gregor

    Hi
    I am creating a database Polling (logical delete OPEN to CLOSED) adapter that polls a table for records which have a "SCHEDULED" date field.
    The Polling Adapter should pick up those records where the status is OPEN and SCHEDULED<=SYSDATE.
    DB Adapter wizard does not allows this where clause(SCHEDULED<=SYSDATE) to be set; so i tried modifying the Toplink SQL with custom SQL. But it does not works. Please suggest a workaround.
    Please help.
    Thanks
    Debashis

  • DB Adapter Locking Database Rows in Distributed Delete Polling Strategy

    I am stuck with an issue. To explain the issue in simple steps
    I am creating a Database Polling Adapter with Distributed Delete Polling Strategy in OSB for running in Clustered Environment.
    We are custom SQL so that the records are not deleted after they are fetched but only a column Status Column is getting Updated.
    The Polling query and Delete SQL is as follows
    <query name="ReqJCAAdapterSelect" xsi:type="read-all-query">
    <criteria operator="equal" xsi:type="relation-expression">
    <left name="Status" xsi:type="query-key-expression">
    <base xsi:type="base-expression"/>
    </left>
    <right xsi:type="constant-expression">
    <value>READY</value>
    </right>
    </criteria>
    <reference-class>ReqJCAAdapter.ItemTbl</reference-class>
    <refresh>true</refresh>
    <remote-refresh>true</remote-refresh>
    <lock-mode>lock-no-wait</lock-mode>
    <container xsi:type="list-container-policy">
    <collection-type>java.util.Vector</collection-type>
    </container>
    </query>
    <delete-query>
    <call xsi:type="sql-call">
    <sql>update ITEM_TBL
    set STATUS = 'IN_PROCESS'
    where ID = #ID</sql>
    </call>
    </delete-query>
    In case of any error in Service Error handler the Status is being updated to ERROR.
    Now the problem which I am facing is in the request Pipeline if we want to do any update on the same record we detect that in ROW is locked and is not allowed to do an update and because of this the process can not proceed.
    Also if any error occurs in Request pipeline then from the Service Error handler we are supposed to Update the status as ERROR, but the same thing is happening and the process can not proceed.
    but In the response Pipeline we can successfully update the status of the same record.
    We have tried to use both XA and NON-XA Datasource but no luck.
    Any help in this is appreciated.
    Regards,
    Dilip

    I am stuck with an issue. To explain the issue in simple steps
    I am creating a Database Polling Adapter with Distributed Delete Polling Strategy in OSB for running in Clustered Environment.
    We are custom SQL so that the records are not deleted after they are fetched but only a column Status Column is getting Updated.
    The Polling query and Delete SQL is as follows
    <query name="ReqJCAAdapterSelect" xsi:type="read-all-query">
    <criteria operator="equal" xsi:type="relation-expression">
    <left name="Status" xsi:type="query-key-expression">
    <base xsi:type="base-expression"/>
    </left>
    <right xsi:type="constant-expression">
    <value>READY</value>
    </right>
    </criteria>
    <reference-class>ReqJCAAdapter.ItemTbl</reference-class>
    <refresh>true</refresh>
    <remote-refresh>true</remote-refresh>
    <lock-mode>lock-no-wait</lock-mode>
    <container xsi:type="list-container-policy">
    <collection-type>java.util.Vector</collection-type>
    </container>
    </query>
    <delete-query>
    <call xsi:type="sql-call">
    <sql>update ITEM_TBL
    set STATUS = 'IN_PROCESS'
    where ID = #ID</sql>
    </call>
    </delete-query>
    In case of any error in Service Error handler the Status is being updated to ERROR.
    Now the problem which I am facing is in the request Pipeline if we want to do any update on the same record we detect that in ROW is locked and is not allowed to do an update and because of this the process can not proceed.
    Also if any error occurs in Request pipeline then from the Service Error handler we are supposed to Update the status as ERROR, but the same thing is happening and the process can not proceed.
    but In the response Pipeline we can successfully update the status of the same record.
    We have tried to use both XA and NON-XA Datasource but no luck.
    Any help in this is appreciated.
    Regards,
    Dilip

  • 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.

  • DBAdapter polling with logical delete x distrib polling x DB rows per trans

    Hi all.
    I'm trying to configure a DBAdapter with "logical delete" polling strategy, distributed polling (cluster environment) and a defined number of "Database Rows per Transaction".
    When I check the box "Distributed Polling", the SQL generated gets appended by "FOR UPDATE NOWAIT"
    However, when I set a value for "Database Rows per Transaction" the "FOR UPDATE NOWAIT" sql clause disappear.
    Is this a bug, or some limitation related to the "logical delete" strategy???
    Thanks
    Denis

    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.

  • Polling using WCF SQL Adapter

    Hi - I have to develop this in BizTalk
    There is a table in SQL database where BizTalk needs to poll the data using WCF SQL Adapter.
    How and what query/stored proc do I need to write ?
    and how about polling interval should I mention.
    Is there any detailed blog or link which clearly explains this, will be helpful
    MBH

    The first thing that you should remember is that the most effective way of getting data from SQL would be if you could remove the records after reading them. This was something that the native SQL Server adapter supported. For WCF-SQL, the way to achieve
    this is to
    Create a SP which is what you will specify as the execute statement for your adapter. This SP would, on the basis of TOP 1, get the ID, read the record and delete it. Then it would return the read data. You will generate schemas for this SP and deploy them
    for subscribing to the received messages.
    You will create a query that returns the count of records from the said table which you will use as the polling query. This will ensure that the adapter uses this on the configured interval to see if data exists. If it exists, it would use the execute statement
    (invoking your SP) to get the data.
    There is an option to keep executing the SP while data is available. This ensures that if more than ONE record is inserted into your table, all the records would be picked up after the first polling interval (as opposed to poll, pick-up one, poll and then
    pick up the other, etc.). Be careful while setting the polling interval (you cannot go beyond 1 sec) since this depends on your SQL servers ability to process the data.
    With regards to documentation, I'd refer you to
    http://msdn.microsoft.com/en-us/library/dd788532.aspx - Polling SQL Server by using the WCF-SQL Adapter.
    Regards.

  • Seperate DB Update not working at the end of transaction after polling DB

    I am using DB Adapters in OSB(built using JDveloper) to poll a DB. I am doing logical delete on one of the field(PROC_RSLT) on table by updating read column to 0.
    The issue is after I have done the polling and send the polled data to external party, external party send me a response which I have to again update to PROC_RSLT field.
    1. This update is not working if my JCA adapter proxy service having "transaction" and "Same Transaction For Response " options are disabled.
    2. When I enable the "Same Transaction For Response" option my DB update after external system with external system response is possible but logical delete(update to 0) on PROC_RSLT happen only after transaction is completed.
    Since PROC_RSLT is not updated to 0 same record is polled by adapter multiple times. I want my PROC_RSLT to be updated as soon as it poll and also my DB update to happen with external system response
    Can anyone help?
    Thanks

    Please refer section "Update a Field in the [Table_Name] Table (Logical Delete)" at below link -
    http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10231/adptr_db.htm#BABEEBIH
    Database Configuration: A status column on the table being polled must exist. If it does not exist already, you can add one to an existing table.
    Support for Polling for Updates: Given that rows are not deleted with each read, it is possible to repetitively read a row multiple times. You must add a trigger to reset the mark read field whenever a record is changed, as follows:
    create trigger Employee_modified
    before update on Employee
    for each row
    begin
    :new.STATUS := 'MODIFIED';
    end;
    Support for Concurrent Access Polling: Just as a single instance should never process an event more than once, the same applies to a collection of instances. Therefore, before processing a record, an instance must reserve that record with a unique value. Again, the status column can be used:
    <operation name="receive">
    <jca:operation
    ActivationSpec="oracle.tip.adapter.db.DBActivationSpec"
    PollingStrategyName="LogicalDeletePollingStrategy"
    MarkReadField="STATUS"
    MarkUnreadValue="UNPROCESSED"
    MarkReservedValue="RESERVED${IP-2}-${weblogic.Name-1}-${instance}"
    MarkReadValue="PROCESSED"
    The polling query instead appears, as shown in the following example:
    Update EMPLOYE set STATUS = 'RESERVED65-1-1' where (CRITERIA) AND (STATUS = 'UNPROCESSED');
    Select … from EMPLOYEE where (CRITERIA) AND (STATUS = 'RESERVED65-1-1');
    The after-read UPDATE is faster because it can update all:
    Update EMPLOYEE set STATUS = 'PROCESSED' where (CRITERIA) AND (STATUS = 'RESERVED65-1-1');Your second aaproach should work -
    2. With option ”Same transaction for Response” Enabled : PROC_RSLT is not updated to 0 as soon as record is polled. Instead it is updated to resultcode from CSM at the end of transaction. By that time DB adapter poll for multiple times as PROC_RSLT is still considered unread(not 0).Regards,
    Anuj

  • Can we give where condition while db polling, if yes how to give the value

    Hi,
    We are polling a db table, can we give where condition in polling query. If we can give this then where to pass the value for the condition.
    eg:
    select * from xxtable wherexxname=#xxname;
    If above is the db polling query then how to pass #xxname value to db adapter.
    After polling we are deleting the row in the table.
    Thanks,
    Ra

    You can add where condition , but the value should be passed while configuring DB Adapter itself. You can't pass dynamic values to it as it is polling and gets activated once the process is deployed.
    Thanks,
    Satish
    http://soadiscovery.blogspot.com

  • Database connection timeouts and datasource errors

    Connections in the pool randomly die overnight. Stack traces show that for some reason, the evermind driver is being used even though the MySql connection pool is specified.
    Also, the evermind connection pool is saying connections aren't being closed, and the stack trace shows they're being allocated by entity beans that are definitely not left hanging around.
    Sometimes we get non-serializable errors when trying to retrieve the datasource (this is only after the other errors start). Some connections returned from the pool are still good, so the application limps along.
    EJBs and DAOs both use jdbc/SQLServerDSCore.
    Has anyone seen this problem?
    <data-sources>
         <data-source
              class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
              name="SQLServerDSCore"
              location="jdbc/SQLServerDSCore"
              xa-location="jdbc/xa/SQLServerXACore"
              ejb-location="jdbc/SQLServerDSCore"
              connection-driver="com.mysql.jdbc.Driver"
              min-connections="5"
              username="xxx"
              password="xxx"
              staleness-timeout="3600"
              alive-poll-query="SELECT 1 FROM medispan"
              url="jdbc:mysql://1.2.3.4:3306/dbo?autoReconnect=true&autoReconnectForPools=true&cachePrepStmts=true&is-connection-validation-required=true"
              inactivity-timeout="30"
         >
              <property name="autoReconnect" value="true"/>
              <property name="autoReconnectForPools" value="true"/>
              <property name="is-connection-validation-required" value="true"/>
              <property name="cachePrepStmts" value="true"/>
         </data-source>
    </data-sources>

    Rick,
    OC4J 9.0.4.0.0 - BTW, do you know of any patches?As far as I know, there are no patches for the 9.0.4
    production version of OC4J stand-alone.
    I'm using container managed persistence,It was not clear to me, from your previous post, that you
    are using CMP entity beans.
    I found staleness-timeout and alive-poll-query
    somewhere on a website when trying to track this
    down. Here's four sources:Those sources refer to OrionServer -- and an older version, too, it seems.
    Like all other Oracle products that start out as somebody
    else's -- including, for example, JBuilder (that became "JDeveloper"), Apache Web Server (that became "Oracle HTTP Server") and TopLink -- their development paths diverge, until, eventually, there is absolutely no similarity between them at all. Hence, the latest versions of OC4J and "OrionServer" are so different, that you cannot be sure that something that works for "OrionServer" will work for OC4J.
    I recall reading something, somewhere, sometime about configuring OC4J to use different databases (other than Oracle), but I really don't remember any details (since it was not relevant to me, because we only use Oracle database). In any case, it is possible to use a non-Oracle database with OC4J.
    Good Luck,
    Avi.

  • How to modify the pre generated SQL string in Db adapter

    Hello All,
    I am using a DB adapter to poll a database. So in the configuration of adapter, i have specified the option of logical delete, i want to update to a field PF as 'Y'. In my BPEL process, I want to update those records as 'Y' for their process_Completion field after i am done doing logic on those records.. Actually in the database adapter configuration, we get the SQL string right ?. So inorder to edit that SQL how should we go ahead ?
    I mean i want to poll the database, i want to get like 1000 records for my BPEL Process Instance, and after all those 1000 gets processed and completed. Iwant to get the next 1000. So i want to write a query something like...
    select seqid, id, field1, field2..... from STable a where a.PF = 'N' and exists(select 1 from STable b where b.seqid = a.seqid - 1 and b.PF = 'Y' and b.process_Completion = 'Y')
    So, how to write my custom quesries while polling the database. cant we write custom quesries while we are doing Inbound operation with Dbadapter. Please help me with this thing.
    Thanks,
    N

    Whenever you use a JCA DB Adapter in JDeveloper it creates an OR mapping xml that contains the select/polling query that you might have.
    Below is an example of one such query. You can edit the sql here manually and redeploy your process.
    <querying xsi:type="query-policy">
    <queries>
    <query name="DBConnSelect" xsi:type="read-all-query">
    <call xsi:type="sql-call">
    <sql>SELECT MESSAGE_ID,BU_ID,CREATED_BY FROM MESSAGE_BUFFER where BU_ID IN (3232,4747) and 3 > rownum</sql>
    </call>
    <reference-class>DBConn.MessageBuffer</reference-class>
    <container xsi:type="list-container-policy">
    <collection-type>java.util.Vector</collection-type>
    </container>
    </query>
    </queries>
    In case you need to add parameters to your query you should be able to do that as well while you are creating your DB Adapter.
    Edited by: Arun Pareek on Jun 15, 2011 9:34 AM

  • Help in scheduling jobs

    Hi,
    I have an AQ queue process which queues data into a queue. The records go into this queue via a trigger on a table. I have also written a procedure to dequeue the records in bulk using the dbms_aq.dequeue_array.
    My question is regarding the scheduling of the dequeue process.
    After a dequeue process has started executing. I need to check the number of records in the queue table. It it is say more than 100 then i would need to kick start the same dequeue process that will execute simultaneously with the first dequeue.
    The idea is as the number of records in the queue increases there should be multiple dequeues dequeuing those records.
    Can this be somehow achived using the DBMS_JOB? or is there any other way to process queued records simultaneously if the records in the queue reached a threshold?
    Thanks in advance
    Roy

    Yes. A Process monitors the queue and submits a job if the queuesize exceeds a set limit. The submitted job is a "run once only" job so it exits after it completes processing.
    Such jobs can coexist with your scheduled "every 2 minutes" job.
    However, the monitoring Process must periodically poll the queue. If polling is very fast, this process can be a job that runs every minute. OR a permanently running process (e.g. something that is started up when the database instance starts up) that uses it's own "sleep" (PLSQL Lock Timer from dbms_lock.sleep) of 'n' seconds between every polling query on the queue.
    Sven. too, had suggested the same thing.
    See the discussion in Job queue stops processing when more then 2**16 (65536) jobs submitted where a similar idea is used (except that it ends up submitting too many jobs ! --- so you have to ensure that you have 'flow control' or properly define the granularity of a job).
    Hemant K Chitale
    Edited by: Hemant K Chitale on Apr 28, 2011 3:47 PM

  • Using the Service Link Database adapter

    I had a question regarding the use of the Service Link database adapter.  We've configured an adapter that will write rows to a certain table in an oracle database.  The rows are written into the table correctly.  I've also configure the inbound portion of the database adapter to retrieve records but there are 2 problems.
    1.  When creating the SQL that is used to poll the database table, I'm not able to use the channel id namespace.  According to the manuals and training materials that I have reviewed, it looks like you should be able to call #channelid# in your query and the system should automatically translate that.  I've tried #channelid#, #channel-id#, and #ChannelID# but if doesn't seem to covert the value to the actual channel ID.  Can you use namespaces in the polling query?
    2.  If I setup the queries without namespaces, I can get into the next step where it excutes the sucessful or failed sql query.  I setup a simple transformation that automatically closes the assocaited task when the query is run.  I then setup a SQL statement to delete all rows in the table (I only did this because I could not target a row without the channelid namepsace working).  The problem is that when I submit a task that uses the agent, the agent polls the database and finds the task.  The agent then closes the asscaited task, per my transformation, but when it goes to delete all rows in the table, the rows are not removed.  If I execute the same SQL using the same account in a SQLPlus window, the rows are deleted so I think that my SQL is good.  I'm not sure why it does not work and the only message in the log is:
    2010-07-08 15:52:23,677 DEBUG [com.newscale.is.adapter.db] [ AgentId-5 ]  Fetched 1 new records
    2010-07-08 15:52:23,804 ERROR [com.newscale.is.adapter.db] Outbound Message Failed to deliever
    This is my SQL:  delete from rcowner.rcapprovals where STATUS_code='Registered'
    Any help or advice is apprecaited.
    Tim

    Hi Tim -
    The namespace that you can use comes from the SELECT SQL statement.  So you need to write out the Channel ID into a field in the db table (you need it around anyway for the transformation).  Then the inbound SQL needs to include the channel ID field in the select statement.  Then the success/failure SQL statements can reference the channel ID field from the inbound SQL.
    Inbound example: SELECT CHANNEL_ID FROM MYTABLE WHERE STATUS = 2
    success example: UPDATE MYTABLE SET STATUS=3 WHERE CHANNEL_ID=#channel_id#
    (Note that it seems to convert field names to all lower case.  And the #channel_id# is just referencing the field from the other query -- it isn't a namespace or anything.)
    Your delete statement probably isn't working because the db connection is still using the records from the inbound query.  Its looping through each record from the inbound query and performing the transformation, then running the success/failrue sql before going onto the next record.

Maybe you are looking for