Avoid to hold an adapter type. Splitting threads in the same adapter type?

Hi experts.
I have an installation of SAP PI 7.1 with different interfaces configured. Many of these interfaces share the adapter type with a limited number of threads. The problem comes when one of these interfaces is locked and holds all the threads, that makes the other interfaces that share the adapter type will also stop working. As an interim solution has increased the number of threads, but this does not eliminate the problem because the system moves many messages. On the other hand, the option to prioritize interfaces would not be a definitive solution. Create an instance of Java for each inteface would not be an optimal solution because there are too many interfaces.
Is there any way to assign a specific number of threads to each interface, so that if one fails the other still running? Is it possible to create queues for each interface that share the adapter type, so that each queue has its own threads? Any other possible solution?
Thanks a lot in advance!
Jordi Sánchez

Hi,
did you try this parameter of the adapter engine messaging system?
messaging.system.queueParallelism.maxReceivers
This property specifies the maximum number of parallel worker threads per queue, based on the receiver fields of the processed messages. A value of 2, for example, will limit the amount of parallel worker threads for one receiver channel instance to 2, allowing the remaining configured worker threads to process messages for other receiver channel instances of the same adapter type
we had set it to 4 so that one specific receiver channel will have only 4 worker threads maximum per server node and does not cause problems for other interfaces if something is wrong.
regards,
francis

