Is onMessage() thread safe? - Weblogic

This is a discussion on Is onMessage() thread safe? - Weblogic ; When new message is received, then wl uses MDB from the pool, does this mean that MDB are thread safe? More specific, do we need to use "synchronized onMessage" method and is is safe to use? Thanks Mike...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Is onMessage() thread safe?

  1. Is onMessage() thread safe?


    When new message is received, then wl uses MDB from the pool, does this mean that
    MDB are thread safe? More specific, do we need to use "synchronized onMessage"
    method and is is safe to use?
    Thanks
    Mike

  2. Re: Is onMessage() thread safe?

    Yes. A consumer's onMessage() will not get called again
    until the previous call returns.

    Mike wrote:

    > When new message is received, then wl uses MDB from the pool, does this mean that
    > MDB are thread safe? More specific, do we need to use "synchronized onMessage"
    > method and is is safe to use?
    > Thanks
    > Mike



  3. Re: Is onMessage() thread safe?


    Thanks for your reply Tom,
    This means it is safe to remove synchronization from onMessage() method and weblogic
    will take care of neccessary synchronization.
    Mike


    Tom Barnes wrote:
    >Yes. A consumer's onMessage() will not get called again
    >until the previous call returns.
    >
    >Mike wrote:
    >
    >> When new message is received, then wl uses MDB from the pool, does

    >this mean that
    >> MDB are thread safe? More specific, do we need to use "synchronized

    >onMessage"
    >> method and is is safe to use?
    >> Thanks
    >> Mike

    >



+ Reply to Thread