All Downloads are FREE. Search and download functionalities are using the official Maven repository.

en.help.task-managedthreadfactorynew.html Maven / Gradle / Ivy

There is a newer version: 8.0.0-JDK17-M9
Show newest version


To Create a Managed Thread Factory

A managed thread factory is used by applications to create managed threads on demand. The threads are started and managed by the container. The context of the container is propagated to the thread executing the task.

In GlassFish Server, you configure a managed thread factory resource and make it available for use by application components such as servlets and EJBs.

  1. In the navigation tree, expand the Resources node.

  2. Under the Resources node, expand the Concurrent Resources node.

  3. Under the Concurrent Resources node, select Managed Thread Factories.

    The Managed Thread Factories page opens.

  4. On the Managed Thread Factories page, click New.

    The New Managed Thread Factory page opens.

  5. In the JNDI Name field, type a unique name that identifies the resource.

    The JNDI name is registered in the JNDI naming service and used by applications to look up the resource. Use the concurrent/name format. For example, concurrent/myManagedThreadFactory. The name can contain only alphanumeric, underscore, dash, or dot characters.

  6. Select the Context Information Enabled checkbox to propagate contexts to threads, and select the contexts that you want to propagate.

    This option is enabled and all contexts are selected by default. Use Shift-click or Control-click to choose multiple contexts. If this option is disabled, contexts are not propagated, even if they are selected.

  7. Select the Status Enabled checkbox to enable the resource.

    This option is enabled by default, which means that the resource is available as soon as it is created.

  8. In the Thread Priority field, type the priority to assign to created threads.

    The default value is 5.

  9. In the Description field, type a short description of the resource.

    This description is a string value and can include a maximum of 250 characters.

  10. In the Additional Properties section, do not add any additional properties.

    GlassFish Server does not define any additional properties for this resource type. Moreover, this resource type does not currently use any additional properties.

  11. In the Targets section, specify the selected targets for the resource.

    Targets are displayed only if clusters and standalone instances have been created in the domain, in addition to the default server instance, server.

  12. Click OK.

See Also
Copyright © 2005, 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices




© 2015 - 2025 Weber Informatics LLC | Privacy Policy