Thread pools

To provide asynchronous client and component notification, define thread pools and specify the number of threads dedicated to each type of notification.

StepsAdding a thread pool

  1. Select Thread Pools, right-click, and select Add.

  2. In the New Thread Pool dialog box, enter the name of the thread pool.

  3. Click OK.

NoteReader, writer, and worker threads To use a thread pool for client notification, set the value of readers to “3”, writers to “2”, and workers to “0”. Based on your own performance measurements, increase the number of reader and writer threads if it improves throughput. Using thread pools to improve performance is generally suitable only for high-volume client notification with transient messages. When message delivery is transactional or IIOP/SSL via the QOP property, the thread pool’s reader and writer threads are not used.

To use a thread pool for component notification, set the values of both readers and writers to “0”. Set the value of workers to “1” unless you want to allow parallel message processing, in which case you would increase this value.

StepsModifying the number of threads in a thread pool

  1. Select Thread Pools.

  2. Select a thread pool from the list, and select File | Properties.

  3. In the Thread Pool Properties dialog box, select the Configuration tab.

  4. To edit the number of threads, click on one of the property values.

    Property

    Datatype

    Default value

    Description

    readers

    long

    0

    The number of reader threads in the thread pool, which are used for client notification.

    writers

    long

    0

    The number of writer threads in the thread pool, which are used for client notification.

    workers

    long

    0

    The number of worker threads in the thread pool, which are used for component notification.

  5. Modify the property value and click OK.

Multiple MDB instances

To enable EAServer to create multiple instances of a message-driven bean (MDB):

  1. Create a thread pool for component notification, and set the workers property to a value greater than 1.

  2. Assign this thread pool to the MDB:

    1. In EAServer Manager, highlight the MDB, and select File | Properties.

    2. On the MDB Type tab, append the name of the thread pool you just created to the Listener name. For example, if you created a thread pool called “threads1” and the Listener Name is MyPkg/MyComp, change the Listener Name to MyPkg/MyComp[threadsl].

    See Chapter 31, “Using the Message Service,” in the EAServer Programmer’s Guide for more information about configuring MDBs.

StepsDeleting a thread pool

  1. Select Thread Pools.

  2. Select a thread pool from the list, right-click, and select Delete.