en.help.task-contextservicecreate.html Maven / Gradle / Ivy
Show all versions of console-concurrent-plugin Show documentation
To Create a Context Service
A context service is used to create dynamic proxy objects that capture the context of a container and enable applications to run within that context at a later time. The context of the container is propagated to the thread executing the task.
In GlassFish Server, you configure a context service resource and make it available for use by application components such as servlets and EJBs.
-
In the navigation tree, expand the Resources node.
-
Under the Resources node, expand the Concurrent Resources node.
-
Under the Concurrent Resources node, select Context Services.
The Context Services page opens.
-
On the Context Services page, click New.
The New Context Service page opens.
-
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/myContextService
. The name can contain only alphanumeric, underscore, dash, or dot characters.
-
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.
-
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.
-
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.
-
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.
-
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
.
-
Click OK.
See Also
Copyright © 2005, 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices