Implementing a multithreaded queue with Berkeley DB JE edition

Hello guys,
I am implementing a queue using JE.
The Queue can have several threads pushing new entries and several threads consuming from it.
I have created one database with one string field as Key and another in the data.
The pushing thread creates a transaction cursor and just runs a put to write new entries in the queue. The consuming threads read from the queue trying and retrying with cursor.getFirst with a separated transactional cursor. Once the getFirst is successful, the thread deletes the entry.
The problem I have are the deadlocks. Multiple threads reach the very same record. So, to avoid the threads to read the same entry, I run the getFirst with a write lock until I delete the entry. It sounds good in theory, but in practice the threads are always in deadlock and the pushing thread cannot write only one row and the queue stays always empty.
Any ideas?
Thanks,

Thanks Koiaka.
This is something we haven't seen before. I have several questions.
1) Is the documentQueue Database empty (no records) at the time this occurs?
2) Please send the complete stack trace for the exception.
3) It looks like you have configured Serializable Isolation. I don't understand why this is needed for queue processing. Is there something that caused you to use this isolation mode?
4) Please send your complete Database (or EntityStore) and Environment configuration.
5) If you can send a small test (complete runnable program with a main) that reproduces this problem, it will speed up this process. If that is not possible, please send code snippets for the reader and writer threads, showing the JE calls they are making.
If the database is empty, you may need to throttle the reader threads to allow the writer to do some work. Having the readers sleep for a short interval if the queue is empty may work.
However, even without doing this, the deadlock you're seeing doesn't make sense, and I would like to get to the bottom of this. I am hoping that you can send a reproducible test program and would appreciate your help on that.
Thanks,
--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Oracle Streaming Queues in Oracle 10G standard Edition

    I would like to configure and implement Oracle Streaming Queues in Oracle 10G standard Edition. If it is possible then please guide me and give me some clues and if not then please advise me some alternate method.

    Here is the guidance you requested.
    License information:
    http://download.oracle.com/docs/cd/B19306_01/license.102/b14199/toc.htm
    Technical information:
    http://tahiti.oracle.com/
    Since I don't even know what version you have ... this is as far as I can take you.

  • How to block on MQ queue with MQControl

    I'm using WL 8.1SP4.
    I'm trying to use the com.bea.control.MQControl class. It seems like there is no way to "block" on a queue with this. It appears that the various "getMessageAs..." methods will just throw a ResourceException if there is no message on the queue. Failing a blocking capability, I have to implement a complicated wait/retry loop so the app doesn't spin waiting for a message.
    Alternatively, if my jpd has a Subscription node for the queue, if I get to that node, does that mean that there is definitely a message on the queue at that point? It would be ok if I could execute the process only when there is a message on the queue, and I could restart it each time.

    I figured out how to do this. The MQMDHeaders instance, which gets passed to the "getMessageAsString()" method, has a "waitInterval" property, which when set to "-1", will wait forever.
    What I'm not sure about, however, is whether it's valid to block for resources inside a JPD.

  • TestStand Queue with LabVIEW (replacing Batch Dialog)

    Hi,
    I want to replace the default Batch dialog UI with one made in LabVIEW with as little change as possible in the original processmodel (BatchModel.seq).
    To accomplish this, I want to use the "Create Dialog Request Queue" in the process model. I've attached a small example.
    There are 2 issues I'm struggling with:
    1: The process model use a type named "NI_BatchControllerRequest" and name the container "ControllerRequest" in the "ProcessDialogRequests" sub sequence. Can I pass this as a LV Cluster and Variant (see example).?
    2: I can't seem to get the Queue reference in LabVIEW (see LabVIEW example). It works fine if I use a name (string) instead, but the Queue in the process model use Object Reference, and I would like to keep this setting. 
    TestStand version: 4.2.1
    LabVIEW version: 2009
    (I would also like to implement this in TS 4.0 and LV 8.0)
    I'd appreciate any help on this.
    Regards
    Tom Andres Lomsdalen, CTD
    Attachments:
    TS Queue with LabVIEW.zip ‏23 KB

    I am getting the property object from Locals.ModelData.DialogRequestQueue from the sequence context of the top-level thread of the execution.  The problem with GetSyncManager is that it requires the name of an object (for which there is none).  I have the object itself.
    I have also tried to convert the object directly to a queue or a sync manager, but the conversion fails.

  • Error RFC queue with BBP_EXTREQ_TRANSFER

    Hi Experts,
    We are implementing SRM 7.02 with Classic scenario
    The Purchase requisitions are created in ERP and transfer to SRM with BBP_EXTREQ_TRANSFER
    When checking RFC queue with SMQ1 the status is SYSFAIL "Exception condition "OBJECT_ID_NOT_FOUND" raised"
    Any ideas?
    Clara

    Hello Clara,
    First, PR is released totally and you have set in the input fields of BBP_EXTREQ_TRANSFER, the PR number and date 31.12.9999, then all standard parameters.
    Also, have you created correctly the entry channel pending of Root node in PPOMA_BBP trx?, also you need to add * to BSA, BWA and DP_PROCTYPE attributes; and add your RFCUSER in this tree.
    We was attemping that issue when deploying PDP.
    Is there any reason you should use PDP instead of CPPR? Do you have PI?
    I strongly recommend you to use PDP if you want to use service hierarchies in SAP SRM with classic scenario.
    Regards,
    Sebastián

  • 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

  • Need help with Berkeley XML DB Performance

    We need help with maximizing performance of our use of Berkeley XML DB. I am filling most of the 29 part question as listed by Oracle's BDB team.
    Berkeley DB XML Performance Questionnaire
    1. Describe the Performance area that you are measuring? What is the
    current performance? What are your performance goals you hope to
    achieve?
    We are measuring the performance while loading a document during
    web application startup. It is currently taking 10-12 seconds when
    only one user is on the system. We are trying to do some testing to
    get the load time when several users are on the system.
    We would like the load time to be 5 seconds or less.
    2. What Berkeley DB XML Version? Any optional configuration flags
    specified? Are you running with any special patches? Please specify?
    dbxml 2.4.13. No special patches.
    3. What Berkeley DB Version? Any optional configuration flags
    specified? Are you running with any special patches? Please Specify.
    bdb 4.6.21. No special patches.
    4. Processor name, speed and chipset?
    Intel Xeon CPU 5150 2.66GHz
    5. Operating System and Version?
    Red Hat Enterprise Linux Relase 4 Update 6
    6. Disk Drive Type and speed?
    Don't have that information
    7. File System Type? (such as EXT2, NTFS, Reiser)
    EXT3
    8. Physical Memory Available?
    4GB
    9. Are you using Replication (HA) with Berkeley DB XML? If so, please
    describe the network you are using, and the number of Replica’s.
    No
    10. Are you using a Remote Filesystem (NFS) ? If so, for which
    Berkeley DB XML/DB files?
    No
    11. What type of mutexes do you have configured? Did you specify
    –with-mutex=? Specify what you find inn your config.log, search
    for db_cv_mutex?
    None. Did not specify -with-mutex during bdb compilation
    12. Which API are you using (C++, Java, Perl, PHP, Python, other) ?
    Which compiler and version?
    Java 1.5
    13. If you are using an Application Server or Web Server, please
    provide the name and version?
    Oracle Appication Server 10.1.3.4.0
    14. Please provide your exact Environment Configuration Flags (include
    anything specified in you DB_CONFIG file)
    Default.
    15. Please provide your Container Configuration Flags?
    final EnvironmentConfig envConf = new EnvironmentConfig();
    envConf.setAllowCreate(true); // If the environment does not
    // exist, create it.
    envConf.setInitializeCache(true); // Turn on the shared memory
    // region.
    envConf.setInitializeLocking(true); // Turn on the locking subsystem.
    envConf.setInitializeLogging(true); // Turn on the logging subsystem.
    envConf.setTransactional(true); // Turn on the transactional
    // subsystem.
    envConf.setLockDetectMode(LockDetectMode.MINWRITE);
    envConf.setThreaded(true);
    envConf.setErrorStream(System.err);
    envConf.setCacheSize(1024*1024*64);
    envConf.setMaxLockers(2000);
    envConf.setMaxLocks(2000);
    envConf.setMaxLockObjects(2000);
    envConf.setTxnMaxActive(200);
    envConf.setTxnWriteNoSync(true);
    envConf.setMaxMutexes(40000);
    16. How many XML Containers do you have? For each one please specify:
    One.
    1. The Container Configuration Flags
              XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
              xmlContainerConfig.setTransactional(true);
    xmlContainerConfig.setIndexNodes(true);
    xmlContainerConfig.setReadUncommitted(true);
    2. How many documents?
    Everytime the user logs in, the current xml document is loaded from
    a oracle database table and put it in the Berkeley XML DB.
    The documents get deleted from XML DB when the Oracle application
    server container is stopped.
    The number of documents should start with zero initially and it
    will grow with every login.
    3. What type (node or wholedoc)?
    Node
    4. Please indicate the minimum, maximum and average size of
    documents?
    The minimum is about 2MB and the maximum could 20MB. The average
    mostly about 5MB.
    5. Are you using document data? If so please describe how?
    We are using document data only to save changes made
    to the application data in a web application. The final save goes
    to the relational database. Berkeley XML DB is just used to store
    temporary data since going to the relational database for each change
    will cause severe performance issues.
    17. Please describe the shape of one of your typical documents? Please
    do this by sending us a skeleton XML document.
    Due to the sensitive nature of the data, I can provide XML schema instead.
    18. What is the rate of document insertion/update required or
    expected? Are you doing partial node updates (via XmlModify) or
    replacing the document?
    The document is inserted during user login. Any change made to the application
    data grid or other data components gets saved in Berkeley DB. We also have
    an automatic save every two minutes. The final save from the application
    gets saved in a relational database.
    19. What is the query rate required/expected?
    Users will not be entering data rapidly. There will be lot of think time
    before the users enter/modify data in the web application. This is a pilot
    project but when we go live with this application, we will expect 25 users
    at the same time.
    20. XQuery -- supply some sample queries
    1. Please provide the Query Plan
    2. Are you using DBXML_INDEX_NODES?
    Yes.
    3. Display the indices you have defined for the specific query.
         XmlIndexSpecification spec = container.getIndexSpecification();
         // ids
         spec.addIndex("", "id", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addIndex("", "idref", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // index to cover AttributeValue/Description
         spec.addIndex("", "Description", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_SUBSTRING, XmlValue.STRING);
         // cover AttributeValue/@value
         spec.addIndex("", "value", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // item attribute values
         spec.addIndex("", "type", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // default index
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // save the spec to the container
         XmlUpdateContext uc = xmlManager.createUpdateContext();
         container.setIndexSpecification(spec, uc);
    4. If this is a large query, please consider sending a smaller
    query (and query plan) that demonstrates the problem.
    21. Are you running with Transactions? If so please provide any
    transactions flags you specify with any API calls.
    Yes. READ_UNCOMMITED in some and READ_COMMITTED in other transactions.
    22. If your application is transactional, are your log files stored on
    the same disk as your containers/databases?
    Yes.
    23. Do you use AUTO_COMMIT?
         No.
    24. Please list any non-transactional operations performed?
    No.
    25. How many threads of control are running? How many threads in read
    only mode? How many threads are updating?
    We use Berkeley XML DB within the context of a struts web application.
    Each user logged into the web application will be running a bdb transactoin
    within the context of a struts action thread.
    26. Please include a paragraph describing the performance measurements
    you have made. Please specifically list any Berkeley DB operations
    where the performance is currently insufficient.
    We are clocking 10-12 seconds of loading a document from dbd when
    five users are on the system.
    getContainer().getDocument(documentName);
    27. What performance level do you hope to achieve?
    We would like to get less than 5 seconds when 25 users are on the system.
    28. Please send us the output of the following db_stat utility commands
    after your application has been running under "normal" load for some
    period of time:
    % db_stat -h database environment -c
    % db_stat -h database environment -l
    % db_stat -h database environment -m
    % db_stat -h database environment -r
    % db_stat -h database environment -t
    (These commands require the db_stat utility access a shared database
    environment. If your application has a private environment, please
    remove the DB_PRIVATE flag used when the environment is created, so
    you can obtain these measurements. If removing the DB_PRIVATE flag
    is not possible, let us know and we can discuss alternatives with
    you.)
    If your application has periods of "good" and "bad" performance,
    please run the above list of commands several times, during both
    good and bad periods, and additionally specify the -Z flags (so
    the output of each command isn't cumulative).
    When possible, please run basic system performance reporting tools
    during the time you are measuring the application's performance.
    For example, on UNIX systems, the vmstat and iostat utilities are
    good choices.
    Will give this information soon.
    29. Are there any other significant applications running on this
    system? Are you using Berkeley DB outside of Berkeley DB XML?
    Please describe the application?
    No to the first two questions.
    The web application is an online review of test questions. The users
    login and then review the items one by one. The relational database
    holds the data in xml. During application load, the application
    retrieves the xml and then saves it to bdb. While the user
    is making changes to the data in the application, it writes those
    changes to bdb. Finally when the user hits the SAVE button, the data
    gets saved to the relational database. We also have an automatic save
    every two minues, which saves bdb xml data and saves it to relational
    database.
    Thanks,
    Madhav
    [email protected]

    Could it be that you simply do not have set up indexes to support your query? If so, you could do some basic testing using the dbxml shell:
    milu@colinux:~/xpg > dbxml -h ~/dbenv
    Joined existing environment
    dbxml> setverbose 7 2
    dbxml> open tv.dbxml
    dbxml> listIndexes
    dbxml> query     { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }
    dbxml> queryplan { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }Verbosity will make the engine display some (rather cryptic) information on index usage. I can't remember where the output is explained; my feeling is that "V(...)" means the index is being used (which is good), but that observation may not be accurate. Note that some details in the setVerbose command could differ, as I'm using 2.4.16 while you're using 2.4.13.
    Also, take a look at the query plan. You can post it here and some people will be able to diagnose it.
    Michael Ludwig

  • How to get all the recipients of a server queue with powershell

    Hello,
    I have a queue who remains "full" because there was a bounce email sent to invalid addresses. I am looking for an easy way to list all the recipients with invalid addresses.
    I can have the list of emails in the queue with this command :
    get-queue -identity ServerName\Shadow\37057 | get-message
    But I am unable to list the recipient address with this one :
    get-queue -identity POST1MTY\Shadow\37057 | get-message -IncludeRecipient
    Can somebody help me with this ?
    Thank you in advance for your help.
    zigune

    Hi zigune,
    Thank you for your question.
    We could try to the following command to get the recipient address:
    Get-MessageTrackingLog –server “servername” | FL sender,Event-id,recipients | export-csv C:\test\test.csv
    Then, we could use log parser to view csv file for invalid recipient address, we could download log parser tool by the following link:
    http://www.microsoft.com/en-us/download/details.aspx?id=24659
    In other way, we could also try adding the “-IncludeRecipientInfo” in command:
    http://technet.microsoft.com/en-us/library/bb124738(v=exchg.150).aspx
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim

  • Message stuck in Adapter Engine queue with status "Delivering"

    Hi All,
    I have a File to File EOIO scenario. The messages are sucessfully delivered from IE to AE. All entries have a chequered flag in SXMB_MONI. No messages are stuck in IE queue (SMQ2). But the message is stuck in AE queue with status "Delivering". I can not resend or cancel the message coz the status is "delivering".
    The reason it is in "delivering" status is due to some config error that I made in Communication Channel FTP parameters. Now it is corrected. But how do I deal with this message now?
    Restart of server is not an option here. Is there are place I can delete the message from AE queue?
    Thanks
    Jaishankar

    You can see the queues status (and number of stuck entries etc) through the link:
    http://<host>:<port>/MessagingSystem/monitor/systemStatus.jsp
    There, you can maintain the queues.
    There is also a link for the EOIO Sequence Monitor:
    http://<host>:<port>/MessagingSystem/monitor/sequenceMonitor.jsp
    There you can see the stuck messages and maintain these.
    Make sure to handle the proper message IDs.
    All of these are acessible through the Messaging System main page:
    http://<host>:<port>/MessagingSystem/
    Regards,
    Henrique.

  • Reading Advance Queuing with XMLType payload and JDBC Driver character encoding

    Hi
    I've got a problem retrieving the message from the queue with XMLType payload in Java.
    It was working fine in 10g database but after the switch to 11g it returns corrupted string instead of real XML message. Database NLS_LANG setting is AL32UTF8
    It is said that JDBC driver should deal with that automatically but it obviously don't in this case. When I dequeue the message using database functionality (DBMS_AQ package) it looks fine but not when using JDBC driver so Ithink it is character encoding issue or so. The message itself is enqueued by the database and supposed to be retrieved by dedicated EJB.
    Driver file used: ojdbc6.jar
    Additional libraries: aqapi.jar, xdb.jar
    All file taken from 11g database installation.
    What shoul dI do to get the xml message correctly?

    Do you mean NLS_LANG is AL32UTF8 or the database character set is AL32UTF8? What is the database character set (SELECT value FROM nls_database_parameters WHERE parameter='NLS_CHARACTERSET')?
    Thanks,
    Sergiusz

  • ESB 10.1.3.1 Not Connecting to AQ QUEUE with error

    We are having problems getting the ESB service to connect to an AQ queue to dequeue messages;
    Platform: SOLARIS 10 SPARC 64
    Version: 10.1.3.1 ESB
    Database: 10.2.0.2
    Scenario: BPEL process enqueues message successfully. ESB process not able to connect to dequeue.
    Reproduceable steps:
    1) Create QUEUE table, queue and start queue for a user with Roles AQ_Administrator_ROLE, AQ_USER_ROLE, DBA;
    2) Enqueue message. Message payload type is RAW;
    3) ESB service defines an inbound adapter service to above and succesfully deploys project to esb container;
    4) Logs report the following errors:
    ERROR1) >JCA: MessageReader_ReadMessage: Could not create XML document carrying AQ Head
    ers: [Ljava.lang.StackTraceElement;@d7f3e3</MSG_TEXT>
    ERROR2) <SUPPL_DETAIL><![CDATA[java.lang.NullPointerException
    at oracle.AQ.AQOracleQueue.dequeue(AQOracleQueue.java:1715)
    at oracle.AQ.AQOracleQueue.dequeue(AQOracleQueue.java:1290)
    at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:400)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeu
    er.java:189)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:81
    9)
    at java.lang.Thread.run(Thread.java:595)
    ]]></SUPPL_DETAIL>
    VERIFICATION: First of all, the BPEL process is successfully submitting messages to AQ QUEUE so AQ is configured properly at the database level. We verified queue table has a message in it via sql plus;
    RELATED ISSUES:
    1) JDEV designer is not finding queues with payload types such as JMS_TEXT_MESSAGE. We were forced to use RAW. There is probably a bug in JDEV IDE regards its inability to view valid queues in the database simply based on payload. This is easily reproducible.
    2) log.xml is very unhelpful way to view a log. This should be discarded in OAS in future releases as it is not practical.

    Yes, WebLogic 10.1.3.6 can interoperate with 9.2. SAF agents are "Store and Forward" agents, so they'd need to run in the source cluster. If you need to get messages from a remote destinations into a local SAF "imported destinations", or just a plain-old destination, then perhaps the best option would be to deploy a simple MDB on the 10.3.6 cluster (some layered products can setup such an MDB for you).
    I'm not familiar with ESB, but assume that it already provides tooling for pulling messages from remote destinations (I assume a product like ESB is designed to try and more-or-less hide JMS details from the user by providing layered tooling...). You might be able to get help from an ESB newsgroup. If this doesn't help, you may also want to see the JMS interop FAQ:
    http://docs.oracle.com/cd/E21764_01/web.1111/e13727/interop.htm#JMSPG553
    BTW, It's not clear to me why you need SAF Agents in this use case.
    Tom

  • Purge a queue with JAVA API

    Hi,
    Is it possible to purge a queue with the JAVA API ?
    I have not found anything ...
    I am also trying to browse archived messages (state 2), the "browseQueue" method does only browse the ready messages (state 0).
    Is it possible to browse archived messages ?? (in java)
    Thanks in advance.

    found it, I had to write
    "ormi://<some-ip>:12401/orabpel" for java.naming.provider.url

  • Queue with callback function not dequeuing

    Hi,
    I would like to ask you for help or for a hint regarding our problem with the queue:
    A trigger is enqueuing to a queue. This works fine, but the callback function is never called. The queue already worked for a while, but since i changed something at the procedure called by the callback it does not work anymore.
    I already have tried the following:
    -Stopping and restarting
    -Dropping and recreating (with the scheduler having no jobs anymore)
    -Dropping, restarting the database and recreating
    None of these worked. Where do I fail, when considering that the queue with the same scripts worked already? I post the script for creating the queue and adding the subscriber:
    CREATE OR REPLACE TYPE pat_history_queue_payload_type AS OBJECT
    ( TSTAMP VARCHAR2(22 CHAR),
    TYP VARCHAR2(10 CHAR),
    DELTA_MENGE NUMBER,
    ORIGIN VARCHAR2(1 CHAR),
    TEXT VARCHAR2(1000 CHAR),
    QL_TSTAMP VARCHAR2(22 CHAR)
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE (
    queue_table => 'pat_history_queue_table',
    queue_payload_type => 'pat_history_queue_payload_type',
    multiple_consumers => TRUE
    END;
    BEGIN
    DBMS_AQADM.CREATE_QUEUE (
    queue_name => 'pat_history_queue',
    queue_table => 'pat_history_queue_table',
    max_retries => 10
    DBMS_AQADM.START_QUEUE (
    queue_name => 'pat_history_queue'
    END;
    BEGIN
    DBMS_AQADM.ADD_SUBSCRIBER (
    queue_name => 'pat_history_queue',
    subscriber => SYS.AQ$_AGENT(
    'pat_history_queue_subscriber',
    NULL,
    NULL )
    DBMS_AQ.REGISTER (
    SYS.AQ$_REG_INFO_LIST(
    SYS.AQ$_REG_INFO(
    'pat_history_queue:pat_history_queue_subscriber',
    DBMS_AQ.NAMESPACE_AQ,
    'plsql://PAT.HISTORY_QUEUE_DISTRIBUTION.CALLBACK',
    HEXTORAW('FF')
    1
    END;
    The function CALLBACK which is called by the queue, is never called, I checked that with log messages. Also the package that contains the function is compiled ok.
    Thanks.
    Roland

    Hi,
    Does the subscription show up correct in sys.reg$ ?
    Regards,
    Harry
    http://dbaharrison.blogspot.com/

  • Best way to iniitialize a queue with array elements

    Hi Guys
    I'm looking for a bit of performance optimization..  
    I'm developing a noise measurement application using LV8.6 and Win Xp /Win 7.
    To put it very simple I have a loop that samples, and a loop that does the math. data is shipped in a queue, producer / consumer style.
    So far so good.. Question is - is there a specific and more optimized way to declare this queue?
    I was wondering if declaring the queue with an initialized array element of a fixed size (the number of samples pr. read from the sound card will be known at runtime) would produce a queue that would be less heavy on dynamic allocation of memory compared to a queue obtained using a simple control no values.
    I've attached a screen dump to maybe make the question more obvious..
    I've been thru the "clear as mud" thread, as recommended in other threads that covers this topic - but i gets very high tech, and I kind of lost my way in it.. So looking for a more simple "you should use solution #x, because..."
    Thank you in advance. 
    Solved!
    Go to Solution.

    I believe (but am not sure) RT FIFOs will allocate this memory for you ahead of time. But, remember they are not deterministic on windows. You need to wire an array constant of the correct size into the FIFO read function also to avoid memory allocation, which is easy to overlook. It's worth looking into, if nothing else, assuming you have RT functions available. WIth this method, the queue size needs to be set, and you run the risk of overflowing and losing elements if not handled correctly. 
    Just throwing other options out there.
    CLA, LabVIEW Versions 2010-2013

  • PLSQL Notification on a multi-subscriber queue with sys.aq$_jms_text_messag

    Hi all,
    I am trying to get PLSQL notification working on a multi subscriber queue with sys.aq$jms_text_message as the payload type. The commands to create my queue are as follows:
    dbms_aqadm.create_queue_table(
    queue_table => 'SOA_JMS.RJMTESTxx_QTAB',
    multiple_consumers => true,
    queue_payload_type => 'sys.aq$_jms_text_message'
    dbms_aqadm.create_queue(
    queue_name=>'RJMTESTQ',
    queue_table => 'SOA_JMS.RJMTESTxx_QTAB',
    retention_time => 86400, --Keep processed messages for 24 hours
    max_retries => 3,
    retry_delay => 1
    dbms_aqadm.start_queue('RJMTESTQ');
    dbms_aqadm.add_subscriber(
    queue_name => 'SOA_JMS.RJMTESTQ',
    subscriber => sys.aq$_agent('SUBSCRIP1',null,0),
    rule => NULL,
    transformation => NULL,
    queue_to_queue => FALSE,
    delivery_mode => dbms_aqadm.persistent
    I then create a procedure with the following signature:
    create or replace procedure SOA_JMS.EXCEPTION_QUEUE_NOFIFYCB_1(
    p_context in raw,
    p_reginfo in sys.aq$_reg_info,
    p_descr in sys.aq$_descriptor,
    p_payload in raw,
    p_payloadl in number
    And register it as follows:
    reginfo := sys.aq$_reg_info(
    'SOA_JMS.RJMTESTQ:SUBSCRIP1',
    DBMS_AQ.NAMESPACE_AQ,
    'plsql://SOA_JMS.EXCEPTION_QUEUE_NOFIFYCB_1?PR=0',
    --utl_raw.cast_to_raw('STANDARDJMS')
    HEXTORAW('FF')
    reg_list := sys.aq$_reg_info_list(reginfo);
    dbms_aq.register(reg_list,1);
    The problem is the notifications are not firing as they should be.
    I have done some tracing and found an error:
    Error in PLSQL notification of msgid:BA964334E5A057A4E040C69BAF397075
    Queue :"SOA_JMS"."RJMTESTQ"
    Consumer Name :SUBSCRIP1
    PLSQL function :SOA_JMS.EXCEPTION_QUEUE_NOFIFYCB_1
    : Exception Occured, Error msg:
    ORA-00604: error occurred at recursive SQL level 2
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'EXCEPTION_QUEUE_NOFIFYCB_1'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    This says that the parameters I have for my procedure is wrong. Looking through the documents I think it is something to do with the ?PR=0 used in the register call, but I can’t find any documentation telling me what the required parameters are.
    Does anyone here know?
    Thanks
    Robert

    Hi,
    I have found the solution and I am posting here in case it helps anyone else.
    The paramater names must match the callback not just the types and in/out.
    So the following works:
    create or replace procedure SOA_JMS.EXCEPTION_QUEUE_NOFIFYCB_2(
    context in raw,
    reginfo in sys.aq$_reg_info,
    descr in sys.aq$_descriptor,
    payload in raw,
    payloadl in number
    Robert

Maybe you are looking for

  • RE: how can two Forte installtion communicate

    Hi, I have similar arrangement here but for "user acceptence test". However, may I remind you that when some objects/codes got checked out --> overwrite with new import --> integrate --> check out again. Some funny things ( I would say corruption ) m

  • Does anyone know how to enable/disable a dropdown menu in Forms at runtime?

    Is there a way how to disable/enable dropdown menu for menus that have multiple sub levels in Oracle Forms? I am trying to use the set_menu_item_property function but this takes 'menu.item' format for the first argument. I am trying to enable/disable

  • Dladm and lacp

    Hi, i installed the e1000g driver on my t2000. now i want to use linkaggregation with dladm. I setup 1 aggregate with 2 interfaces, each interface is physically connected to another switch (2 cisco 6500 trunked). The setup of the trunking with dladm

  • Trial version of Photoshop CS6

    Hi, I am learning how to edit face images for a psychology experiment using the trial version of Photoshop cs6. I've made some alterations and saved my files. Does the trial version have any restrictions when you save? i.e., can I work on these image

  • I have downloaded Photoshop Elements 11 to my Samsung Data 1 tablet. How do I open it?

    I have downloaded Photoshop Elements 11 to my Samsung Data 1 Tablet, but when I try to open it, I get an error message saying "unable to find the application to perform this action".  What application do I need?