Multiple Queues -- HELP!!!

I have to do a program using data structures, queues to implement a supermarket with 3 counters.
Therefore I will need 3 queues;
Do i use array to implement the queues?
I can save all customer details into a single queue but can't save it into either 1 of an array of queues.
Queue[] q = new Queue[3];
q[0].enqueue(new Customer(name));
For my Queue class, how to cater for arrays??
Is the above correct???

You can use an array to implement queues, although I wouldn't. I think you should use a java.util.LinkedList.
Once you have an implementation of a queue, you can have an array of queue objects. That's what the code snippets you posted seem to suggest.

Similar Messages

  • How do I use same MDB for multiple Queues? Deployment ?

              Here is what I am trying to do
              I have written one MDB that I want to use for multiple queues. I have seen posting
              mentioning that code a new weblogic-ejb-jar.xml to define other queues as the
              solution.
              Is there any other work around?
              I want to add queues in future as and when needed. I don't want to modify the
              already deployed jar to replace it with new weblogic-ejb-jar.xml everytime I have
              to add another queue for the message-driven-bean. Is is possible to use some kind
              of reference tag and just put weblogic-ejb-jar.xml in a new jar file and deply
              that every time I have a new queue to use for this MDB ( I don't think so, but
              again ???).
              Any help would be greatly appreciated.
              Chris
              

    Sorry -- that's the only solution for now.
              greg
              "Chris" <[email protected]> wrote in message
              news:[email protected]..
              >
              > Here is what I am trying to do
              >
              > I have written one MDB that I want to use for multiple queues. I have seen
              posting
              > mentioning that code a new weblogic-ejb-jar.xml to define other queues as
              the
              > solution.
              >
              > Is there any other work around?
              >
              > I want to add queues in future as and when needed. I don't want to modify
              the
              > already deployed jar to replace it with new weblogic-ejb-jar.xml everytime
              I have
              > to add another queue for the message-driven-bean. Is is possible to use
              some kind
              > of reference tag and just put weblogic-ejb-jar.xml in a new jar file and
              deply
              > that every time I have a new queue to use for this MDB ( I don't think so,
              but
              > again ???).
              >
              > Any help would be greatly appreciated.
              >
              > Chris
              

  • Http to Abap Proxy communication with multiple queues generation in Recevr

    Dear SDNs,
    I need some help in the following scenario, appreciate your suggestions and help .
    I am receiving the messages from sender to PI on http posting, from PI  I am sending the message to SAP system using receiver xi communication channel ( receiver is abap proxy).
    Sender will send the messages in QOS=EOIO, QUEueID=XXXt_100 etc  parameters, when large volumes cases, it is getting delayed to process it using a single queue.
    We are thinking to dynamically  generate multiple queues in PI and send the same queue ids to receiver SAP system to process all the messages quickly in SAP System also.
    Help /Clarifications needed:
    1. XI receiver communication channel in  pi  does not provide any options to generate dynamic queue id based on payload content (using dynamic configuration) and sent it to SAP.
    2. Module Tab in receiver communication channel also got disabled to add  custom adapter modules, can we add custome adapter module on xi receiver channel to generate dynamic queue id ?
    Really appreciate your immediate help and suggestions.
    Thanks.
    Suraj.

    Dear Praveen,
    Thanks lot for the immediate reply, we need to use EOIO, as the messages need to be processed in the same order we send and receive, there is no flexibility in QOS=EOIO, Appreciate if there is any other thoughts?
    Thanks In Advance.
    Suraj.

  • How can a JMS adapter be configured in BPEL to consume messages from multiple queues ?

    How can a JMS adapter be configured in BPEL to consume messages from multiple queues ?

    If you want to use JMS with AQ as datastore then there is some configuration you need to do to enable this. This is outside SOA Suite per sa, e.g. no adapter required.
    If you want to connect to the AQ direct then use the AQ adapter.
    this blog may be of some help understand the configuration
    http://biemond.blogspot.com/2008/01/oracle-jms-with-esb-and-bpel.html
    cheers
    James

  • Queue Scaling by Multiple Queues

    Hi,
    I see that there is an option to "Scale" Instances in Azure Management portal.
    My question is pertaining to scaling based on "Queue"?
    I have a Cloud Service and I want to increase instances based on MULTIPLE QUEUES. Is it possible?
    Currently, it allows to scale by only one queue.
    Apppreciate any help on the matter.
    Viral.

    I'm sorry but it's possibile to configure the service to scale by only one queue.
    Davide 'n3wt0n' Benvegnù
    If you found my answer helpful, please vote it.
    If you think that my answer resolve your issue, plase "Mark it as answer".

  • Multiple Queues(Content Specific) - Can't get more than two queues

    Hi,
    I have a ccBPM scenario, which collects messages read by the file adapter and then sends them grouped.
    It's working fine in many different configurations, but I'd like to configure it in a way described in the PDF "How Tou2026 Configure Inbound Processing in ccBPM Part II: Queue Assignment", which is using Multiple queues - content specific.
    If I put 2 queues (after defining a correlation for a message field batchID), it works fine. The messages with batchID=A are processed by one instance process from queue 001, and the messages with batchID=B are processed by another instance process from queue 002.
    But if I put 4 queues (SWF_INB_CONF), all the message still keep going to just 2 queues, and not 4. There is no problem, because still the messages with batchID = X are all processed by the same instance process, but I want to add more parallelization to the process using 4 queues.
    I've refreshed cache and reactivated, but it will still work with 2 queues and not 4. I've also made sure that the files read have 4 different batchIDs equally distributed among all the files.
    I don't know what I'm missing...
    Thanks!

    Solved it with SAP help.
    It seems that even if you config 4 queues (content-specific) to be used in SWF_INB_CONF, it is normal that not all queues allowed are used at runtime. The messages are distributed to the queues based on the correlation defined for the process, narrowing down the result afterwards to the number of allowed queues using a hash algorithm.
    Often it is necessary to specify 50-100% more queues to load the actually intended number of queues with messages.
    I could reach 4 queues really used setting the parameter to 10 queues.

  • Support package upgrade / SPAU with multiple queues

    Hello,  We are upgrading our support package level on our ECC 6.0 system.  I divided up the support packages into 4 different queues:
    SAP_BASIS
    SAP_ABA
    PI_BASIS
    ST-PI
    SAP_BW
    SAP_AP
    SAP-HR
    After importing each queue, I had a few things to do in SPDD and SPAU.  I created a new SPDD or SPAU transport request for each queue.  My question is now what is the recommended procedure to handle these SPAU/SPDD transport requests when you have multiple queues?  I plan to define the same queues when doing QA and PRD.  Do I mark all of the requests and then when I do each queue, I only specify that particular request?  Thank you in advance for your help.
    Best regards,
    Russ Cook

    Hi Russ,
    when did you export the different SPAU requests or didn't you export them at all?
    If the export happens only after all queues are already imported, this final system state (component version + SP level) is stored in the requests.You are then not able to include e.g. the request for the SAP_BASIS SPs into the SAP_BASIS queue, because the other components are still on the old version, while according to the request they should be on the newer state.
    So, the right procedure would be; import the SP queue, do the modification adjustment for this queue, mark the workbench request as modification adjustment transport request and export this request. Then you can import the next SP queue.
    Best regards,
      Dirk

  • Behaviour of multiple queue receivers on same queue

    I have been trying to find out what exactly the jms specification states about having multiple queue receivers registered on the same queue. Some books and people say that one is only supposed to register one queue receiver per queue, if this is the case then one might as well use one topic subscriber per topic (what is the utiliy of a queue then).
    I believe that one is allowed to register multiple queue receivers on a queue, and a message will only be consumed by exactly one and only one queue receiver, thus allowing for true parallel processing. This is the behaviour I have observed when using jms on both JBoss and Weblogic (and apparantly is the same on Websphere).
    I have looked at the formal JMS spec from sun and they dont make it clear what the behaviour of multiple queue receivers on queue is. Can somebody PLEASE help me clear this up.

    The behaviour is undefined by the spec. Here is what it says:
    "Although it is possible to have two sessions with a QueueReceiver for the same queue, JMS does not define how messages are distributed between the QueueReceivers."
    However, multiple receivers on a single queue is a very popular design pattern. A typically pattern is to use the queue as a worklist and for work items to be posted to the queue. There is then a collection of workers who are registered as queue receivers picking out their work items from the queue. These workers are processing in parallel and as the workload increases you respond by add more workers.
    This pattern is usable where message ordering is not important and that the workers are stateless.
    Steve

  • UCCX agent multiple queues

    If a agent belongs to multiple queues is there away for the agent to know which queue the call is coming from.
    The end user is using ip phone agent, not desktop agent.
    ex.
    queue a xyz company sales
    queue b xyz company support
    They want to be able to greet the customer with the appropriate department.
    Thanks,
    Rob.                  

    To do this, you'll need to create a telecaster user in CUCM and assign your agent phones to this user. In the Cisco Desktop adminsitartor web portal you need to enter your telecaster user details under CAD Configuration Setup -> BIPPA User Login.
    To configure what fields are displayed go to the Cisco Desktop Adminitrator  web portal -> Services Configuration -> Enterprise Data -> Layout List -> default. Edit the fields here you want to display. You might need to populate one of the call variables in your script with the CSQ name.
    Seehttp://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_0/installation/guide/cad80ccxig-cm.pdf pages 55 and 57.
    Brian
    Please rate helpful posts

  • Multiple Queue Assignment for Integration Process - PI 7.11

    Hi,
    I am trying to configure multiple Queues for an Integration Process.
    The Integration Process is straight forward, except for a Asynchronous Request Response pattern with correlation. (A asynch send step - immediately followed by a asynchronous receive step with Correlation)
    I have done the following
    1) In IR set the Queue as Multiple - Content Specific
    2) In SWF_INB_CONF transaction reconfigured Multiple Queues - Content Specific without buffering
    But when I trigger the message, the message is not at all triggering/entering the Integration Process. The error message is BPE Internal Failure.
    But if I reconfigure the IP as One Configurable Queue & "Without Buffering", it is working. But we want multiple queues assigned to this Process.
    Thanks in advance.
    Regards,
    Sudharshan N A

    Bjoern, there are blogs/wikis available which should be searched before a question is asked on forum. The information you need is quite basic one and I will therefore lock this thread.
    Regards,
    Prateek

  • How to implement multiple queues in one circular buffer?

    Spoiler (Highlight to read)
    Recently I have successfully shared data of 2D array among different vis in a project, using circular buffer.
    However, there is only one circular buffer allowed in one project for one data type.
    I want different vis, running and getting data from circular buffer in different speed, all getting data as a queue from circular buffer. Like the circular buffer's read continuous mode.
    The problem is that after a vi reads in continuous mode, the read data is deleted from the circular buffer. Then other vis can not use them any more and can not keep track where they should begin to read again.
    So if it is possible that there are multiple pointers or queues in circular buffer to keep track the progress of different vis, and data only update when it gets input from DAQ but not deleted when read?   

    LawrenceChong wrote:
    Spoiler (Highlight to read)
    Recently I have successfully shared data of 2D array among different vis in a project, using circular buffer.
    However, there is only one circular buffer allowed in one project for one data type.
    I want different vis, running and getting data from circular buffer in different speed, all getting data as a queue from circular buffer. Like the circular buffer's read continuous mode.
    The problem is that after a vi reads in continuous mode, the read data is deleted from the circular buffer. Then other vis can not use them any more and can not keep track where they should begin to read again.
    So if it is possible that there are multiple pointers or queues in circular buffer to keep track the progress of different vis, and data only update when it gets input from DAQ but not deleted when read?   
    THe last time I wrote a multi-subscriber cirular buffer was in LV 6. Since then I have found that polymorphic queues perform much better so I now use multiple queues. One queue for each subscriber of the data. The subscribers are then responsible for maintaining their own histories.
    So just use multiple queues.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to implement multiple Value Helps within the same Application ??

    Dear Experts,
    I want to implement multiple value helps in the same view.For that I have declared exporting parameters of type 'wdy_key_value_table.' within the component controller for each of the value helps.While I do activate and test the application I get the following error :
    The following error text was processed in the system HE6 : A row with the same key already exists.
    The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 4 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: IF_PO_VIEW1~VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: WDDOINIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
    I dont know how to implement multiple value helps.Need your help on this.
    Regards,
    Mamai.

    Hi
    Hint is : A row with the same key already exists it means , It is assigning the same value/Key to row and you are calling it at WDDOINIT  so it giving error at the time of initialization .
    Better way to do the coding at some event in view OR if not possible than just execute the first value help in wddoinit later clear all the value before gettig the other Value help. Code it at WdDoModify View to get its run time behaviour.
    BR
    Satish Kumar

  • Multiple queue vs single queue - peformance

    Hi All,
    Could pls throw some light on the following design.
    Currenty, We have more than 100 queues and for each there is a different MDB to receive the message.Now, somehow we made a single instance of same MDB listen to all these queues by looking at the input message. The requiement now is, is it possible to club all the queues into single queue as it's asynchronous messaging. The receiver may also try write into the same queue at the end of message processing.If so, how would be performance. Is this performance better than having multiple queues?.
    The message are expecting to be 25 k/day in the queue. And we are using Weblogic server.
    Please let me know if you need more details.
    Thanks
    Srinath

    You could try to use selectors to assign messages to particular MDBs. This way you off load some of the work on the broker but selectors by their nature usually have an impact on broker's performance. It all depends on your application, your expectations, size and the rate of your messages, how long it takes to process them on the client side. There is no simple answer in this case. You would have to test some scenarios to come up with a best solution that fits your requirements. Having said that I personally believe that some degree of partitioning of your queue could be beneficial. On a heavily loaded system it may increase the concurrency of the system and its resilience, particularly if you place the queues in different brokers. Try to imagine your broker as if it was a DB server with just one table (I'm not sure if this is the best analogy but I can't think about anything else at the moment).

  • Multiple Queues in BPM

    Hey,
        In case of multiple queues in BPM.
        say for instance multiple queues(random)      
        When we check in SXI_MONITOR, in the QueueID column we get :
              XBPE_TaskId_No_QueueId.
    Please can you tell me what is the significance of  "No" in the above QueueId
    normally its 1 or 2.
        can you also tell me how it affects the queue behavior.
    regards,
           Milan

    Prateek that is what i have done.
    two files are picked from the file adapter they are merged and placed back on the ftp.
    Now this scenario was working as expected when the no was 1. (i.e it went into sysfail, when both the files of the same instance entered different queues)
    but in subsequent runs, when no was 2,  it started working as i have explained. (i.e. it worked absolutely fine without getting into sysfail)
    I have not done any changes in the configuration it happened automatically.
    so i am not able to understand the phenomena.
    regards,
        Milan

  • Multiple Queues - Dequeueing resources?

    We have multiple queues on our database which have been configured to be automatically processed by registering stored procedures with each of the queues. The processing of messages works fine, however if we have messages in both queues then it appears as though an attempt is made to process all messages in one queue before it processes messages in the other queue. Are there any settings that we can look at setting to distribute the processing equally between queues?

    Other than job_queue_processes, I don't know.
    Have you made any progress with this?

Maybe you are looking for

  • Error message 8268 when downloading music tracks

    Get this constantly flashing up on screen, cannot get rid of the window, no music download exists, please can someone tell me how to get rid of it, every time I try to do anything in itunes its comes up every 2 seconds

  • How to delete unwanted Import Presets?

    ... in the pulldown menu in the tab at the bottom of the IMPORT window in Lightroom 3, please? Thanks, Bradley

  • The filter ´liquify´does´nt work in a trial of Photoshop

    I´ve installed a trial of Photoshop, via CC, and the filter ´liquify´ does´nt work. Is it normal on a trial?

  • How to disable login mail checking?

    I would like to disable the mail checking on each login: I am not interested in seeing "No new mail" or else each time I login in a console. In other distributions, there was a specific setting in /etc/login.defs: MAIL_CHECK_ENAB = no I do not find t

  • New Password every few months? Why?

    I know this question has been asked before, but the only place I can find it is in the archives so the topic is locked and there are no answers in it. I would like to know why SOME users have to reset their password every few months (a big, unnecessa