Exit Print View

Sun GlassFish Enterprise Server v3 Administration Guide

  This Document Entire Library
Print View

Document Information

Preface

1.  Overview of Enterprise Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering Enterprise Server

Part I Runtime Administration

2.  General Administration

3.  Administering Domains

4.  Administering the Virtual Machine for the Java Platform

5.  Administering Thread Pools

About Thread Pools

Configuring Thread Pools

To Create a Thread Pool

To List Thread Pools

To Update a Thread Pool

To Delete a Thread Pool

6.  Administering Web Applications

7.  Administering the Logging Service

8.  Administering the Monitoring Service

9.  Administering Life Cycle Modules

10.  Extending Enterprise Server

Part II Security Administration

11.  Administering System Security

12.  Administering User Security

13.  Administering Message Security

Part III Resources and Services Administration

14.  Administering Database Connectivity

15.  Administering EIS Connectivity

16.  Administering Internet Connectivity

17.  Administering the Object Request Broker (ORB)

18.  Administering the JavaMail Service

19.  Administering the Java Message Service (JMS)

20.  Administering the Java Naming and Directory Interface (JNDI) Service

21.  Administering Transactions

Part IV Appendixes

A.  Subcommands for the asadmin Utility

Index

Configuring Thread Pools

You can specify the minimum and maximum number of threads that are reserved for requests from applications. The thread pool is dynamically adjusted between these two values.

The following topics are addressed here:

To Create a Thread Pool

Use the create-threadpool subcommand in remote mode to create a thread pool.

The minimum thread pool size that is specified signals the server to allocate at least that many threads in reserve for application requests. That number is increased up to the maximum thread pool size that is specified. Increasing the number of threads available to a process allows the process to respond to more application requests simultaneously.

If one resource adapter or application occupies all the Enterprise Server threads, thread starvation might occur. You can avoid this by dividing the Enterprise Server threads into different thread pools.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create a new thread pool by using the create-threadpool(1) subcommand.

    Information about options for the subcommand is included in this help page.

  3. To apply your changes, restart Enterprise Server.

    See To Restart a Domain.


    Note - Restart is not necessary for thread pools used by the web container.


Creating a Thread Pool

This example creates threadpool-l.

asadmin> create-threadpool --maxthreadpoolsize 100 --minthreadpoolsize 20 --idletimeout 2 --workqueues 100 threadpool-1
Command create-threadpool executed successfully
See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-threadpool at the command line.

To List Thread Pools

Use the list-threadpools subcommand in remote mode to list the existing thread pools.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List the existing thread pools by using the list-threadpools(1) subcommand.

Listing Thread Pools

This example lists the existing thread pools.

asadmin> list-threadpools
threadpool-1
Command list-threadpools executed successfully
See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-threadpools at the command line.

To Update a Thread Pool

Use the set subcommand to update the values for a specified thread pool.

  1. List the existing thread pools by using the list-threadpools(1) subcommand.

  2. Modify the values for a thread pool by using the set(1) subcommand.

    The thread pool is identified by its dotted name.

  3. To apply your changes, restart Enterprise Server.

    See To Restart a Domain.


    Note - Restart is not necessary for thread pools used by the web container.


Updating a Thread Pool

This example sets the max-thread-pool-size from its previous value to 8.

asadmin> set server.thread-pools.thread-pool.http-thread-pool.max-thread-pool-size=8
Command set executed successfully
See Also

You can also view the full syntax and options of the subcommand by typing asadmin help set at the command line.

To Delete a Thread Pool

Use the delete-threadpool subcommand in remote mode to delete an existing thread pool. Deleting a thread pool will fail if that pool is referenced by a network listener.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List the existing thread pools by using the list-threadpools(1) subcommand.

  3. Delete the specified thread pool by using the delete-threadpool(1) subcommand.

  4. To apply your changes, restart Enterprise Server.

    See To Restart a Domain.


    Note - Restart is not necessary for thread pools used by the web container.


Deleting a Thread Pool

This example deletes threadpool-1.

asadmin> delete-threadpool threadpool-1
Command delete-threadpool executed successfully
See Also

You can also view the full syntax and options of the subcommand by typing asadmin help delete-threadpool at the command line.