Implementing work queues? (or, "readpast equivalent in oracle?")

Without going to Advanced Queuing, is there a
more straightforward way to implement a work
queue?
As an example of what I'd like to do,
I have a table with rows, each row identifying some
work that has to be done.
I would like to have multiple processes pick up the
first available "unlocked" row, and select it for update.
When the work is done the process would update the row and
mark it done, and commit it, etc. If the process fails,
it would rollback and that will be the right behaviour
for my needs.
I think a SQL-server equivalent of the READPAST hint
to ignore row-locked entries would work nicely for what
I want to do, but I'm interested in other solutions, etc
for this problem?
Thanks,
-kb

Hello,
Two thoughts come to mind. You could have a Java Message Listener listening on a queue for an event and then do whatever you need to do after it has received that event.
The other option is to use the external procedure mechanism to invoke a bit of c code to start you Java code. A bit convoluted compared to the first option.
Thanks
Peter

Similar Messages

  • How to implement distributed work queue

    Hi,
    I have a simple problem: I need to implement a work queue, in which the "workers" are different processes running in different JVMs.
    So I need to have a centralized (singleton), failure-free queue which contains works, and workers will connect to this queue and retrieve work to be processed.
    To be more clear, what I need coherence to hold is the queue, and be sure that each work is dispatched to only 1 queue-listener.
    Is this possible with coherence ?
    Which is the best pattern to implement this?

    Humm...
    Using ur solution would mean get and put the whole queue on the cache for each use, right ?
    Anyway this answered my question:
    http://www.infoq.com/presentations/Data-Grid-Design-Patterns-Brian-Oliver
    Edited by: GheParDo on Mar 29, 2011 11:37 PM

  • TIBCO Businessworks equivalent in Oracle SOA Suite

    Hello Experts,
    What is the equivalent of TIBCO Business works in Oracle SOA world??
    I guess Oracle Service Bus. Am I right??
    Thanks
    Rgds
    Natrajan

    Natrajan,
    For process orchestration, ACTIVEMATRIX BusinessWorks is equivalent to Oracle BPEL (which is part of Oracle SOA Suite). ACTIVEMATRIX Service Bus is equivalent to Oracle Service Bus.
    Regards,
    Anuj

  • DMBS_SQL.to_refcursor equivalent in Oracle 10g

    Hello,
    Is there any other way to get result as a refcursor in Oracle 10g with DBMS_SQL? I have the function that function generate dynamic query and execute with DBMS_SQL. This function called by java code for viewing result as report. How can I do this, is there equivalent in Oracle 10g for DMBS_SQL.to_refcursor? Please help.
    Thanks,

    ilkinesrefli wrote:
    Is it difficult to understand my answers?Yes, because they are not accurate. You keep saying you can't use ref cursors and must use DBMS_SQL, but you have failed to show us why that is so.
    It is impossible because there is dynamic where clause in my query. Show us why it's impossible.
    BluShadow     please solve this one:
    p_sql := 'select empno, ename, deptno from emp where deptno=:pdeptno';
    if ... then
    p_sql := p_sql || ' AND empno=:pempno';
    end if;
    ...Is it possible by your way?Yes, ref cursors can be used for dynamic queries. basic example...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function get_refcursor(p_sql in varchar2
      2                                          ,p_whereclause in varchar2 := null
      3                                          ,p_whereval in number := null) return sys_refcursor is
      4    v_rc sys_refcursor;
      5  begin
      6    if p_whereval is not null then
      7      open v_rc for p_sql||' where '||p_whereclause using p_whereval;
      8    else
      9      open v_rc for p_sql;
    10    end if;
    11    return v_rc;
    12* end;
    SQL> /
    Function created.
    SQL> var rc refcursor;
    SQL> exec :rc := get_refcursor('select empno, ename, deptno from emp');
    PL/SQL procedure successfully completed.
    SQL> print rc;
         EMPNO ENAME          DEPTNO
          7369 SMITH              20
          7499 ALLEN              30
          7521 WARD               30
          7566 JONES              20
          7654 MARTIN             30
          7698 BLAKE              30
          7782 CLARK              10
          7788 SCOTT              20
          7839 KING               10
          7844 TURNER             30
          7876 ADAMS              20
          7900 JAMES              30
          7902 FORD               20
          7934 MILLER             10
    14 rows selected.
    SQL> exec :rc := get_refcursor('select empno, ename, deptno from emp', 'deptno = :1', 20);
    PL/SQL procedure successfully completed.
    SQL> print rc;
         EMPNO ENAME          DEPTNO
          7369 SMITH              20
          7566 JONES              20
          7788 SCOTT              20
          7876 ADAMS              20
          7902 FORD               20
    SQL>So, please explain to us again why ref cursors are impossible to use and you have to use DBMS_SQL?

  • Windows 2008 r2 Cluster not starting - "unable to create security manager worker queues"

    Hello, following a power outage, we got a serious cluster error preventing the start of the cluster.
    We are trying to interpret the only four lines the cluster.log generates :
    00000330.000016cc::2014/09/26-10:44:06.348 ERR   [WTQ] bogus file creation failed, 2
    00000330.000016cc::2014/09/26-10:44:06.348 ERR   [WTQ] bogus file creation failed, 2
    00000330.000016cc::2014/09/26-10:44:06.348 ERR   [CS] Unable to create SecurityManager worker queues, 2
    00000330.000016cc::2014/09/26-10:44:06.363 ERR   Error 6
    AND if starting clussvc manually :
    Got ERROR_FILE_NOT_FOUND(2)' because of 'Error while creating the Security Manag
    er's Thread Pool' in
        000007fe:fd69940d( ERROR_MOD_NOT_FOUND(126) )
        00000000:001ff190( ERROR_MOD_NOT_FOUND(126) )
    We suspect a DLL problem (because of mod not found), but we are unable to find the ones involved even with process monitor.
    clusdb hive seems ok.
    The situation is serious, can anybody help, please ?

    Hi RodV,
    This error usually caused by cluster service fails to open a 
    handle to the \NUL device, Device manager shows the device instance in error state.
    Please check whether the following register value still exist, if not please backup your current registry then add the it.
    HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\ENUM\ROOT\LEGACY_NULL\0000\CONTROL
    ActiveService REG_SZ Null
    I am glad to be of help to you!
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Not able to stop Universal Work Queue Server

    Hello,
    I have created a Server Group in the ICSM (Call Center HTML administration->ICSM->Server Groups) and it has all the server processes required for Interaction Center. I started all these processes and now am trying to stop them. I am able to stop all the server processes except the Universal Work Queue Server process. Whatever I do, this server just wont stop :-(. I tried stopping it using the HTML admin page as well as the ieoicsm command line.
    I have another group and I need to start the UWQ server within this group. But it just wont start and I think thats because the UWQ server is running as pasrt of another group already. Both the server groups are associated with the same icsm node. I tried dissassociating the first UWQ server (which wont stop) from this icsm node, but I cant even do that. I cant even delete the server group as it keeps on saying that a server group which has processes runnig cannot be stopped.
    Does anyone have a solution to this?

    A restart of the application server solved the problem.

  • Implementing Single Sign-On support for the Oracle E-Business suite

    Implement Single Sign-On support for the Oracle E-Business suite
    I want implement Single Sign-On support for the Oracle E-Business suite.
    Operationg System : linux/Solaris
    Oracle E-Business suite : 11.5.10
    Oracle Application Server : 10gAS(latest availble)
    Type of integration : SSO and OID with 11i
    No third party SSO or LDAP
    Qusetions
    1.If my SSO Server is down can i login to applications(11i) using normal mode(default login http://servername.xxxx.com:8000/).
    2. Is it possible to have appilications (11i) in Linux/Solaris and 10gAS in windows.
    Please answer...
    NOTE:
    I am following Oracle METALINK Doc.Id 233436.1 and 261914.1.
    Thank you.
    MARK

    You couldn't login into server But You can use the following login
    http://servername.xxxx.com:8000/AppsLocalLogin.jsp
    For this you need to enable the Appslocallogin Profile option

  • SQL XMLExplicit equivalent in oracle

    Hi
    Is there any equivalent in oracle for SQL XMLExplicit?
    In SQL the XMLExplicit will add all the retunded nodes under the single root node like that any equivalent is available in oracle.
    Thanks
    Surendra

    I hope you will get better answers if you post this in Sql/Plsql Forum ..
    PL/SQL
    This one is one of the genuine and active forums .. :)

  • HANA equivalent of oracle's sql%rowcount to get affected rows.

    I want to get the number of rows affected from an insert or update statement inside a stored procedure.
    Is there any equivalent to oracle's sql%rowcount that can be called after the query.
    For example:
    create procedure procedure_name
    begin
         declare l_c integer;
         insert into table values ('somevalue');
         l_c := sql%rowcount; -- This would return 1 for the row inserted.
    end;

    Yes, after the INSERT statement....
    SELECT ::ROWCOUNT into L_C FROM DUMMY;
    Cheers,
    Rich Heilman

  • Jrew.exe has stopped working when iam trying to install oracle on vista

    hi,
    iam gettin an error stating that jrew.exe has stopped working when iam trying to install oracle 9i on windows vista cam anyone help me in resolving it

    Duplicate post. Please stick to Re: jrew.exe has stopped working when iam tryin to install oracle9i on vista

  • Can Adavnced queues be set up beteen oracle 8.1.6 and oracle 10g

    can Adavnced queues be set up beteen oracle 8.1.6 and oracle 10g? if so is there any document that talks about the AQ setup between 8.1.6 and 10g?

    This forum is intended for members to provide feedback and
    suggestions about OTN developer services. Please repost your
    question in an appropriate database forum.
    Best regards,
    --OTN Team                                                                                                                                                                                                                                                                                                                                                                                                   

  • Very Urgent - Implementing Work Protect Mode

    Hi,
    Did any Web Dynpro expert here implemented Work Protect Mode ? (WD for Java)
    Promise to award points.
    Thanks.
    Ruthie.

    Hi Ruthie,
    I think that is very much possible in WD for JAVA.
    Please go through the following links for more help,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a891e490-0201-0010-fb99-b7e4f5dda2ec
    http://help.sap.com/saphelp_nw04/helpdata/en/88/585d420447e054e10000000a155106/frameset.htm
    http://sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/2fffe990-0201-0010-aab0-e61c3250bcf3
    I hope this helps you.
    Best Regards,
    Guru.
    PS: Reward points for helpfull answers.

  • Urgent - Implementing Work Protect Mode

    Hi,
    I implemented Work Protect Mode in the doInit method of WD.
    My view contains a form that the user has to fill.
    For some reason, if I fill all the fields and press the "save" button, <b>still</b> the propmt dialog of the Work-Protect appears - as if the data wasn't saved.
    <u>My Code is:</u>
    WDPortalWorkProtectMode.setApplicationDirtyControl(WDApplicationIsDirtyMode.STANDARD);
    String firstName = wdContext.currentContextElement().getFirstName();
    if ( firstName != null){               WDPortalWorkProtectMode.setApplicationDirty(true);
    Thanks you all so much.
    Ruthie.

    Hi Ruthie,
    Put
    WDPortalWorkProtectMode.setApplicationDirtyControl(WDApplicationIsDirtyMode.STANDARD);
    WDPortalWorkProtectMode.setApplicationDirty(true);
    to wdDoInit.
    As Valery suggested Re: Mandatory InputField
    <i>For corresponding property create SimpleType in Dictionaries / Local Dictionary / Data Types / Simple Types (see WD outline). For that simple type define either MinLength constraint to be > 0 or FixedLength constraint.
    </i>
    use new created simple type for context attribute to bind with InputFiled`s "value" property.
    And in your action handler for "Save" button put
    WDPortalWorkProtectMode.setApplicationDirty(false);
    Best regards, Maksim Rashchynski.

  • Does SQL Server has an equivalent to Oracle's OEM?

    I am not sure if this is the correct area to ask my question.  My manager asked me if SQL Server has an equivalent to Oracle's OEM.  Does it?  I mean OEM is not like Microsoft SQL Server Management Studio.
    lcerni

    Hello,
    You can use SQL Server Management Studio to manage SQL Server instances as you do with Oracle Enterprise Manager, and you can have a management and performance
    data warehouse using SQL Server Management Data Warehouse (MDW) as explained on the following article:
    http://msdn.microsoft.com/en-us/library/dd939169(v=SQL.100).aspx
    MDW data collection can be customized.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Work queue paused and CASE update fails

      We have a C160 appliance that whose Work Queue is growing. The Status shows
    System Status:  Paused on services: antispam
    How can I unpause this?  Also, when I grep the Updater logs, I see this which says at the end that the case update failed:
    Tue May 28 12:19:33 2013 Info: Starting scheduled update
    Tue May 28 12:19:33 2013 Info: Scheduled next update to occur at Tue May 28 12:24:33 2013
    Tue May 28 12:19:41 2013 Info: case started downloading files
    Tue May 28 12:19:41 2013 Info: case waiting on download lock
    Tue May 28 12:19:41 2013 Info: case acquired download lock
    Tue May 28 12:19:41 2013 Info: case beginning download of remote file "http://updates.ironport.com/case/1.0/case_rules/default/1369750263859399"
    Tue May 28 12:19:42 2013 Info: case released download lock
    Tue May 28 12:19:42 2013 Info: case successfully downloaded file "case/1.0/case_rules/default/1369750263859399"
    Tue May 28 12:19:42 2013 Info: case waiting on download lock
    Tue May 28 12:19:42 2013 Info: case acquired download lock
    Tue May 28 12:19:42 2013 Info: case beginning download of remote file "http://updates.ironport.com/case/1.0/dfa_updates/default/1369757302745197"
    Tue May 28 12:19:42 2013 Info: case released download lock
    Tue May 28 12:19:42 2013 Info: case successfully downloaded file "case/1.0/dfa_updates/default/1369757302745197"
    Tue May 28 12:19:42 2013 Info: case waiting on download lock
    Tue May 28 12:19:42 2013 Info: case acquired download lock
    Tue May 28 12:19:42 2013 Info: case beginning download of remote file "http://updates.ironport.com/case/1.0/toc_rules/default/1369755790836242"
    Tue May 28 12:19:42 2013 Info: case released download lock
    Tue May 28 12:19:42 2013 Info: case successfully downloaded file "case/1.0/toc_rules/default/1369755790836242"
    Tue May 28 12:19:42 2013 Info: case waiting on download lock
    Tue May 28 12:19:42 2013 Info: case acquired download lock
    Tue May 28 12:19:42 2013 Info: case beginning download of remote file "http://updates.ironport.com/case/1.0/pkg_version/default/1369757350776856"
    Tue May 28 12:19:42 2013 Info: case released download lock
    Tue May 28 12:19:42 2013 Info: case successfully downloaded file "case/1.0/pkg_version/default/1369757350776856"
    Tue May 28 12:19:42 2013 Info: case waiting on download lock
    Tue May 28 12:19:42 2013 Info: case acquired download lock
    Tue May 28 12:19:42 2013 Info: case beginning download of remote file "http://updates.ironport.com/case/1.0/uridb_updates/default/1369756889979770"
    Tue May 28 12:19:43 2013 Info: case released download lock
    Tue May 28 12:19:43 2013 Info: case successfully downloaded file "case/1.0/uridb_updates/default/1369756889979770"
    Tue May 28 12:19:43 2013 Info: case waiting on download lock
    Tue May 28 12:19:43 2013 Info: case acquired download lock
    Tue May 28 12:19:43 2013 Info: case beginning download of remote file "http://updates.ironport.com/case/1.0/dfa/default/1369757354605748"
    Tue May 28 12:19:43 2013 Info: case released download lock
    Tue May 28 12:19:43 2013 Info: case successfully downloaded file "case/1.0/dfa/default/1369757354605748"
    Tue May 28 12:19:43 2013 Info: case started applying files
    Tue May 28 12:19:45 2013 Warning: case update failed

       One of the other threads I found on this said that hard booting the appliance could cause corruption of the work queue, is that an issue?
      I had to modify the command to
    CLI> antispamupdate ironport force
      to get it to work, but that looks like that did the trick for the case update at least.
    EDIT:   That looks like it fixed the paued work queue as well and the queue is going down.  Thanks!

Maybe you are looking for

  • Need to paint objects from one applet into another

    Maybe this question is more at home here; I have an applet test program which uses the timer class to make a car drive across the screen. The test works fine with the rectangle I used, but now I need to use the car created in this class:    import ja

  • Weird verification email

    I recently recieved an (cheap looking) email from Apple via kudenserver.de about my apple id and its supposed problem. first of all, the email didn't make much sense gramatically so it just made me confused. it was talking about how i shared informat

  • Put SSD to sleep?

    I recently swapped out a 500 GB hard drive in my MacBook Pro running OS X 10.8.2 for a 480 GB SSD from Other World Computing. Works great and is much faster, but it does raise a question. In the Energy Saver preference pane there's an option (while o

  • How Do I Transfer Files From Mac To An iPad Air With A Lightning Wire?

    How do I transfer files from a Mac Mini to an iPad Air with a lightning wire?

  • BW 7.0 and SAP 3.1h

    Good Afternoon We are implementing BI 7.0 and we need to get data from other ERP 3.1h system, so in that system (3.1h) we can´t see the transsaction RSA5, RSA6, RSA3 and LBW. We setup the BW Add´ons Cd 51005918 on 3.1h, but we can´t see the transacti