Similar Messages

  • Can I combine multiple threads from the same contact in iMessage?

    iMessage displays multiple threads for the same contact.  Its very confusing and has resulted in lost messages.  I've tried changing a number of settings but to no avail.  Seems to require everyone in my contact list to eliminate all their email addresses in iMessage.
    Begs the question why does iMessage even need this information?  Worse, why does it suck it into its settings by default.  The directory server should only require a valid Apple ID (associated with the users' devices)  in order to direct an iMessage between two contacts.

    Thanks for the reply, appreciate your input.  I did find another way of doing it and that is to highlight the first e-mail, hold down the shift key and click on the last one.  That highlights them all and then they can all be deleted.  Your ideas also work of course and I thank you for that.  Cheers.

  • Can multiple threads share the same cursor in berkeley db java edition?

    We use berkeley db to store our path computation results. We now have two threads which need to retrieve records from database. Specifically, the first thread accesses the database from the very beginning and read a certain number of records. Then, the second thread needs to access the database and read the rest records starting from the position where the cursor stops in the first thread. But, now, I cannot let these two threads share the same cursor. So, I have to open the database separately in two threads and use individual cursor for each thread. This means I have to in the second thread let the cursor skip the first certain number of records and then read the rest records. However, in this way, it is a waste of time letting the second thread skip a certain of records. It will be ideal for us that the second thread can start reading the record just from the place where the first thread stops. Actually, I have tried using transactional cursor and wanted to let the two threads share the same transactional cursor. But it seems that this didn't work.
    Can anyone give any suggestion? Thank you so much!
    sgao

    If your question is really about using the BDB Java Edition product please post to the JE forum:
    Berkeley DB Java Edition
    If your question is about using the Java API of the BDB (C-based) product, then this is the correct forum.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Communication between thread in the same process using file interface.

    Hi,
    I am developing  driver and i need to communicate between two thread.
    >can anyone guide me on implementing communication between two thread in the same process using File Interface. First thread will be driver and second will be application.I need to send IOCTL like commands using File interface ie is WriteFile(),ReadFile()
    from Host process to driver through file-interface(which run's in driver context).Host process should not be blocked for the duration of the driver to process the command.
    >File-interface will run in driver context and it will be responsible to receive command from application and pass it to the driver.
    what are the complexity introduced?
    >Can anyone also give me the link/reference to get more information on this topic?
    >How to replace IOCTL command's for instance baud _rate change command with a file interface for example with IRP.

    Here  is the detailed query:
    Hardware Abstraction Layer will interact with Driver(Both will be running in complete different process) .there is a IOCTL for command and  File interface for read and write.
    My requirement is:
    Both should run in the same process so HAL will run as one thread and driver as another thread in the same process .I don't want HAL to wait for completion of request and also i don't want driver to be blocked .
    We are planning to use a File Interface for communication between Hardware abstraction layer and Driver
    HAL will send the command or read/write operation to a file interface and driver will get the command or read/write request from the File interface
    There is a flexibility to change Hardware Abstraction layer and also the Driver
    Is it possible to use IOCTL between two thread under same process? if not what other options do we have.
    Can we use File interface to  send command (like IOCTL) between two thread?

  • Make sure 2 threads share the same object

    I have been thinking about this for quite some time. However, I really couldn't figure it out due lack of experience and knowledge.
    I just needed to know how can I make sure that 2 or more threads (after certain checkings that they should share a same common object) will really share the same object.
    For example (to UlrikaJ if you are reading this):
    How can I achieve the following?? Thanks!
    "When James and Ada separately want to access their shared account,two transactions are started that accesses the object associated with that account number."

    Thanks for the answer. You are welcome :-)
    public class Account
       public Account getAccount(String userInput)
         // Some processes to verify the userInput go here.
         return account;
    }//End of Account class
    public UserThread implements Runnable
       private String name;
       private Semaphore s;
       private Account userAccount; //Reference for the Account class
       public UserThread(String name, Semaphore s)
          this.name = name;
          this.s = s;
       }//End of constructor
       public void run()
          for(;;)
              getUserInput(); //Ofcourse the implementation will depend on what you are doing
              s.lock(); //obtain a lock on Semaphore object
              //Entering critical section of the code
              this.userAccount = accountObject.getAccount(userInput);
              //End of critical section of the code.
              s.signal(); //Release the lock so that other thread
              //can access the getAccount() method...irrespective of the
              //variable or the object being used or referred to.
          }//End of for() loop
       }//End of run() method
    } //End of UserThread class
    public class AccountApplication
       public static void main(String args[])
          Semaphore sem = new Semaphore(0);
          //Always initialize the Semaphore with 0 when you create it.
          UserThread user1 = new UserThread("User Number 1",sem);
          UserThread user2 = new UserThread("User Number 2",sem);
          //All threads share the same Semaphore object
          Thread userThread1 = new Thread(user1);
          Thread userThread2 = new Thread(user2);
          userThread1.start();
          userThread2.start();
       }//End of main() method
    }//End of classWell, I have given the outline of the code. I have not compiled or run the program so it might have errors in its syntax.
    Obviously, you will definitely have to change it to suit your requirements. I have just shown you how to protect yur codes' critical section.
    Hope this clears your doubts.
    Vijay :-)

  • Can I listens to the same port in differernt threads on the same computer

    Q1:can I listens to the same port in differernt threads on the same computer?
    Q2:if I use two thread to listen to two different port, you know, as the method for listening is a block method, will them block each other?
    Thank you very much!

    Q1:can I listens to the same port in differernt
    threads on the same computer?If you mean ServerSocket.accept(), the answer is yes.
    Q2:if I use two thread to listen to two different
    port, you know, as the method for listening is a
    block method, will them block each other?No.

  • ITunes splits songs from the same album into several albums, all sort fields appear to match. Any suggestions on how to put them in one album?

    iTunes sometimes splits songs from the same album into several albums, all sort fields appear to match. Any suggestions on how to return them to the proper album?

    Generally all you need to do is fill in an appropriate Album Artist. For more details see my article on Grouping Tracks Into Albums, in particular the topic One album, too many covers.
    N.B. Giving different things the same sort value (or indeed vice versa) tends to lead to trouble.
    tt2

  • How to avoid two threads creating the same entity?

    I seem to have a problem with a race-condition. Two threads are trying to
              create the same entity. One thread calls a finder with no success and
              creates the entity, meanwhile - before the entity gets persisted
              (ejbStore()) - the other thread also calls a finder with no success,
              creating the
              same entity.
              My transaction isolation level in the weblogic-ejb-jar.xml is
              <transaction-isolation>
              <isolation-level>TRANSACTION_READ_UNCOMMITTED</isolation-level>
              <method>
              <ejb-name>ejb</ejb-name>
              <method-name>*</method-name>
              </method>
              </transaction-isolation>
              I've also tried <isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
              with no significant change in behavior.
              In the ejb-jar.xml
              <container-transaction>
              <method>
              <ejb-name>ejb</ejb-name>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              

              Try setting delay-updates-until-end-of-tx to false for your bean. Try experimenting
              with concurrency-strategy of Exclusive. Or re-write your code to not check for
              existence before creation; just create the bean and let the db return a duplicate
              key exception.
              simon.
              "Daniel" <[email protected]> wrote:
              >I seem to have a problem with a race-condition. Two threads are trying
              >to
              >create the same entity. One thread calls a finder with no success and
              >creates the entity, meanwhile - before the entity gets persisted
              >(ejbStore()) - the other thread also calls a finder with no success,
              >creating the
              >same entity.
              >
              >My transaction isolation level in the weblogic-ejb-jar.xml is
              ><transaction-isolation>
              ><isolation-level>TRANSACTION_READ_UNCOMMITTED</isolation-level>
              ><method>
              ><ejb-name>ejb</ejb-name>
              ><method-name>*</method-name>
              ></method>
              ></transaction-isolation>
              >
              >I've also tried <isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
              >with no significant change in behavior.
              >
              >In the ejb-jar.xml
              ><container-transaction>
              ><method>
              ><ejb-name>ejb</ejb-name>
              ><method-name>*</method-name>
              ></method>
              ><trans-attribute>Required</trans-attribute>
              ></container-transaction>
              >
              >
              

  • Split audio from video doesn't split video at the same point ?

    When I split the audio from a video in GarageBand I would like the video to be split at the same point (so that I can insert audio in between without everything getting out of sync).
    Is this possible?
    (I don't want to use iMovie since that turns my 150 MB mov file into a 8 GB file..take ages to import)
    The reason I want to insert audio in between video fragments is that I am creating an audio description of a tv series for a blind friend. I watch the video, pause that, and describe. Then continue.
    If I can split both the video and "audio from video" at the same point and drag those to the right, so there's room to record something in between (then in the end I'll just drag it all so that the parts join up, delete the video and merge the audio. I hope.)
    Thanks in advance!!

    I figured out how to reset the Youtube video upon hiding thanks to Heathrowe's answer and FigFrance's contribution to the thread found here:
    https://forums.adobe.com/message/4979969#4979969
    The secret was adding .empty() to my video container.  Here is my functioning button code:
    Show Video:
    //code to embed youtube into symbol
    var youtube = $("<iframe/>");
    sym.$("video").empty().append(youtube);
    youtube.attr('type', 'text/html');
    youtube.attr('width', '640');
    youtube.attr('height', '360');
    youtube.attr('src', 'https://www.youtube.com/embed/MyFv6UKsW70?rel=0');
    youtube.attr('frameborder', '1');
    youtube.attr('allowfullscreen', '0');
    // Show an element
    sym.$("video").show();
    Hide Video:
    sym.$("video").empty();
    // Hide an element
    sym.$("video").hide();
    Brandon

  • How to start two threads at the same time

    Hi there,
      I want to include multithreading in the CVI program. I have two tasks which has no dependence between them, so I would like to start two threads for perform the tasks. I follow the introduction http://www.ni.com/white-paper/3663/en/ to start my code. In my code, I add a command button, when it is pressed, I create two threads to perform the tasks. In each task, I have a big loop and in each iteration, I use ProcessSystemEvents to avoid no response on system message. But it doesn't work actually, the program suspended. I wonder must I initialize the threads in main. I am looking for a way to start the threads in the callback function for a button since I am not starting those threads at the beginning but while it is triggered.
    the main frame of the code looks
    int CVICALLBACK Test1(void *functionData)
    { int i=0;
    for (i = 0; i<100000; i++) {ProcessSystemEvents();}
    return 0;
    int CVICALLBACK Test2(void *functionData)
    int i = 0;
    for (i = 0; i<100000; i++) {ProcessSystemEvents();}
    return 0;
    int CVICALLBACK cmdcb(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
    { int threadID1, threadID2;
    if (event==EVENT_COMMIT)
    SetPanelAttribute(panelHandle, ATTR_DIMMED, 1);
    CmtScheduleThreadPoolFunction(DEFAULT_THREAD_POOL_HANDLE, Test1, NULL, &threadID1);
    CmtScheduleThreadPoolFunction(DEFAULT_THREAD_POOL_HANDLE, Test2, NULL, &threadID2);
    CmtWaitForThreadPoolFunctionCompletion (DEFAULT_THREAD_POOL_HANDLE, threadID1, 0);
    CmtWaitForThreadPoolFunctionCompletion (DEFAULT_THREAD_POOL_HANDLE, threadID2, 0);
    return 0;
    Attachments:
    TestThread.zip ‏239 KB

    In my opinion your threads may be simply lasting longer than expected due to an incorrect sleep policy of threads paired with with ProcessSystemEvents () in the loop.
    I made up a quick example that shows this behaviour: playing with "Do not sleep" and "Call ProcessSystemEvents" options you can see how threads execute.
    BTW: do not forget to release the thread function IDs at the end of functions.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?
    Attachments:
    thread.zip ‏7 KB

  • Is dll threading treated the same as vi threading?

    I noticed by default my dll built by Visual C++ is set to run in the gui interface subsystem which I assume is equivalent to labview's gui interface thread. Yes?
    I further assume that calling into the dll from any vi running in any thread is equivalent to calling a subroutine vi set to run in the gui interface thread. Yes?
    If yes and yes, and since labview cannot suspend a subroutine vi or the dll, the gui interface thread would be 100% utilized by the call. It would therefore seem, that all other operations occurring in the gui interface thread would be suspended until the call completes, and further more if the dll call is made through a subroutine sub-vi set to run in the caller's thread, then the caller's
    thread would also be suspended. Yes?
    Hence, you could weave yourself into a situation where all other threads are awaiting the execution of gui interface thread. And that then leads to the question of the order in which execution will occur once qued.
    Typically, my threading is separated in my top level vis and the lower level vis are set to run in the caller's thread. But in migrating from LV4.x to LV6i, I never checked my API call dlls execution subsystems, which if the above is correct, may adversely affect my presumed threading...
    So... Assuming the above is true and to avoid it, can I create a dll that runs in the caller's thread, or must the dll's execution thread be specifically set when it is built? More generally, is there a way to avoid this short of insuring that the threads do not compete for the same code resources?
    Thanks,
    Kind Regards,
    Eric
    PS: it might be kinda nice to see the threading identifiable (connections highlighted in various colors
    for example) in the vi hierarchy window...

    My info is marked with ***s.
    > Assuming I specify all dll calls as re-entrant, the number of
    > simultaneous dll calls that can be made from within labVIEW is limited
    > to the number of threads. Specifically, once the dll has control of
    > the thread, nothing else in labVIEW can execute in that thread until
    > the dll call completes. Yes?
    >
    A DLL doesn't normally multitask with other code, but there are
    situations where it does, such as when the DLL decides to process or
    pump messages. The above assumption is pretty accurate, but there are
    things a DLL could do that would void them.
    > If a thread ID were attached to information passed to a labVIEW
    > library function, and that function retained the information for
    > labVIEW, then labVIEW in theory could request the information from the
    > function when the dll call completed. The thread Id would uniguely
    > identify the data because only one dll call can be made with that
    > thread from within labVIEW and of course labVIEW knows which thread is
    > making the call. Yes?
    >
    I'm not sure I understand where this is going. Any DLL is free to pay
    attention to the thread ID, but there is no guarantee that the same
    thread will be used for the VI's next execution, or for the DLL's next
    execution. Information can be stored by the DLL using the threadID, but
    LV doesn't know anything about the information or even which thread
    executed the DLL once it returns.
    Perhaps this info will help out. LV has two ways of executing a DLL
    call. If the DLL call is marked as reentrant, then it will be called in
    the current thread. It is then the DLL's responsibility to protect any
    data or code section that cannot have multiple threads in it simultaneously.
    For compatibility, and to make it easy to protect a DLL call, you can
    mark it as non-reentrant. This will cause the DLL to be swapped over to
    the UI thread so that any other thread trying to call the code at the
    same time will be blocked, and the DLL call will be protected.
    If you have other questions, ask them.
    Greg McKaskle

  • Problem with multiple threads accessing the same Image

    I'm trying to draw into one Image from multiple threads. It works fine for a while, but then suddenly, the image stops updating. Threads are still running but the image won't update. I'm using doublebuffering and threads are simply drawing counters into Image with different speed.
    It seems like the Image gets deadlocked or something. Anyone have any idea what's behind this behavior or perhaps better solution to do such thing.
    Any help will be appreciated.

    Sorry Kglad, I didn't mean to be rude. With "No coding
    errors" I meant the animation itself runs with no errors. I'm sure
    you could run the 20 instances with no freezing (that's why I put
    the post :) ) But I'm affraid it is an animation for a client, so I
    cannot distribute the code.
    Perhaps I didnt explain the situation clearly enough (in part
    because of my poor english...).-
    - By 20 instances I mean 20 separated embedded objects in the
    html
    - The animation is relatively simple. A turned on candle, in
    each cycle I calculate the next position of the flame (that
    oscilates from left to right). The flame is composed by 4
    concentric gradients. There is NO loops, only an 'onEnterFrame'
    function refreshing the flame each time.
    - It's true that I got plenty variables at the _root level.
    If that could be the problem, how can I workaround it?
    - It is my first time trying to embed so many objects at the
    same time too. No idea if the problem could be the way I embed the
    object from the html :(
    - The only thing I can guess is that when a cycle of one of
    the object is running, the other 19 objects must wait their turn.
    That would explain why the more instances I run, the worst results
    I get. In that case, I wonder if there's a way to run them in a
    kind of asynchronous mode, just guessing...
    Any other comment would be appreciated. Anyway, thanks a lot
    everybody for your colaboration.

  • Multiple Threads at the same time

    I am new to threads but what I am attempting to do is start a new thread for each report frequency. Each thread will be on a timer to loop at that frequency. Say, for example, I had reports defined to run at 60, 90, and 1440 minute frequencies. I want to kick off a thread for each of those frequencies. While this code does work, it does not start the next thread until the first one is done. Can I get this loop to spawn threads without caring if the preceeding one is finished or not?
    Here is the code.
    public class Monitor {
    public Monitor() {
    super();
    public static void main(String[] args) throws Exception {
    try {
    ResourceBundle properties = ResourceBundle.getBundle("report");
    String db_driver = properties.getString("DB_DRIVER");
    String db_url = properties.getString("DB_URL");
    String db_user = properties.getString("DB_USERNAME");
    String db_pwd = properties.getString("DB_PASSWORD");
    long freq = 0;
    Class.forName(db_driver);
    String url = db_url;
    Connection con = DriverManager.getConnection(url, db_user, db_pwd);
    EventLog.log("Connection Succeeded");
    String qryString = "select distinct report_freq as report_freq from reportapp";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(qryString);
    ResultSetMetaData rsmd = rs.getMetaData();
    EventLog.log("Query Succeeded");
    boolean moreReports = rs.next();
    while (moreReports) {
    freq = rs.getLong("report_freq");
    new MonitorThread(freq).start();
    moreReports = rs.next();
    rs.close();
    con.close();
    } catch (Exception fatal) {
    EventLog.log("Monitor Exception: " + fatal.getMessage());
    return;
    }//end of main//
    //Thread Code//
    public class MonitorThread extends Thread {
    public MonitorThread(long sleepfor) {
         super();
         run(sleepfor);
    public void run(long sleepfor) {
    try {
    boolean isReportActive = true;
    while (isReportActive) {
    long n = sleepfor * 1000L * 60L;
    //Call class that runs the reports//
    Report.PerformSystemChecks(sleepfor);
    Thread.sleep(n);
    } catch (Exception fatal) {
    EventLog.log("Monitor Exception: " + fatal.getMessage());
    return;
    }

    Here how I would do it... I left few parts open, but you should get the idea.
    abstract class ScheduledThread extends Thread
      long freq, nexttime;
      public ScheduledThread(long freq)
        nextTime=System.currentTimeMillis()+freq;
        this.freq=freq;
      public long getNextTime()
        return nexttime;
      abstract void scheduledRun();
      public void run()
        nextTime+=freq;
        scheduledRun();
    class Scheduler extends Thread
      Vector sceduled=new Vector();
      public synchronized void addSchedule(...)
        scheduled.add(sched);
        notifyAll();
      public long getNextTime()
        // get the lowest time returned from all the sceduled threads
      public void run()
        while (true)
          long nextCall=getNextCall();
          synchronized (this)
            // using wait we can break out of the wait loop if new schedules are added with notify.
            long time=nextCall-System.currentTimeMillis();
            if (time>0)
             this.wait(time);
          // go through all the threads and run those that getNextTime()<System.currentTimeMillis()
    }

  • Multiple threads on the same applet

    hey,
    i want the following functions should be performed by threads
    *background color of my panel should be changed after the given interval,
    *Label of the panel i.e"HELLO USER" should also blink for the given interval
    *the pictures which i have added on that panel should be shown or hide  for the particular time interval.
    basically i want to know how can i use three threads simultaneously on the same panel.

    Have you tried writing code first or just looking for solution simply...
    You can either create anonymus class or, create a seperate class for Thread or, implement Runnable class
    1. Make Blinking text as component which implements Runnable interface.
    2. Make ImageDisplayer as component which implements Runnable interface.
    3. Make a panel which can change colour as another component which can change color, extent JPanel and implement Runnable interface.
    4. For all the three classes put the logic in run method within a loop and add sleep with required interval (Refer java examples).
    5. Add components to Frame/Applet/Panels and create thread object for them.
    6. Start the thread
    Example:
    Thread blinkingThread = new Thread(...object of runnable interface...)
    blinkingThread.start()

  • Multiple threads access the same method.

    Hello,
    I have been trying for a long time to find out multiple threads access the shared data.
    I have written a sample code, there I my intention is that method has to be accessed
    onlny one thread at a time., mean one thread finished the job, then next thread can
    access the shared source. But for this code I am not getting the desired out put what I want. But if I am using synchronized block I am getting the output. Please correct where I got mistake. Please see my code.
    public class TestThread implements Runnable {
         Shared r;
         public TestThread() {
              r = new Shared();
         public static void main(String args[]) {
              Thread t1 = new Thread(new TestThread());
              Thread t2 = new Thread(new TestThread());
              t1.setName("A");
              t2.setName("B");
              t1.start();
              t2.start();
          * (non-Javadoc)
          * @see java.lang.Runnable#run()
         @Override
         public void run() {
              // TODO Auto-generated method stub
              r.count();
    class Shared {
         public synchronized void count() {
              String name = Thread.currentThread().getName();
              System.out.println(name + ":accessed...");
              try {
                   for (int i = 0; i < 5; i++) {
                        System.out.println(name + ": " + i);
              } catch (Exception e) {
                   // TODO: handle exception
    }Thanks
    Bhanu lakshmi.

    It depends on what you synchronize. Non-static methods synchronize on the object, so if you're using several objects, you'll be able to call each from their own thread.
    Make your method synchronized or use only a single object and see the difference.

Maybe you are looking for

  • More than one UNION in a LOV select statment ??

    Why can you only have one union in the select code for a LOV? If I try to union more than two select statements I get ... 1 error has occurred LOV query is invalid, a display and a return value are needed, the column names need to be different. If yo

  • IDOC to JDBC :Error handling in Query execution

    Hi, I have a scenario idoc to JDBC, here I will get 'n' number of segments in an idoc corresponding to 'n' records which needs to be updated in SQL Database table. In this scenario how we can handle the error when any record is failing while updating

  • Nokia 5310 service provider BSNL not listed in Net...

    I have 5310 xpress music and trying to connect/activate Email and my service provider is BSNL. While choosing the Network, BSNL is not listed. Request someone can assist in this matter. I have installed PC suite software in my PC. Thanks P.Selvakumar

  • Associate Name to IP - RV220W

    Is there anyway to associate a name to an IP in the RV220W?  I am coming from a WRVS4400N v2.  Folks are complaining that they can't connect, for example via Real VNC, via the PC name any longer.  They have to use the IP address.  In the past I put t

  • Cisco MCU5310 external call in issue

    Scenario: Currently I have a Cisco MCU5310 sitting on internal network using only Port A with internal IP address settings but I could not call in from external network. There is no NAT settings option like normal Cisco C40/C60. q1. if I would like t