How to limit the number of instances of an MDB?

Hi,
I am using jboss 4.0.5 AS, and we have an mdb which listens to the jboss's jms queue. We are using ejb 3.
we are configuring MDB like this
@MessageDriven(name="LongProcessMessageBean", activationConfig = {
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/examples/OurSampleQueue")
@ActivationConfigProperty(propertyName="maxSession", propertyValue="1")
When there are multiple messages to the queue at the same time, it is creating multiple instances of the MDB, i want to limit the MDB instances to 1 ( I used maxSession=1, but it is not working).
When the messages to the JMS queue are increasing, after certain point it is saying that the unable to allocate memory....threadpool is full.
any suggestion would be appreciated............
thanks.

Hmmmm... I found the cause of the problem. The onMessage() method of the MDB is using some DB backend. This backend was catching an exception and continuing normally, but for some reason, the MDB executed six more times. Something like

Similar Messages

  • Limit the number of instances

    Hello all,
    I have been reading a lot of articles on the internet the last days on how to limit the number of instances for an asynchronous ftp process. I connect to an FTP every hour and transfer all the .xml file that are available. After FTP there is some more processing that has to be done.
    For the moment when the customer uploads 20 files to his FTP, 20 instances of the same process are started. I want to limit this number to 5. I have been playing with all the possible parameters found on the internet and have been applying all the rules (like sum of workerbean and invokerbean ... sum of dspMaxThreads of all domains), but none of them worked !
    I have put this process out of my production environment for the moment until I know how to control the number of instances.
    The version I'm using is 10.1.3.3.0
    If I don't get this solved I will be upgrading to 10.1.3.5 but I have no guarantee that the upgrade will do the trick ....
    Home someone can help ...
    Thanks,
    Best regards,
    Tom.

    Hmmmm... I found the cause of the problem. The onMessage() method of the MDB is using some DB backend. This backend was catching an exception and continuing normally, but for some reason, the MDB executed six more times. Something like

  • How to limit the number of items in a KPI Status list web part?

    How to limit the number of items in a KPI Status list web part? There is no paging option for Business Category Status list or any limit can be made by changing the Item limit in default view unlike other SharePoint List web parts. So How to achieve it?
    Kindly help.
    Regards,
    ZA
    zzzSharePoint

    Hi,
    According your post, I know you would like to set the item display limit in Status List web part.
    In the web part, the number of items to display is based on the view which you selected when configuring the web part. The default view for status list is status list view.
    However, I am not able to limit the items’ display number of the status list view. After changing the items limit, the list item displayed would not match the number specified by Item Limit. Thus, it is not possible to limit the number
    of items in the Status list web part.
    It could be a potential issue in SharePoint 2010.
    We will log this issue to our suggestion box. As after the submission, we may not have any time guarantee when the fix may be released, but it may come out on next cumulative update.
    Appreciate your time and efforts.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • How to limit the number of items that a list control can hold?

    Hi,
    I am using a Flex3 List control for one of my projects.
    I add drag & drop functionality to it, so that i can drag & drop elements from one control to another.
    How to limit the number of items that a list control can hold / can be dropped in a list control ?
    - Sen.

    1. Listen for the dragdrop event on the control you are dragging onto.
    2. check the length of the items in the dataprovider - if it exceeds your maximum override the default drop action with e.preventDefault(); (assuming you used e for the event on the handler).
    Regards,
    Mark.

  • How to limit the number of rows in a smart form , sap script.

    Can anyone tell me how to limit the number of rows in the output of a sap script/smart form. I have tried "protect/endprotect" in sap script but have no idea of how to do in smart form. In sap script the only way it has happened is by reducing the size of the main window.

    Hi,
    In Smartform also, why dont you try reducing the size of the window if you want to limit the rows in it. Also if you are printing Line Items in a LOOP, you can write
    LOOP AT T_ITAB FROM 1 TO N in the LOOP Node if you know how many records exactly you want to display in 1 Page processing.
    regards,
    Mahesh

  • How to limit the number of boxes to tick in LC

    I would like to know the "javascript" in Lice Cycle to limit the number of boxes ticked
    for example i have 20 boxes and i would like that the client can only tick 5 boxes
    thank you

    Thank you Steeve
    But my problem is that i don't know which boxes the client will want to tick so all boxes have to be available at the beginning.
    When the client will have ticked 5 boxes in this case and only in this case, all others boxes must become unavailable so it is very difficult to set up
    if you have any idea
    thanks anyway
    Date: Fri, 15 May 2009 09:44:33 -0600
    From: [email protected]
    To: [email protected]
    Subject: How to limit the number of boxes to tick in LC
    This is a form validation issue. For example, you may have a text field and the value entered into that field determines which checkboxes must be completed to satisfy a validation or business rule. The attached sample requests the value "foobar" to be entered into a text field. If you enter "foobar" and exit the field, 2 of 3 checkboxes have the access property changed to "protected", meaning a user cannot no longer select those checkboxes.
    // form1.page1.subform1.input::exit - (JavaScript, client)
    if (this.rawValue == "foobar") {
        form1.page1.subform1.cb2.access = "protected";
        form1.page1.subform1.cb3.access = "protected";
    Steve
    >

  • How to limit the number of search results returned by oracle text

    Hello All,
    I am running an oracle text search which returned the following error to my java program.
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    #### ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    java.sql.SQLException: ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    When i looked up the net, one suggestion that was given is to narrow the wildcard query, which i cannot in my search page. Hence I am left with the only alternative of limiting the number of results returned by oracle text search query.
    Please let me know how to limit the number of search results returned by oracle text so that this error can be avoided.
    Thanks in advance
    krk

    Hi,
    If not set explicitly, the default value for WILDCARD_MAXTERMS is 5000. This is set as a wordlist preference. This means that if your wildcard query matches more than 5000 terms the message is returned. Exceeding that would give the user a lot to sift through.
    My suggestion: trap the error and return a meaningful message to the user indicating that the search needs to be refined. Although it is possible to increase the number of terms before hitting maxterms (increase wildcard_maxterms preference value for your wordlist), 5000 records is generally too much for a user to deal with anyway. The search is not a good one since it is not restricting rows adequately. If it happens frequently, get the query log and see the terms that are being searched that generate this message. It may be necessary to add one or more words to a stoplist if they are too generic.
    Example: The word mortgage might be a great search term for a local business directory. It might be a terrible search term for a national directory of mortgage lenders though (since 99% of them have the term in their name). In the case of the national directory, that term would be a candidate for inclusion in the stoplist.
    Also remember that full terms do not need a wildcard. Search for "car %" is not necessary and will give you the error you mentioned. A search for "car" will yield the results you need even if it is only part of a bigger sentence because everything is based on the token. You may already know all of this, but without an example query I figured I'd mention it to be sure.
    As for limiting the results - the best way to do that is to allow the user to limit the results through their query. This will ensure accurate and more meaningful results for them.
    -Ron

  • HT5100 How to limit the number of downloaded videos in parallel to one.i want my iPad itunesu to download only one video at once at time and when finished from downloading it to pass to the second queued one.

    How to limit the number of downloaded videos in parallel to one.i want my iPad itunesu to download only one video at once at time and when finished from downloading it to pass to the second queued one.

    @Tylerdowner: hmm.. maybe yes.. I just want to use the DOWNTHEMALL AddsOn for the saving file not the default download.. because my costumer download MP3 files and save it 3 or more files at a time so my Internet Connection goes down :( so I just want to limit them to save 1 file at a time.
    or if there is another way to limit it to 1.. please tell me :(

  • How to control the number of instances of an object ?

    Hi all,
    Can anybody answer, How to control the number of instances of an object being created?
    suppose at any point of time, if i would like to have 5 instances at the maximum, how can i disable the further requests?
    Thanks in advance
    Pradi

    write a factory method that controls the number of instances for you:
    import java.util.List;
    import java.util.Arrays;
    public class Bar
       private static final int MAX_BARS = 5;
       private static int numBars = 0;
       private int id;
       public static void main(String [] args)
          try
             int numBars = ((args.length > 0) ? Integer.parseInt(args[0]) : MAX_BARS+1);
             Bar [] bars = new Bar[numBars];
             for (int i = 0; i < bars.length; ++i)
                bars[i] = Bar.create();
             System.out.println(Arrays.asList(bars));
          catch (Exception e)
             e.printStackTrace();
       private Bar() { this.id = numBars++; }
       public String toString() { return "I am bar number " + this.id; }
       public static Bar create()
          Bar nextBar = null;
          if (numBars < MAX_BARS)
             nextBar = new Bar();
          return nextBar;
    }%

  • How to limit the number of TCP connections beeing used concurrently while a page is beeing loaded?

    We manufacture industrial small-footprint control modules with embedded web server. The resources of these modules are very limited, especially in RAM. We have problem, that FF opens 15 parallel TCP connections while loading a web page (main html page first, then all icons simultaneously). We can not handle such behavior because of lack of RAM memory needed for TCP buffers.
    Question is how to limit the number of concurrent TCP connections the browser will use? We need to do it somehow directly from the page, we can not push our customers to change the general settings of their browsers (they would not understand such things anyway).
    Do anyone have any suggestion?

    Sorry, one other thought. Many web designers now combine all icons into a single image and use CSS to clip the image so that only the desired portion is displayed. This minimizes the number of required connections and increases the probability that the image can be retrieved from cache.
    More info:
    * [http://www.w3schools.com/css/css_image_sprites.asp CSS Image Sprites - W3Schools]
    * [http://www.alistapart.com/articles/sprites/ A List Apart: Articles: CSS Sprites: Image Slicing’s Kiss of Death]
    * [http://coding.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/ The Mystery Of CSS Sprites: Techniques, Tools And Tutorials | Smashing Coding]
    No idea whether this is practical for your application.

  • How to limit the number of pages a PDF can print?

    Hi,
    Does anyone know how to lime the number of pages a PDF can print? For example, if a PDF has 100 pages, it only allow the user to print no more than 100 pages.
    Any software can achieve this ?

    But once I purchased a ebook, which required be opened with Adobe digital edition, the ebook only allow to print 57 pages out of 300+ pages total. 
    Are there any way to convert a PDF to a ebook and encrypted by the printing limits?

  • How to limit the number of parallel instances of a given event-based job?

    Hi,
    DB version : 11.2.0.3
    I'm using an event-based job with parallel_instances attribute set to true.
    It works perfectly fine, messages are enqueued then dequeued and processed simultaneously by separate instances of the same job.
    Now, I'd like to limit the number of parallel instances of this job running at the same time, say to an arbitrary number n.
    What would be the best way to do that?
    Maybe using a notification callback is a better option in this case?
    Thanks in advance for any input.

    Hi,
    DB version : 11.2.0.3
    I'm using an event-based job with parallel_instances attribute set to true.
    It works perfectly fine, messages are enqueued then dequeued and processed simultaneously by separate instances of the same job.
    Now, I'd like to limit the number of parallel instances of this job running at the same time, say to an arbitrary number n.
    What would be the best way to do that?
    Maybe using a notification callback is a better option in this case?
    Thanks in advance for any input.

  • How to limit the number of builds in tfs build queue

    Hey.
    I have a problem, i want to limit the number of requests for build that developers can trigger with gated check-in's.
    More like this, i have my developers and they trigger 10 builds , and 10 is my limit , so when another developer preform a gated check-in I want tfs reject that request and send a mensage to the developer saying something like this "you can't queue
    more builds, wailt until queue is free".
    Anyone know how to do that?
    Thanks,

    Hi Jptfc,
    For your situation, you can check whether it is possible to set themaximumnumber or concurrently running buildsin parallel on the Build Controller. Then multiple builds can be built concurrently, and the queued builds number will be not lessin the meanwhile.
    Check this
    thread for more informaiton.
    If you want tfs reject request and send a mensage to the developer when the queued builds number equals the limit, maybe you can use Visual Studio
    extention
    . I don't have tried with it, and you can try it on your test server. Or you can open a new thread in Visual Studio Integrate forum for a better response.
    Best regards,

  • How to limit the number of movie clips on stage?

    I am making a game where tempEnemy in an array of enemies gets made on random. Every time the player advances a level, more insects appear. This is how I want it to be, but when the user is high on a level, too many enemies get made that are impossible for the user to kill. How can I limit the number of enemies being displayed on stage, but not hinder the randomness of the enemy production?
    function makeEnemies():void
        var chance:Number = Math.floor(Math.random() * 150);
        if (chance <=  + level)
            tempEnemy = new Enemy();
            //Math.random(); gets a random number from 0.0-1.0
            tempEnemy.x = Math.round(Math.random() * 550);
            addChild(tempEnemy);
            enemies.push(tempEnemy);
            tempEnemy.speed = enemyBaseSpeed + ((level - 1) * speedLevelInc);
             if (tempEnemy.speed > MAX_SPEED)
            tempEnemy.speed = MAX_SPEED;

    Keep a total count of the enemies that are present versus whatever maximum is currently allowed for a level and do not produce any more than the difference between the maximum and the current number of them.

  • How to limit the number of items from RSS using XSLT

    Hello,
    I am using plsql to read contents from RSS, basically a simple RSS reader.
    I would like to somehow want the feature to restrict the number of items in the RSS feed, say I would like to display only the first 5 items.
    How could I achieve this?
    Any help is highly appreciable.
    Thanks in advance.
    Regards

    Hi,
    According your post, I know you would like to set the item display limit in Status List web part.
    In the web part, the number of items to display is based on the view which you selected when configuring the web part. The default view for status list is status list view.
    However, I am not able to limit the items’ display number of the status list view. After changing the items limit, the list item displayed would not match the number specified by Item Limit. Thus, it is not possible to limit the number
    of items in the Status list web part.
    It could be a potential issue in SharePoint 2010.
    We will log this issue to our suggestion box. As after the submission, we may not have any time guarantee when the fix may be released, but it may come out on next cumulative update.
    Appreciate your time and efforts.
    Thanks.
    Tracy Cai
    TechNet Community Support

Maybe you are looking for

  • Adobe Media Encoder CS5.5 crashing (not responding) when adding files

    Hello, I am running AME CS5.5 on a late 2010 MacBook Pro.  I have been trying to create some broadcast quality .mpg files for my local cable provider's Video On Demand service but AME keeps crashing on me whenever I add a .mov file to the queue.  I a

  • My attachments won't attach???

    My e-mail attachments won't attach. After a long wait while trying to attach, I get a message that allows me to try again. If I select "switch" and retry, the attachment takes. The process is very slow. How may I fix this?

  • Adobe Interactive Forms with Webdynpro

    Hi, I created Adobe form with Webdynpro with some fields for entry and submit button. when i am running on browser, fields are coming as display mode, i can't enter values nor submit button is working. Any help is appreciated. Thanks.

  • Sculpture ...  User Opinions ?

    Hi, For some reason, I can't seem to enjoy the sounds of "Sculpture". I wonder what other users think of Sculpture ? Are you using it ? What do you like about it ? Musical application that would benefit from using it ? ... etc. It seems to have a cer

  • Controlling FLV video programmatically

    Hi all, I am new to Flash, and I'd like to be able to control the flash video I have imported programmatically, I just need an starting point, any article written on the subject? Ideally I'd like to control the movement using mouse movements, but jus