MDBeans that hangs blocks for others - Weblogic

This is a discussion on MDBeans that hangs blocks for others - Weblogic ; Hi All, I'm using WLS 8.1 sp2 on W2K. I have some MDBean that ran for some time and doing this, they blocks for execution of other MDBean requests. If I submit 9 JMS MDBean request everything works fine, but ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: MDBeans that hangs blocks for others

  1. MDBeans that hangs blocks for others


    Hi All,

    I'm using WLS 8.1 sp2 on W2K.

    I have some MDBean that ran for some time and doing this, they blocks for execution
    of other MDBean requests.

    If I submit 9 JMS MDBean request everything works fine, but when I have > 9 JMS
    request and some of my MDBeans consume time, then they block for others.

    If I submit 50 JMS MDBean request, and the 4. MDBean instance hangs for 20. Second.
    Then the 4. MDBean instance will block for the execution of 5 MDBean request.

    In my tests I have one MDBean that hangs, and this will always blocks for execution
    of 1/10 of my request. 100 requests -> then 10 request hangs.

    Snapshot of my programs:
    public class RunMDBean {
    static public void main(String args[]) {
    System.out.println("Staring.");

    try {
    RunMDBean sender = new RunMDBean();
    seder.init("JMSQueueFactory", "JMSQueue");
    for (int i=0; i<50; i++) {
    sender.send("");
    }
    sender.close();
    } catch (JMSException e) {
    e.printStackTrace();
    }

    System.out.println("Done.");
    }

    MDBean
    public void onMessage(Message message) {
    boolean hang=false;

    synchronized (this ) {
    if (++runs==4)
    hang=true;
    }

    System.out.println("Running:"+runs);

    if (hang) {
    System.out.println("Hangs");
    try {
    Thread.sleep(20000);
    } catch (InterruptedException e) {
    e.printStackTrace();
    }
    System.out.println("Hangs done");
    }
    }


    Why?. Any ideas or comments on this are very welcome!

    Thanx!

    Regards,
    Gustav Lund
    (glu@tdc.dk)

  2. Re: MDBeans that hangs blocks for others

    Hi Gustav,

    The concurrency of MDB pools is limited by the number
    of available threads - as each running MDB necessarily
    uses a thread while it is in its onMessage(). So this means
    that your "sleep" below consumes a thread until it
    finishes, making the thread unavailable for other MDBs
    to do their work.

    You can increase the number of available threads, and/or
    assign your MDBs to their own thread pools. Depending
    on your app, you might also be able to change the app
    to use seperate MDB pools for long-running and short-running jobs.
    For information, refer to the JMS Performance Guide
    white-paper, available here:

    http://dev2dev.bea.com/technologies/jms/index.jsp

    Tom

    Gustav Lund wrote:
    > Hi All,
    >
    > I'm using WLS 8.1 sp2 on W2K.
    >
    > I have some MDBean that ran for some time and doing this, they blocks for execution
    > of other MDBean requests.
    >
    > If I submit 9 JMS MDBean request everything works fine, but when I have > 9 JMS
    > request and some of my MDBeans consume time, then they block for others.
    >
    > If I submit 50 JMS MDBean request, and the 4. MDBean instance hangs for 20. Second.
    > Then the 4. MDBean instance will block for the execution of 5 MDBean request.
    >
    > In my tests I have one MDBean that hangs, and this will always blocks for execution
    > of 1/10 of my request. 100 requests -> then 10 request hangs.
    >
    > Snapshot of my programs:
    > public class RunMDBean {
    > static public void main(String args[]) {
    > System.out.println("Staring.");
    >
    > try {
    > RunMDBean sender = new RunMDBean();
    > seder.init("JMSQueueFactory", "JMSQueue");
    > for (int i=0; i<50; i++) {
    > sender.send("");
    > }
    > sender.close();
    > } catch (JMSException e) {
    > e.printStackTrace();
    > }
    >
    > System.out.println("Done.");
    > }
    >
    > MDBean
    > public void onMessage(Message message) {
    > boolean hang=false;
    >
    > synchronized (this ) {
    > if (++runs==4)
    > hang=true;
    > }
    >
    > System.out.println("Running:"+runs);
    >
    > if (hang) {
    > System.out.println("Hangs");
    > try {
    > Thread.sleep(20000);
    > } catch (InterruptedException e) {
    > e.printStackTrace();
    > }
    > System.out.println("Hangs done");
    > }
    > }
    >
    >
    > Why?. Any ideas or comments on this are very welcome!
    >
    > Thanx!
    >
    > Regards,
    > Gustav Lund
    > (glu@tdc.dk)



  3. Re: MDBeans that hangs blocks for others


    Hi Tom,

    Thanks for Your reply.

    I know that MDBeans is limited by the number of available threads. I have used
    an execute queue and the issue is the same. If I have a number of requests, and
    only one MDBean con-sume time, then this single MDBean instance can block for
    other MDBean requests, even if others threads is idle.

    I did a small test with an execution queue of 25 threads (thread count), sending
    50 re-quest and the 4. MDBean hangs for 20 seconds as in my first little test
    program. In this test Thread 22 & 24 do all the work. Thread 23 hangs the second
    (running 4.) time for 20 second and block for 1 MDBean request. I don't understand
    why Thread 23 can block for a MDBean request while other Threads in the execution
    queue is idle. ??

    Any ideas or comments on this are very welcome!

    Running:1 ExecuteThread: '24' for queue: 'MyExecute'
    Running:2 ExecuteThread: '23' for queue: 'MyExecute'
    Running:3 ExecuteThread: '22' for queue: 'MyExecute'
    Running:4 ExecuteThread: '23' for queue: 'MyExecute'
    Hangs ExecuteThread: '23' for queue: 'MyExecute'
    Running:5 ExecuteThread: '22' for queue: 'MyExecute'
    Running:6 ExecuteThread: '24' for queue: 'MyExecute'
    Running:7 ExecuteThread: '22' for queue: 'MyExecute'
    Running:8 ExecuteThread: '24' for queue: 'MyExecute'
    Running:9 ExecuteThread: '22' for queue: 'MyExecute'
    Running:10 ExecuteThread: '24' for queue: 'MyExecute'
    Running:11 ExecuteThread: '22' for queue: 'MyExecute'
    Running:12 ExecuteThread: '24' for queue: 'MyExecute'
    Running:13 ExecuteThread: '22' for queue: 'MyExecute'
    Running:14 ExecuteThread: '24' for queue: 'MyExecute'
    Running:15 ExecuteThread: '22' for queue: 'MyExecute'
    Running:16 ExecuteThread: '24' for queue: 'MyExecute'
    Running:17 ExecuteThread: '22' for queue: 'MyExecute'
    Running:18 ExecuteThread: '24' for queue: 'MyExecute'
    Running:19 ExecuteThread: '22' for queue: 'MyExecute'
    Running:20 ExecuteThread: '24' for queue: 'MyExecute'
    Running:21 ExecuteThread: '22' for queue: 'MyExecute'
    Running:22 ExecuteThread: '24' for queue: 'MyExecute'
    Running:23 ExecuteThread: '22' for queue: 'MyExecute'
    Running:24 ExecuteThread: '24' for queue: 'MyExecute'
    Running:25 ExecuteThread: '22' for queue: 'MyExecute'
    Running:26 ExecuteThread: '24' for queue: 'MyExecute'
    Running:27 ExecuteThread: '22' for queue: 'MyExecute'
    Running:28 ExecuteThread: '24' for queue: 'MyExecute'
    Running:29 ExecuteThread: '24' for queue: 'MyExecute'
    Running:30 ExecuteThread: '22' for queue: 'MyExecute'
    Running:31 ExecuteThread: '24' for queue: 'MyExecute'
    Running:32 ExecuteThread: '22' for queue: 'MyExecute'
    Running:33 ExecuteThread: '24' for queue: 'MyExecute'
    Running:34 ExecuteThread: '22' for queue: 'MyExecute'
    Running:35 ExecuteThread: '24' for queue: 'MyExecute'
    Running:36 ExecuteThread: '22' for queue: 'MyExecute'
    Running:37 ExecuteThread: '24' for queue: 'MyExecute'
    Running:38 ExecuteThread: '22' for queue: 'MyExecute'
    Running:39 ExecuteThread: '24' for queue: 'MyExecute'
    Running:40 ExecuteThread: '22' for queue: 'MyExecute'
    Running:41 ExecuteThread: '24' for queue: 'MyExecute'
    Running:42 ExecuteThread: '22' for queue: 'MyExecute'
    Running:43 ExecuteThread: '24' for queue: 'MyExecute'
    Running:44 ExecuteThread: '22' for queue: 'MyExecute'
    Running:45 ExecuteThread: '24' for queue: 'MyExecute'
    Running:46 ExecuteThread: '22' for queue: 'MyExecute'
    Running:47 ExecuteThread: '24' for queue: 'MyExecute'
    Running:48 ExecuteThread: '22' for queue: 'MyExecute'
    Running:49 ExecuteThread: '24' for queue: 'MyExecute'
    Hangs doneExecuteThread: '23' for queue: 'MyExecute'
    // The server hangs until the 20 seconds expires.
    Running:50 ExecuteThread: '23' for queue: 'MyExecute'

    Regards,
    Gustav Lund
    (glu@tdc.dk)


  4. Re: MDBeans that hangs blocks for others

    Hi Gustav,

    There is an asynchronous
    pipe-line of messages (in-flight/backlog messages) between
    server and async consumer. Pipe-lines allows the
    server to push several messages to a consumer in
    a single operation. This generally improves
    performance, but can lead to "idle" MDBs if
    messages are produced in small widely separated bursts, and
    MDBs are slow to operate on their dedicated message
    backlog. If you want to
    reduce the max backlog of messages between
    server and async consumer, configure a lower
    "MessagesMaximum" on the connection factory -
    the default size is 10. This behavior
    is not unique to WL JMS - other JMS products
    also support message backlogs.

    Information on message backlogs is in the JMS Programmer's
    Guide, as well as the aforementioned JMS
    Performance white-paper.

    Another option, as mentioned earlier, is to
    partition "slow" jobs from "fast" jobs in
    some way, so that "fast" jobs are always
    directed to MDBs that are dedicated to the "fast"
    task.

    Tom

    Gustav Lund wrote:

    > Hi Tom,
    >
    > Thanks for Your reply.
    >
    > I know that MDBeans is limited by the number of available threads. I have used
    > an execute queue and the issue is the same. If I have a number of requests, and
    > only one MDBean con-sume time, then this single MDBean instance can block for
    > other MDBean requests, even if others threads is idle.
    >
    > I did a small test with an execution queue of 25 threads (thread count), sending
    > 50 re-quest and the 4. MDBean hangs for 20 seconds as in my first little test
    > program. In this test Thread 22 & 24 do all the work. Thread 23 hangs the second
    > (running 4.) time for 20 second and block for 1 MDBean request. I don't understand
    > why Thread 23 can block for a MDBean request while other Threads in the execution
    > queue is idle. ??
    >
    > Any ideas or comments on this are very welcome!
    >
    > Running:1 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:2 ExecuteThread: '23' for queue: 'MyExecute'
    > Running:3 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:4 ExecuteThread: '23' for queue: 'MyExecute'
    > Hangs ExecuteThread: '23' for queue: 'MyExecute'
    > Running:5 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:6 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:7 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:8 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:9 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:10 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:11 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:12 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:13 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:14 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:15 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:16 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:17 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:18 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:19 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:20 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:21 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:22 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:23 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:24 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:25 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:26 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:27 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:28 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:29 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:30 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:31 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:32 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:33 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:34 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:35 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:36 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:37 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:38 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:39 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:40 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:41 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:42 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:43 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:44 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:45 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:46 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:47 ExecuteThread: '24' for queue: 'MyExecute'
    > Running:48 ExecuteThread: '22' for queue: 'MyExecute'
    > Running:49 ExecuteThread: '24' for queue: 'MyExecute'
    > Hangs doneExecuteThread: '23' for queue: 'MyExecute'
    > // The server hangs until the 20 seconds expires.
    > Running:50 ExecuteThread: '23' for queue: 'MyExecute'
    >
    > Regards,
    > Gustav Lund
    > (glu@tdc.dk)
    >



  5. Re: MDBeans that hangs blocks for others


    Hi Tom,

    Thanks for Your reply.

    I did all test with MessagesMaximum=1 on the connection factory. I have looked
    in the config.xml to bee sure.

    I have pasted some info from my config.xml.

    FlowControlEnabled="true" FlowSteps="1"
    JNDIName="TaskQueueFactory"
    LoadBalancingEnabled="true" MessagesMaximum="1"
    Name="myJMSFactory" ServerAffinityEnabled="true"
    Targets="myserver" XAConnectionFactoryEnabled="true"/>

    PagingStore="" Store="myJMSJDBCStore" Targets="myserver">
    DeliveryModeOverride="Persistent" ExpirationPolicy="Log"
    JNDIName="TaskQueue"
    MessagesMaximum="-1" Name="myMDBean@myJMSServer"
    RedeliveryDelayOverride="5" StoreEnabled="true" Template=""/>


    I have also tested with LoadBalancingEnabled/FlowControlEnaled=true/false

    Any ideas or comments on this are very welcome!

    Best Regards,
    Gustav Lund

    Tom Barnes wrote:
    >Hi Gustav,
    >
    >There is an asynchronous
    >pipe-line of messages (in-flight/backlog messages) between
    >server and async consumer. Pipe-lines allows the
    >server to push several messages to a consumer in
    >a single operation. This generally improves
    >performance, but can lead to "idle" MDBs if
    >messages are produced in small widely separated bursts, and
    >MDBs are slow to operate on their dedicated message
    >backlog. If you want to
    >reduce the max backlog of messages between
    >server and async consumer, configure a lower
    >"MessagesMaximum" on the connection factory -
    >the default size is 10. This behavior
    >is not unique to WL JMS - other JMS products
    >also support message backlogs.
    >
    >Information on message backlogs is in the JMS Programmer's
    >Guide, as well as the aforementioned JMS
    >Performance white-paper.
    >
    >Another option, as mentioned earlier, is to
    >partition "slow" jobs from "fast" jobs in
    >some way, so that "fast" jobs are always
    >directed to MDBs that are dedicated to the "fast"
    >task.
    >
    >Tom
    >
    >Gustav Lund wrote:
    >
    >> Hi Tom,
    >>
    >> Thanks for Your reply.
    >>
    >> I know that MDBeans is limited by the number of available threads.

    >I have used
    >> an execute queue and the issue is the same. If I have a number of requests,

    >and
    >> only one MDBean con-sume time, then this single MDBean instance can

    >block for
    >> other MDBean requests, even if others threads is idle.
    >>
    >> I did a small test with an execution queue of 25 threads (thread count),

    >sending
    >> 50 re-quest and the 4. MDBean hangs for 20 seconds as in my first little

    >test
    >> program. In this test Thread 22 & 24 do all the work. Thread 23 hangs

    >the second
    >> (running 4.) time for 20 second and block for 1 MDBean request. I don't

    >understand
    >> why Thread 23 can block for a MDBean request while other Threads in

    >the execution
    >> queue is idle. ??
    >>
    >> Any ideas or comments on this are very welcome!
    >>
    >> Running:1 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:2 ExecuteThread: '23' for queue: 'MyExecute'
    >> Running:3 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:4 ExecuteThread: '23' for queue: 'MyExecute'
    >> Hangs ExecuteThread: '23' for queue: 'MyExecute'
    >> Running:5 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:6 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:7 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:8 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:9 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:10 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:11 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:12 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:13 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:14 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:15 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:16 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:17 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:18 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:19 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:20 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:21 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:22 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:23 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:24 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:25 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:26 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:27 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:28 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:29 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:30 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:31 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:32 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:33 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:34 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:35 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:36 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:37 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:38 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:39 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:40 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:41 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:42 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:43 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:44 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:45 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:46 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:47 ExecuteThread: '24' for queue: 'MyExecute'
    >> Running:48 ExecuteThread: '22' for queue: 'MyExecute'
    >> Running:49 ExecuteThread: '24' for queue: 'MyExecute'
    >> Hangs doneExecuteThread: '23' for queue: 'MyExecute'
    >> // The server hangs until the 20 seconds expires.
    >> Running:50 ExecuteThread: '23' for queue: 'MyExecute'
    >>
    >> Regards,
    >> Gustav Lund
    >> (glu@tdc.dk)
    >>

    >



  6. Re: MDBeans that hangs blocks for others

    Hi Gustav,

    Before going any farther, please confirm
    that the wl descriptor for the MDB was modified
    to refer to the JNDI name of
    the custom connection factory.

    Also, note that the load-balancing and
    flow-control options are for producers, not
    consumers - and therefore won't change
    the behavior of an MDB. In addition, load-balancing
    only has meaning for distributed destinations -
    which I don't think you are using. If you
    haven't already, I highly recommend reading
    the JMS Performance Guide white-paper, which
    details these options.

    Tom

    Gustav Lund wrote:
    > Hi Tom,
    >
    > Thanks for Your reply.
    >
    > I did all test with MessagesMaximum=1 on the connection factory. I have looked
    > in the config.xml to bee sure.
    >
    > I have pasted some info from my config.xml.
    >
    > > FlowControlEnabled="true" FlowSteps="1"
    > JNDIName="TaskQueueFactory"
    > LoadBalancingEnabled="true" MessagesMaximum="1"
    > Name="myJMSFactory" ServerAffinityEnabled="true"
    > Targets="myserver" XAConnectionFactoryEnabled="true"/>
    >
    > > PagingStore="" Store="myJMSJDBCStore" Targets="myserver">
    > > DeliveryModeOverride="Persistent" ExpirationPolicy="Log"
    > JNDIName="TaskQueue"
    > MessagesMaximum="-1" Name="myMDBean@myJMSServer"
    > RedeliveryDelayOverride="5" StoreEnabled="true" Template=""/>
    >

    >
    > I have also tested with LoadBalancingEnabled/FlowControlEnaled=true/false
    >
    > Any ideas or comments on this are very welcome!
    >
    > Best Regards,
    > Gustav Lund
    >
    > Tom Barnes wrote:
    >
    >>Hi Gustav,
    >>
    >>There is an asynchronous
    >>pipe-line of messages (in-flight/backlog messages) between
    >>server and async consumer. Pipe-lines allows the
    >>server to push several messages to a consumer in
    >>a single operation. This generally improves
    >>performance, but can lead to "idle" MDBs if
    >>messages are produced in small widely separated bursts, and
    >>MDBs are slow to operate on their dedicated message
    >>backlog. If you want to
    >>reduce the max backlog of messages between
    >>server and async consumer, configure a lower
    >>"MessagesMaximum" on the connection factory -
    >>the default size is 10. This behavior
    >>is not unique to WL JMS - other JMS products
    >>also support message backlogs.
    >>
    >>Information on message backlogs is in the JMS Programmer's
    >>Guide, as well as the aforementioned JMS
    >>Performance white-paper.
    >>
    >>Another option, as mentioned earlier, is to
    >>partition "slow" jobs from "fast" jobs in
    >>some way, so that "fast" jobs are always
    >>directed to MDBs that are dedicated to the "fast"
    >>task.
    >>
    >>Tom
    >>
    >>Gustav Lund wrote:
    >>
    >>
    >>>Hi Tom,
    >>>
    >>>Thanks for Your reply.
    >>>
    >>>I know that MDBeans is limited by the number of available threads.

    >>
    >>I have used
    >>
    >>>an execute queue and the issue is the same. If I have a number of requests,

    >>
    >>and
    >>
    >>>only one MDBean con-sume time, then this single MDBean instance can

    >>
    >>block for
    >>
    >>>other MDBean requests, even if others threads is idle.
    >>>
    >>>I did a small test with an execution queue of 25 threads (thread count),

    >>
    >>sending
    >>
    >>>50 re-quest and the 4. MDBean hangs for 20 seconds as in my first little

    >>
    >>test
    >>
    >>>program. In this test Thread 22 & 24 do all the work. Thread 23 hangs

    >>
    >>the second
    >>
    >>>(running 4.) time for 20 second and block for 1 MDBean request. I don't

    >>
    >>understand
    >>
    >>>why Thread 23 can block for a MDBean request while other Threads in

    >>
    >>the execution
    >>
    >>>queue is idle. ??
    >>>
    >>>Any ideas or comments on this are very welcome!
    >>>
    >>>Running:1 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:2 ExecuteThread: '23' for queue: 'MyExecute'
    >>>Running:3 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:4 ExecuteThread: '23' for queue: 'MyExecute'
    >>>Hangs ExecuteThread: '23' for queue: 'MyExecute'
    >>>Running:5 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:6 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:7 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:8 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:9 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:10 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:11 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:12 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:13 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:14 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:15 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:16 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:17 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:18 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:19 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:20 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:21 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:22 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:23 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:24 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:25 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:26 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:27 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:28 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:29 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:30 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:31 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:32 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:33 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:34 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:35 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:36 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:37 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:38 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:39 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:40 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:41 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:42 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:43 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:44 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:45 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:46 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:47 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Running:48 ExecuteThread: '22' for queue: 'MyExecute'
    >>>Running:49 ExecuteThread: '24' for queue: 'MyExecute'
    >>>Hangs doneExecuteThread: '23' for queue: 'MyExecute'
    >>>// The server hangs until the 20 seconds expires.
    >>>Running:50 ExecuteThread: '23' for queue: 'MyExecute'
    >>>
    >>>Regards,
    >>>Gustav Lund
    >>>(glu@tdc.dk)
    >>>

    >>

    >



  7. Re: MDBeans that hangs blocks for others


    Hi Tom,

    Thanks for Your reply.

    That did the trick. Now it works.

    I did read the white papers, but sometime you need help to clear out what is wrong.
    ,-))

    Thanks for Your help.

    Best regards,

    Gustav Lund

    Tom Barnes wrote:
    >Hi Gustav,
    >
    >Before going any farther, please confirm
    >that the wl descriptor for the MDB was modified
    >to refer to the JNDI name of
    >the custom connection factory.
    >
    >Also, note that the load-balancing and
    >flow-control options are for producers, not
    >consumers - and therefore won't change
    >the behavior of an MDB. In addition, load-balancing
    >only has meaning for distributed destinations -
    >which I don't think you are using. If you
    >haven't already, I highly recommend reading
    >the JMS Performance Guide white-paper, which
    >details these options.
    >
    >Tom
    >
    >Gustav Lund wrote:
    >> Hi Tom,
    >>
    >> Thanks for Your reply.
    >>
    >> I did all test with MessagesMaximum=1 on the connection factory. I

    >have looked
    >> in the config.xml to bee sure.
    >>
    >> I have pasted some info from my config.xml.
    >>
    >> >> FlowControlEnabled="true" FlowSteps="1"
    >> JNDIName="TaskQueueFactory"
    >> LoadBalancingEnabled="true" MessagesMaximum="1"
    >> Name="myJMSFactory" ServerAffinityEnabled="true"
    >> Targets="myserver" XAConnectionFactoryEnabled="true"/>
    >>
    >> >> PagingStore="" Store="myJMSJDBCStore" Targets="myserver">
    >> >> DeliveryModeOverride="Persistent" ExpirationPolicy="Log"
    >> JNDIName="TaskQueue"
    >> MessagesMaximum="-1" Name="myMDBean@myJMSServer"
    >> RedeliveryDelayOverride="5" StoreEnabled="true" Template=""/>
    >>

    >>
    >> I have also tested with LoadBalancingEnabled/FlowControlEnaled=true/false
    >>
    >> Any ideas or comments on this are very welcome!
    >>
    >> Best Regards,
    >> Gustav Lund
    >>
    >> Tom Barnes wrote:
    >>
    >>>Hi Gustav,
    >>>
    >>>There is an asynchronous
    >>>pipe-line of messages (in-flight/backlog messages) between
    >>>server and async consumer. Pipe-lines allows the
    >>>server to push several messages to a consumer in
    >>>a single operation. This generally improves
    >>>performance, but can lead to "idle" MDBs if
    >>>messages are produced in small widely separated bursts, and
    >>>MDBs are slow to operate on their dedicated message
    >>>backlog. If you want to
    >>>reduce the max backlog of messages between
    >>>server and async consumer, configure a lower
    >>>"MessagesMaximum" on the connection factory -
    >>>the default size is 10. This behavior
    >>>is not unique to WL JMS - other JMS products
    >>>also support message backlogs.
    >>>
    >>>Information on message backlogs is in the JMS Programmer's
    >>>Guide, as well as the aforementioned JMS
    >>>Performance white-paper.
    >>>
    >>>Another option, as mentioned earlier, is to
    >>>partition "slow" jobs from "fast" jobs in
    >>>some way, so that "fast" jobs are always
    >>>directed to MDBs that are dedicated to the "fast"
    >>>task.
    >>>
    >>>Tom
    >>>
    >>>Gustav Lund wrote:
    >>>
    >>>
    >>>>Hi Tom,
    >>>>
    >>>>Thanks for Your reply.
    >>>>
    >>>>I know that MDBeans is limited by the number of available threads.
    >>>
    >>>I have used
    >>>
    >>>>an execute queue and the issue is the same. If I have a number of

    >requests,
    >>>
    >>>and
    >>>
    >>>>only one MDBean con-sume time, then this single MDBean instance can
    >>>
    >>>block for
    >>>
    >>>>other MDBean requests, even if others threads is idle.
    >>>>
    >>>>I did a small test with an execution queue of 25 threads (thread count),
    >>>
    >>>sending
    >>>
    >>>>50 re-quest and the 4. MDBean hangs for 20 seconds as in my first

    >little
    >>>
    >>>test
    >>>
    >>>>program. In this test Thread 22 & 24 do all the work. Thread 23 hangs
    >>>
    >>>the second
    >>>
    >>>>(running 4.) time for 20 second and block for 1 MDBean request. I

    >don't
    >>>
    >>>understand
    >>>
    >>>>why Thread 23 can block for a MDBean request while other Threads in
    >>>
    >>>the execution
    >>>
    >>>>queue is idle. ??
    >>>>
    >>>>Any ideas or comments on this are very welcome!
    >>>>
    >>>>Running:1 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:2 ExecuteThread: '23' for queue: 'MyExecute'
    >>>>Running:3 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:4 ExecuteThread: '23' for queue: 'MyExecute'
    >>>>Hangs ExecuteThread: '23' for queue: 'MyExecute'
    >>>>Running:5 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:6 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:7 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:8 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:9 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:10 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:11 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:12 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:13 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:14 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:15 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:16 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:17 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:18 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:19 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:20 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:21 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:22 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:23 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:24 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:25 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:26 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:27 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:28 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:29 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:30 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:31 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:32 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:33 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:34 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:35 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:36 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:37 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:38 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:39 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:40 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:41 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:42 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:43 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:44 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:45 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:46 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:47 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Running:48 ExecuteThread: '22' for queue: 'MyExecute'
    >>>>Running:49 ExecuteThread: '24' for queue: 'MyExecute'
    >>>>Hangs doneExecuteThread: '23' for queue: 'MyExecute'
    >>>>// The server hangs until the 20 seconds expires.
    >>>>Running:50 ExecuteThread: '23' for queue: 'MyExecute'
    >>>>
    >>>>Regards,
    >>>>Gustav Lund
    >>>>(glu@tdc.dk)
    >>>>
    >>>

    >>

    >



+ Reply to Thread