Elements of the Payara Platform Deployment Descriptors
This appendix describes the elements of the Payara Platform deployment descriptors.
activation-config
Specifies an activation configuration, which includes the runtime configuration properties of the message-driven bean in its operational environment.
For example, this can include information about the name of a physical JMS destination.
Matches and overrides the activation-config
element in the ejb-jar.xml
file.
Superelements
mdb-resource-adapter
(glassfish-ejb-jar.xml
)
activation-config-property
Specifies the name and value of an activation configuration property.
Superelements
activation-config
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the activation-config-property
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the name of an activation configuration property. |
|
only one |
Specifies the value of an activation configuration property. |
activation-config-property-name
Specifies the name of an activation configuration property.
Superelements
activation-config-property
(glassfish-ejb-jar.xml
)
activation-config-property-value
Specifies the value of an activation configuration property.
Superelements
activation-config-property
(glassfish-ejb-jar.xml
)
admin-object-resource
Defines an administered object for an inbound resource adapter.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the admin-object-resource
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the admin-object-resource
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the JNDI name for the resource. |
|
none |
Specifies the fully qualified type of the resource. |
|
none |
Specifies the name of the inbound resource adapter. |
|
|
(optional) Defines the type of the resource. Allowed values are:
|
|
|
(optional) Determines whether this resource is enabled at runtime. |
as-context
Specifies the authentication mechanism used to authenticate the client.
Superelements
ior-security-config
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the as-context
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the authentication method. The only supported value is |
|
only one |
Specifies the realm in which the user is authenticated. |
|
only one |
Specifies whether the authentication method specified in the |
archive-name
Specifies the name of the archive file. The value of the archive-name
element is used to derive the default application name when display-name
is not present in the application.xml
file.
The default application name is the archive-name
value minus the file extension. For example, if archive-name
is foo.ear
, the default application name is foo
.
Superelements
glassfish-application
(glassfish-application.xml
)
auth-method
Specifies the authentication method.
If the parent element is as-context
, the only supported value is USERNAME_PASSWORD
.
If the parent element is login-config
, specifies the authentication mechanism for the web service endpoint.
As a prerequisite to gaining access to any web resources protected by an authorization constraint, a user must be authenticated using the configured mechanism.
Superelements
login-config
(glassfish-web.xml
and payara-web.xml
),
as-context
(glassfish-ejb-jar.xml
)
auth-realm
JAAS is available on the ACC. Defines the optional configuration for a JAAS authentication realm. Authentication realms require provider-specific properties, which vary depending on what a particular implementation needs. For more information about how to define realms, see "Realm Configuration" in the Payara Server Application Development section.
Superelements
client-container
(sun-acc.xml
)
Subelements
The following table describes subelements for the auth-realm
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Attributes
The following table describes attributes for the auth-realm
element.
Attribute | Default | Description |
---|---|---|
|
none |
Defines the name of this realm. |
|
none |
Defines the Jakarta class which implements this realm. |
Example
Here is an example of the default file realm:
<auth-realm name="file"
classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
<property name="file" value="domain-dir/config/keyfile"/>
<property name="jaas-context" value="fileRealm"/>
</auth-realm>
Which properties an auth-realm
element uses depends on the value of the auth-realm
element’s name
attribute. The file realm uses
file
and jaas-context
properties. Other realms use different properties.
See "Realm Configuration" in the Payara Server Application Development section.
backend-principal
Specifies the user name and password required by the Enterprise Information System (EIS).
Superelements
security-map
(glassfish-resources.xml
and payara-resources.xml
)
bean-cache
Specifies the entity bean cache properties. Used for entity beans and stateful session beans.
Superelements
ejb
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the bean-cache
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies the maximum number of beans allowable in cache. |
|
zero or one |
Deprecated. |
|
zero or one |
Specifies the maximum time that a stateful session bean or entity bean is allowed to be idle in cache before being passivated. Default value is 10 minutes (600 seconds). |
|
zero or one |
Specifies the amount of time a bean remains before being removed. If |
|
zero or one |
Specifies the number of beans to be created if the pool is empty (subject to the |
|
zero or one |
Specifies the algorithm that must be used by the container to pick victims. Applies only to stateful session beans. |
Example
<bean-cache>
<max-cache-size>100</max-cache-size>
<cache-resize-quantity>10</cache-resize-quantity>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
<cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
<removal-timeout-in-seconds>5400</removal-timeout-in-seconds>
</bean-cache>
bean-pool
Specifies the pool properties of stateless session beans, entity beans, and message-driven bean.
Superelements
ejb
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the bean-pool
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies the initial and minimum number of beans maintained in the pool. Default is 32. |
|
zero or one |
Specifies the number of beans to be created if the pool is empty (subject to the |
|
zero or one |
Specifies the maximum number of beans in the pool. Values are from 0 to MAX_INTEGER. Default is to the EJB container value or 60. |
|
zero or one |
Deprecated. |
|
zero or one |
Specifies the maximum time that a bean is allowed to be idle in the pool. After this time, the bean is removed. This is a hint to the server. Default time is 600 seconds (10 minutes). |
cache
Configures caching for web application components.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the cache
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a custom class that implements the CacheHelper interface. |
|
zero or one |
Allows you to change the properties of the default, built-in |
|
zero or more |
Specifies a cache property, which has a name and a value. |
|
zero or more |
Maps a URL pattern or a servlet name to its cacheability constraints. |
Attributes
The following table describes attributes for the cache
element.
Attribute | Default | Description |
---|---|---|
|
|
(optional) Specifies the maximum number of entries the cache can contain. Must be a positive integer. |
|
|
(optional) Specifies the maximum amount of time in seconds that an entry can remain in the cache after it is created or refreshed. Can be overridden by a |
|
|
(optional) Determines whether servlet and JSP caching is enabled. |
Properties
The following table describes properties for the cache
element.
Property | Default | Description |
---|---|---|
|
|
Specifies the fully qualified name of the class that implements the cache functionality. See Cache Class Names for possible values. |
|
|
Specifies the number of entries in a segment of the cache table that should have its own LRU (least recently used) list. Applicable only if |
|
unlimited; |
Specifies an upper bound on the cache memory size in bytes (KB or MB units). Example values are |
Cache Class Names
The following table lists possible values of the cacheClassName
property.
Value | Description |
---|---|
|
A bounded cache with an LRU (least recently used) cache replacement policy. |
|
An unbounded cache suitable if the maximum number of entries is known. |
|
A cache suitable for a large number of entries (>4096). Uses the |
|
A cache suitable for limiting the cache size by memory rather than number of entries. Uses the |
cache-helper
Specifies a class that implements the com.sun.appserv.web.cache.CacheHelper interface.
Superelements
cache
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the cache-helper
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Attributes
The following table describes attributes for the cache-helper
element.
Attribute | Default | Description |
---|---|---|
|
|
Specifies a unique name for the helper class, which is referenced in the |
|
none |
Specifies the fully qualified class name of the cache helper, which must implement the com.sun.appserv.web.CacheHelper interface. |
cache-helper-ref
Specifies the name
of the cache-helper
used by the parent cache-mapping
element.
Superelements
cache-mapping
(glassfish-web.xml
and payara-web.xml
)
cache-idle-timeout-in-seconds
Specifies the maximum time that a bean can remain idle in the cache. After this amount of time, the container can passivate this bean.
A value of 0
specifies that beans never become candidates for passivation. Default is 600.
Applies to stateful session beans and entity beans.
Superelements
bean-cache
(glassfish-ejb-jar.xml
)
cache-mapping
Maps a URL pattern or a servlet name to its cacheability constraints.
Superelements
cache
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the cache-mapping
element.
Element | Required | Description |
---|---|---|
requires one |
Contains the name of a servlet. |
|
requires one |
Contains a servlet URL pattern for which caching is enabled. |
|
required if |
Contains the |
|
zero or one if |
Contains a comma-separated list of |
|
zero or one if |
Contains the |
|
zero or one if |
Specifies a field that gives the application component a programmatic way to refresh a cached entry. |
|
zero or more if |
Contains an HTTP method that is eligible for caching. |
|
zero or more if |
Specifies a component of the key used to look up and extract cache entries. |
|
zero or more if |
Specifies a cacheability constraint for the given |
call-property
Specifies JAX-RPC property values that can be set on a javax.xml.rpc.Call
object before it is returned to the web service client. The property names can be any properties supported by the JAX-RPC Call
implementation.
Superelements
port-info
, service-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
caller-propagation
Specifies whether the target accepts propagated caller identities. The values are NONE
, SUPPORTED
, or REQUIRED
.
Superelements
sas-context
(glassfish-ejb-jar.xml
)
cert-db
Not implemented. Included for backward compatibility only. Attribute values are ignored.
Superelements
security
(sun-acc.xml
)
check-all-at-commit
This element is not implemented. Do not use.
Superelements
consistency
(sun-cmp-mappings.xml
)
check-version-of-accessed-instances
Checks the version column of the modified beans.
Version consistency allows the bean state to be cached between transactions instead of read from a database. The bean state is verified by primary key and version column values. This occurs during a custom query (for dirty instances only) or commit (for both clean and dirty instances).
The version column must be a numeric type, and must be in the primary table. You must provide appropriate update triggers for this column.
Superelements
consistency
(sun-cmp-mappings.xml
)
checkpoint-at-end-of-method
Specifies that the stateful session bean state is checkpointed, or persisted, after the specified methods are executed. The availability-enabled
attribute of the parent ejb
element must be set to true
.
Superelements
ejb
(glassfish-ejb-jar.xml
)
checkpointed-methods
Deprecated. Supported for backward compatibility. Use checkpoint-at-end-of-method
instead.
Superelements
ejb
(glassfish-ejb-jar.xml
)
class-loader
Configures the class loader for the web module.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the class-loader
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Attributes
The following table describes attributes for the class-loader
element.
Attribute | Default | Description |
---|---|---|
|
null |
(optional) Specifies a colon or semicolon separated list of additional classpaths for this web module. Paths can be absolute or relative to the web module’s root, for example:
|
|
|
(optional) If If For a number of packages, including |
|
+ |
(optional) Not implemented. Included for backward compatibility with previous Oracle Web Server versions. |
If the delegate attribute is set to false , the class loader delegation behavior complies with the Servlet 6.0 specification, section 10.7.2.
If set to its default value of true , classes and resources residing in container-wide library JAR files are loaded in preference to classes and resources packaged within the WAR file.
Portable programs that use this element should not be packaged with any classes or interfaces that are a part of the Jakarta EE specification.
The behavior of a program that includes such classes or interfaces in its WAR file is undefined.
|
Properties
The following table describes properties for the class-loader
element.
Property | Default | Description |
---|---|---|
|
|
If |
classloading-delegate
With this option its possible to enable/disable class loading delegation. This allows deployed application to use libraries included on them, overriding the versions included on the server.
For more information about how class delegation can be configured on Payara Server, see the Enhanced Class loading section.
Superelements
payara-web-app
(glassfish-web.xml
and payara-web.xml
),
glassfish-application
(glassfish-application.xml
)
client-container
Defines the Payara Server specific configuration for the application client container. This is the root element; there can only be one client-container
element in a sun-acc.xml
file.
See The sun-acc.xml File.
Subelements
The following table describes subelements for the client-container
element.
Element | Required | Description |
---|---|---|
one or more |
Specifies the IIOP listener for the target server. Also specifies IIOP endpoints used for load balancing. If the Payara Server instance on which the application client is deployed participates in a cluster, Payara Server finds all currently active IIOP endpoints in the cluster automatically. However, a client should have at least two endpoints specified for bootstrapping purposes, in case one of the endpoints has failed. A listener or endpoint is in the form |
|
zero or one |
Specifies the optional configuration for JAAS authentication realm. |
|
zero or one |
Specifies the default client credential that is sent to the server. |
|
zero or one |
Specifies the default log file and the severity level of the message. |
|
zero or more |
Specifies configurations for message security providers. |
|
zero or more |
Specifies a property, which has a name and a value. |
Attributes
The following table describes attributes for the client-container
element.
Attribute | Default | Description |
---|---|---|
|
|
If |
Properties
The following table describes properties for the client-container
element.
Property | Default | Description |
---|---|---|
|
none |
Specifies a comma-separated
list of one or more IIOP endpoints used for load balancing. An IIOP
endpoint is in the form |
client-credential
Default client credentials that are sent to the server. If this element is present, the credentials are automatically sent to the server, without prompting the user for the user name and password on the client side.
Superelements
client-container
(sun-acc.xml
)
Subelements
The following table describes subelements for the client-credential
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Attributes
The following table describes attributes for the client-credential
element.
Attribute | Default | Description |
---|---|---|
|
none |
The user name used to authenticate the Application client container. |
|
none |
The password used to authenticate the Application client container. |
|
default realm for the domain |
(optional) The realm (specified by name) where credentials are to be resolved. |
clustered-attach-postconstruct
Describes whether to call a @PostConstruct
event listener each time the corresponding singleton bean is created on a different node. This setup will result in multiple calls. Valid values are true
or false
.
The default value is true
.
Superelements
ejb
(glassfish-ejb-jar.xml
)
clustered-bean
Describes whether this bean should be a Clustered Singleton. Can be applied only to singleton EJBs.
Valid values are true
or false
. The default value is false
.
Superelements
ejb
(glassfish-ejb-jar.xml
)
clustered-detach-predestroy
Whether to call a @PreDestroy
event listener when a singleton EJB bean is destroyed on an instance while still being available on another. This setup will result in multiple calls.
Valid values are true
or false
. The default value is true
.
Superelements
ejb
(glassfish-ejb-jar.xml
)
clustered-key-name
The key used for replication of clustered singletons beans. Applies to a singleton EJBs when the clustered-bean
element is set to true
.
This element is optional. If not set, the default key is the value of the ejb-name element.
|
Superelements
ejb
(glassfish-ejb-jar.xml
)
clustered-lock-type
Describes the type of distributed locking to be performed for a clustered singleton bean:
-
For EJB beans, only
INHERIT
andLOCK_NONE
are valid. -
For CDI beans, valid values are
LOCK
andINHERIT
, which is equivalent to usingLOCK_NONE
.
The default value is INHERIT
Superelements
ejb
(glassfish-ejb-jar.xml
)
cmp
Describes runtime information for a CMP entity bean object for EJB 1.1 and EJB 2.1 beans.
Superelements
ejb
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the cmp
element.
Element | Required | Description |
---|---|---|
zero or one |
This element is not implemented. |
|
zero or one |
This element is not implemented. |
|
zero or one |
Describes the finders for CMP 1.1 beans. |
|
zero or one |
Disables prefetching of entity bean states for the specified query methods. |
cmp-field-mapping
The cmp-field-mapping
element associates a field with one or more columns to which it maps. The column can be from a bean’s primary table or any defined secondary table.
If a field is mapped to multiple columns, the column listed first in this element is used as a source for getting the value from the database.
The columns are updated in the order they appear. There is one cmp-field-mapping
element for each cmp-field
element defined in the ejb-jar.xml
file.
Superelements
entity-mapping
(sun-cmp-mappings.xml
)
Subelements
The following table describes subelements for the cmp-field-mapping
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the Java identifier of a field. This identifier must match the value of the |
|
one or more |
Specifies the name of a column from the primary table, or the qualified table name (TABLE.COLUMN) of a column from a secondary or related table. |
|
zero or one |
Specifies that a field is read-only. |
|
zero or one |
Specifies the fetch group for this CMP field’s mapping. |
cmp-resource
Specifies the database to be used for storing CMP beans. For more information about this element, see "Configuring the CMP Resource" in the Payara Server Application Development section.
Superelements
enterprise-beans
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the cmp-resource
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the absolute |
|
zero or one |
Specifies the default runtime bindings of a resource reference. |
|
zero or more |
Specifies a property name and value. Used to configure |
|
zero or one |
If |
|
zero or one |
If |
|
zero or one |
Specifies the name of the database vendor for which tables can be created. |
|
zero or one |
Specifies field-specific type mappings and allows you to set the |
cmr-field-mapping
A container-managed relationship field has a name and one or more column pairs that define the relationship.
There is one cmr-field-mapping
element for each cmr-field
element in the ejb-jar.xml
file. A relationship can also participate in a fetch group.
Superelements
entity-mapping
(sun-cmp-mappings.xml
)
Subelements
The following table describes subelements for the cmr-field-mapping
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the Java identifier of a field. Must match the value of the |
|
one or more |
Specifies the pair of columns that determine the relationship between two database tables. |
|
zero or one |
Specifies the fetch group for this CMR field’s relationship. |
cmr-field-name
Specifies the Java identifier of a field. Must match the value of the cmr-field-name
subelement of the cmr-field
element in the ejb-jar.xml
file.
Superelements
cmr-field-mapping
(sun-cmp-mappings.xml
)
cmt-timeout-in-seconds
Overrides the Transaction Timeout setting of the Transaction Service for an individual bean.
The default value, 0
, specifies that the default Transaction Service timeout is used. If positive, this value is used for
all methods in the bean that start a new container-managed transaction.
This value is not used if the bean joins a client transaction.
Superelements
ejb
(glassfish-ejb-jar.xml
)
column-name
Specifies the name of a column from the primary table, or the qualified table name (TABLE.COLUMN) of a column from a secondary or related table.
Superelements
check-version-of-accessed-instances
,
cmp-field-mapping
, column-pair
(sun-cmp-mappings.xml
)
column-pair
Specifies the pair of columns that determine the relationship between two database tables. Each column-pair
must contain exactly two column-name
subelements, which specify the column’s names.
The first column-name
element names the table that this bean is mapped to, and the second column-name
names the column in the related table.
Superelements
cmr-field-mapping
, secondary-table
(sun-cmp-mappings.xml
)
commit-option
Specifies the commit option used on transaction completion. Valid values for Payara Server are B
or C
. Default value is B
. Applies to entity beans.
Commit option A is not supported for this Payara Server release. |
Superelements
ejb
(glassfish-ejb-jar.xml
)
compatibility
Specifies the Payara Server release with which to be backward compatible in terms of JAR visibility requirements for applications.
The current allowed value is v2
, which refers to older runtimes from where Payara Server is based from.
Starting in Java EE 6, the Java EE specification imposes stricter requirements than Java EE 5 did on which JAR files can be visible to various modules within an EAR file.
Setting this element to v2
removes these Java EE 6 and later restrictions.
Superelements
glassfish-application
(glassfish-application.xml
),
glassfish-ejb-jar
(glassfish-ejb-jar.xml
)
confidentiality
Specifies if the target supports privacy-protected messages. The values are NONE
, SUPPORTED
, or REQUIRED
.
Superelements
transport-config
(glassfish-ejb-jar.xml
)
connector-connection-pool
Defines a connector connection pool.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the connector-connection-pool
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Maps the principal received during servlet or EJB authentication to the credentials accepted by the EIS. |
|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the connector-connection-pool
element. Changing the following attributes requires a server restart or the redeployment or disabling and re-enabling of applications that refer to the resource:
resource-adapter-name
, connection-definition-name
, transaction-support
, associate-with-thread
, lazy-connection-association
, and lazy-connection-enlistment
.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the name of the connection pool. A |
|
none |
Specifies the name of the deployed connector module or application. If no name is specified during deployment, the name of the |
|
none |
Specifies a unique name, identifying a resource adapter’s |
|
|
(optional) Specifies the initial and minimum number of connections maintained in the pool. |
|
|
(optional) Specifies the maximum number of connections that can be created to satisfy client requests. |
|
|
(optional) Specifies the amount of time, in milliseconds, that the caller is willing to wait for a connection.
If |
|
|
(optional) Specifies the number of idle connections to be destroyed if the existing number of connections is above the This is enforced periodically at the |
|
|
(optional) Specifies the maximum time that a connection can remain idle in the pool. After this amount of time, the pool can close this connection. |
|
|
(optional) If |
|
none |
(optional) Specifies the transaction support for this connection pool. Overrides the transaction support defined in the resource adapter in a downward compatible way: supports a transaction level lower than or equal to the resource adapter’s, but not higher. Allowed values in descending order are:
|
|
|
(optional) Specifies whether connections have to be validated before being given to the application. If a resource’s validation fails, it is destroyed, and a new resource is created and returned. |
|
|
Specifies the time interval within which a connection is validated at most once. Minimizes the number of validation calls. A value of zero allows unlimited validation calls. |
|
|
Detects potential connection leaks by the application. A connection that is not returned back to the pool by the application within the specified period is assumed to be potentially leaking, and a stack trace of the caller is logged. A zero value disables leak detection. A nonzero value enables leak tracing. |
|
|
If |
|
|
Specifies the number of attempts to create a new connection. |
|
|
Specifies the time interval between attempts to create a connection when |
|
|
If |
|
|
If |
|
|
If This attribute associates connections with a thread such that when the
same thread is in need of connections, it can reuse the connections
already associated with that thread. In this case, the overhead of
getting connections from the pool is avoided. However, when this value
is set to |
|
|
If |
|
|
Specifies the number of times a connections is reused by the pool, after which it is closed. A zero value disables this feature. |
|
|
(optional) Specifies whether to ping the pool during pool creation or reconfiguration to identify and warn of any erroneous attribute values. |
|
|
(optional) If |
Properties
Most properties of the connector-connection-pool
element are the names of setter methods of the managedconnectionfactory-class
element in the ra.xml
file. Properties of the connector-connection-pool
element override the ManagedConnectionFactory
JavaBean configuration settings.
All but the last four properties in the following table are connector-connection-pool
properties of jmsra
, the resource adapter used to communicate with the Open Message Queue software.
Changes to connector-connection-pool
properties require a server restart.
Property | Default | Description |
---|---|---|
|
none |
Specifies a list of host/port combinations of the
Message Queue software. For JMS resources of the Type |
|
none |
Specifies the JMS Client Identifier to be associated with a Durable subscription names are unique and only valid within the scope of a client identifier. To create or reactivate a durable subscriber, the connection must have a valid client identifier. The JMS specification ensures that client identifiers are unique and that a given client identifier is allowed to be used by only one active connection at a time. |
|
|
Specifies the user name for connecting to the
Message Queue software. For JMS resources of the Type |
|
|
Specifies the password for connecting to the
Message Queue software. For JMS resources of the Type |
|
|
Specifies the number of attempts to connect (or reconnect) for each address in the |
|
|
Specifies the interval between reconnect
attempts in milliseconds. This applies to attempts on each address in
the |
|
|
If |
|
|
Specifies whether connection
attempts are in the order of addresses in the |
|
|
Specifies the number of times the client
runtime iterates through the |
connector-resource
Defines the connection factory object of a specific connection definition in a connector (resource adapter).
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the connector-resource
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the connector-resource
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the JNDI name for the resource. |
|
none |
Specifies the |
|
|
(optional) Defines the type of the resource. Allowed values are:
|
|
|
(optional) Determines whether this resource is enabled at runtime. |
consistency
Specifies container behavior in guaranteeing transactional consistency of the data in the bean.
Superelements
entity-mapping
(sun-cmp-mappings.xml
)
Subelements
The following table describes subelements for the consistency
element.
Element | Required | Description |
---|---|---|
exactly one subelement is required |
No consistency checking occurs. |
|
exactly one subelement is required |
Checks concurrent modification of fields in modified beans at commit time. |
|
exactly one subelement is required |
Obtains an exclusive lock when the data is loaded. |
|
This element is not implemented. Do not use. |
||
This element is not implemented. Do not use. |
||
exactly one subelement is required |
Checks the version column of the modified beans. |
constraint-field
Specifies a cacheability constraint for the given url-pattern
or servlet-name
.
All constraint-field
constraints must pass for a response to be cached. If there are value
constraints, at least one of them must pass.
Superelements
cache-mapping
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the constraint-field
element.
Element | Required | Description |
---|---|---|
zero or more |
Contains a value to be matched to the input parameter value. |
Attributes
The following table describes attributes for the constraint-field
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the input parameter name. |
|
|
(optional) Specifies the scope from which
the input parameter is retrieved. Allowed values are
|
|
|
(optional) If |
|
|
(optional) If |
constraint-field-value
Specifies a value to be matched to the input parameter value. The matching is case sensitive. For example:
<value match-expr="in-range">1-60</value>
Superelements
constraint-field
(glassfish-web.xml
and payara-web.xml
)
Attributes
The following table describes attributes for the constraint-field-value
element.
Attribute | Default | Description |
---|---|---|
|
|
(optional) Specifies the type of comparison performed with the value.
Allowed values are If |
|
|
(optional) If |
|
|
(optional) If |
context-root
Contains the web context root for the application or web application that was packaged as a WAR file. Overrides the corresponding element in the application.xml
or web.xml
file.
If the parent element is java-web-start-access
, this element contains the context root for the Java Web Start enabled application client module.
If none is specified, a default is generated; see java-web-start-access
.
If you are setting up load balancing, web module context roots must be unique within a server instance.
Superelements
web
(glassfish-application.xml
),
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
java-web-start-access
(glassfish-application-client.xml
)
cookie-properties
Specifies session cookie properties.
If cookie settings are defined declaratively in the web.xml file, the cookie properties defined here take precedence.
If cookie settings are defined programmatically using jakarta.servlet.SessionCookieConfig methods, those cookie settings take precedence over the cookie properties defined here.
|
Superelements
session-config
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the cookie-properties
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Properties
The following table describes properties for the cookie-properties
element.
Property | Default | Description |
---|---|---|
|
none |
Specifies the cookie name. |
|
Context path at which the web module is installed. |
Specifies the pathname that is set when the cookie is created. The
browser sends the cookie if the pathname for the request contains this
pathname. If set to |
|
none |
Specifies the expiration time (in seconds) after which the browser expires the cookie. If this is unset, the cookie doesn’t expire. |
|
(unset) |
Specifies the domain for which the cookie is valid. |
|
none |
Specifies the comment that identifies the session tracking cookie in the cookie file. |
|
|
Sets the
To set the For details, see |
|
none |
Specifies that the cookie is marked HTTP only. Allowed values are |
|
none |
Users can set up the
|
create-tables-at-deploy
Specifies whether database tables are created for beans that are automatically mapped by the EJB container.
If true
, creates tables in the database. If false
(the default if this element is not present), does not create tables.
This element can be overridden during deployment. See "Generation Options for CMP" in the Payara Server Application Development section.
Superelements
cmp-resource
(glassfish-ejb-jar.xml
)
custom-resource
Defines a custom resource, which specifies a custom server-wide resource object factory.
Such object factories implement the javax.naming.spi.ObjectFactory
interface.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the custom-resource
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the custom-resource
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the JNDI name for the resource. |
|
none |
Specifies the fully qualified type of the resource. |
|
none |
Specifies the fully qualified name of the
user-written factory class, which implements
|
|
|
(optional) Defines the type of the resource. Allowed values are:
|
|
|
(optional) Determines whether this resource is enabled at runtime. |
database-vendor-name
Specifies the name of the database vendor for which tables can be created. Allowed values are javadb
, db2
, mssql
, mysql
, oracle
, postgresql
, pointbase
, H2
, derby
(also for CloudScape), and sybase
, case-insensitive.
If no value is specified, a connection is made to the resource specified
by the jndi-name
subelement of the cmp-resource
element, and the database vendor name is read. If the connection cannot be established, or if the value is not recognized, SQL-92 compliance is presumed.
This element can be overridden during deployment. See "Generation Options for CMP" in the Payara Server Application Development section.
Superelements
cmp-resource
(glassfish-ejb-jar.xml
)
debugging-enabled
Specifies whether the debugging servlet is enabled for this web service endpoint. Allowed values are true
(the default) and false
.
Superelements
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
default
Specifies that a field belongs to the default hierarchical fetch group, and enables prefetching for a CMR field. To disable prefetching for specific query methods, use a prefetch-disabled
element in the glassfish-ejb-jar.xml
file.
Superelements
fetched-with
(sun-cmp-mappings.xml
)
default-helper
Passes property values to the built-in default
cache-helper
class.
Superelements
cache
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the default-helper
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Properties
The following table describes properties for the default-helper
element.
Property | Default | Description |
---|---|---|
|
Uses the built-in |
The caching
engine looks in the |
default-resource-principal
Specifies the default principal (user) for the resource.
If this element is used in conjunction with a JMS Connection Factory resource, the name
and password
subelements must be valid entries in the Open Message Queue broker user repository.
Superelements
resource-ref
(glassfish-web.xml
and payara-web.xml
,
glassfish-ejb-jar.xml
, glassfish-application-client.xml
);
cmp-resource
, mdb-connection-factory
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the default-resource-principal
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the default resource principal name used to sign on to a resource manager. |
|
only one |
Specifies password of the default resource principal. |
description
Specifies a text description of the containing element.
Superelements
property
(with attributes), valve
(glassfish-web.xml
and payara-web.xml
); activation-config
,
method
(glassfish-ejb-jar.xml
);
target-server
(sun-acc.xml
);
admin-object-resource
,
connector-connection-pool
,
connector-resource
, custom-resource
,
external-jndi-resource
,
jdbc-connection-pool
, jdbc-resource
,
mail-resource
, property
(with attributes),
resource-adapter-config
(glassfish-resources.xml
and payara-resources.xml
)
disable-nonportable-jndi-names
Because the Jakarta Enterprise Beans specification defines portable EJB JNDI names, there
is less need for Payara Server specific JNDI names. By default,
Payara Server specific default JNDI names are applied automatically
for backward compatibility. To disable Payara Server specific JNDI
names for an EJB module, set the value of this element to true
. The
default is false
.
Superelements
glassfish-ejb-jar
(glassfish-ejb-jar.xml
)
dispatcher
Specifies a comma-separated list of RequestDispatcher
methods for which caching is enabled on the target resource. Valid values are REQUEST
, FORWARD
, INCLUDE
, and ERROR
.
If this element is not specified, the default is REQUEST
. See 6.2.5
of the Servlet 6.0 specification for more information.
Superelements
cache-mapping
(glassfish-web.xml
and payara-web.xml
)
drop-tables-at-undeploy
Specifies whether database tables that were automatically created when the bean(s) were last deployed are dropped when the bean(s) are undeployed.
If true
, drops tables from the database. If false
(the default if this element is not present), does not drop tables.
This element can be overridden during deployment. See "Generation Options for CMP" in the Payara Server Application Development section.
Superelements
cmp-resource
(glassfish-ejb-jar.xml
)
ejb
Defines runtime properties for a single enterprise bean within the application. The subelements listed below apply to particular enterprise beans as follows:
-
All types of beans:
ejb-name
,ejb-ref
,resource-ref
,resource-env-ref
,ior-security-config
,gen-classes
,jndi-name
,use-thread-pool-id
,message-destination-ref
,pass-by-reference
,service-ref
-
Stateless session beans:
bean-pool
,webservice-endpoint
-
Stateful session beans:
bean-cache
,webservice-endpoint
,checkpoint-at-end-of-method
-
Entity beans:
commit-option
,bean-cache
,bean-pool
,cmp
,is-read-only-bean
,refresh-period-in-seconds
,flush-at-end-of-method
-
Message-driven beans:
mdb-resource-adapter
,mdb-connection-factory
,jms-durable-subscription-name
,jms-max-messages-load
,bean-pool
Superelements
enterprise-beans
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the ejb
element.
Element | Required | Description |
---|---|---|
only one |
Matches the |
|
zero or more |
Specifies the absolute |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Specifies runtime settings for a web service reference. |
|
zero or more |
Specifies the name of a physical message destination. |
|
zero or one |
Specifies the passing method used by an enterprise bean calling a remote interface method in another bean that is colocated within the same process. |
|
zero or one |
Specifies runtime information for a container-managed persistence (CMP) entity bean for EJB 1.1 and EJB 2.1 beans. |
|
zero or one |
Specifies the principal (user) name in an enterprise bean that has the |
|
zero or one |
Specifies the connection factory associated with a message-driven bean. |
|
zero or one |
Specifies the durable subscription associated with a message-driven bean. |
|
zero or one |
Specifies the maximum number of messages to load into a Jakarta Messaging session at one time for a message-driven bean to serve. The default is 1. |
|
zero or one |
Specifies the security information for the IOR. |
|
zero or one |
Specifies that this entity bean is read-only. |
|
zero or one |
Specifies the rate at which a read-only-bean must be refreshed from the data source. |
|
zero or one |
Has valid values of B or C. Default value is B. |
|
zero or one |
Overrides the Transaction Timeout setting of the Transaction Service for an individual bean. |
|
zero or one |
Specifies the thread pool from which threads are selected for remote invocations of this bean. |
|
zero or one |
Specifies all the generated class names for a bean. |
|
zero or one |
Specifies the bean pool properties. Used for stateless session beans, entity beans, and message-driven beans. |
|
zero or one |
Specifies the bean cache properties. Used only for stateful session beans and entity beans. |
|
zero or one |
Specifies runtime configuration information for a message-driven bean. |
|
zero or more |
Specifies information about a web service endpoint. |
|
zero or one |
Specifies the methods that force a database flush after execution. Used for entity beans. |
|
zero or one |
Deprecated. Supported for backward compatibility. Use |
|
zero or one |
Specifies that the stateful session bean state is checkpointed, or persisted, after the specified methods are executed.
The |
|
zero or one |
Specifies the per-request load balancing behavior of EJB 2.x and 3.x remote client invocations on a stateless session bean. |
|
zero or one |
Used for clustered singletons. Defines whether the bean’s |
|
zero or one |
Defines whether the bean is treated as a clustered singleton. |
|
zero or one |
Used for clustered singletons. Defines whether the bean’s |
|
zero or one |
Used for clustered singletons. Defines the name of the key used for the replication mechanism of the bean across the Data Grid. |
|
zero or one |
Used for clustered singletons. Defines the type of distributed lock to be performed on the bean. |
Attributes
The following table describes attributes for the ejb
element.
Attribute | Default | Description |
---|---|---|
|
|
(optional) If set to |
Example
<ejb>
<ejb-name>CustomerEJB</ejb-name>
<jndi-name>customer</jndi-name>
<resource-ref>
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/__default</jndi-name>
</resource-ref>
<is-read-only-bean>false</is-read-only-bean>
<commit-option>B</commit-option>
<bean-pool>
<steady-pool-size>10</steady-pool-size>
<resize-quantity>10</resize-quantity>
<max-pool-size>100</max-pool-size>
<pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds>
</bean-pool>
<bean-cache>
<max-cache-size>100</max-cache-size>
<resize-quantity>10</resize-quantity>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
</bean-cache>
</ejb>
ejb-name
In the glassfish-ejb-jar.xml
file, matches the ejb-name
in the corresponding ejb-jar.xml
file. The name must be unique among the names of the enterprise beans in the same EJB JAR file.
There is no architected relationship between the ejb-name
in the deployment descriptor and the JNDI name that the deployer assigns to the EJB component’s home.
In the sun-cmp-mappings.xml
file, specifies the ejb-name
of the entity bean in the ejb-jar.xml
file to which the container-managed persistence (CMP) bean corresponds.
Superelements
ejb
, method
(glassfish-ejb-jar.xml
);
entity-mapping
(sun-cmp-mappings.xml
)
ejb-ref
Maps the ejb-ref-name
in the corresponding Jakarta EE deployment descriptor file ejb-ref
entry to the absolute jndi-name
of a resource.
The ejb-ref
element is used for the declaration of a reference to an EJB’s home. Applies to session beans or entity beans.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
ejb
(glassfish-ejb-jar.xml
),
glassfish-application-client
(glassfish-application-client.xml
)
Subelements
The following table describes subelements for the ejb-ref
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the |
|
only one |
Specifies the absolute |
ejb-ref-name
Specifies the ejb-ref-name
in the corresponding Jakarta EE deployment descriptor file ejb-ref
entry.
Superelements
ejb-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
eligible
Specifies whether the application client module is eligible to be Java
Web Start enabled. Allowed values are true
(the default) and false
.
Superelements
java-web-start-access
(glassfish-application-client.xml
)
enable-implicit-cdi
In a WAR file, it is possible to set the property bean-discovery-mode
equal to none
to turn off implicit scanning of the archive for bean defining annotations, as defined by the CDI 1.1 specification.
The default value of this setting is defined as annotated
in the specification, so the archive is scanned for any bean-defining annotations, which can cause unwanted side effects.
In the glassfish-application.xml
deployment descriptor for an EAR file, the property enable-implicit-cdi
can be set to false
to achieve the same goal for all modules inside the EAR assembly. The default value is true
, in line with the default value for WAR files.
If implicit CDI scanning causes problems for an EAR assembly, the value false
will disable implicit CDI scanning for all CDI modules inside the EAR assembly:
<glassfish-application>
<enable-implicit-cdi>false</enable-implicit-cdi>
</glassfish-application>
The default behavior of the admin console is for the Implicit CDI checkbox to be enabled, but this will not override the application configuration.
When implicit CDI is configured by using either the enable-implicit-cdi property in the glassfish-application.xml or the attribute bean-discovery-mode="none" from the beans.xml file in a WAR, the admin console checkbox is always ignored.
|
endpoint-address-uri
Specifies the relative path combined with the web server root to form the fully qualified endpoint address for a web service endpoint. This is a required element for EJB endpoints and an optional element for servlet endpoints.
For servlet endpoints, this value is relative to the web application context root. For EJB endpoints, the URI is relative to root of the web server (the first portion of the URI is a context root). The context root portion must not conflict with the context root of any web application deployed to the same web server.
In all cases, this value must be a fixed pattern (no "*' allowed).
If the web service endpoint is a servlet that implements only a single endpoint and has only one url-pattern
, it is not necessary to set this value, because the web container derives it from the web.xml
file.
Superelements
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
Subelements
none - contains data
Example
If the web server is listening at http://localhost:8080
, the following endpoint-address-uri
:
<endpoint-address-uri>StockQuoteService/StockQuotePort</endpoint-address-uri>
results in the following target endpoint address:
http://localhost:8080/StockQuoteService/StockQuotePort
enterprise-beans
Specifies all the runtime properties for an EJB JAR file in the application.
Superelements
glassfish-ejb-jar
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the enterprise-beans
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies the name string. |
|
zero or one |
Specifies a unique system identifier. This data is automatically generated and updated at deployment/redeployment. Do not specify or edit this value. |
|
zero or more |
Defines runtime properties for a single enterprise bean within the application. |
|
zero or one |
Deprecated. |
|
zero or one |
Specifies the database to be used for storing container-managed persistence (CMP) beans in an EJB JAR file. |
|
zero or more |
Specifies the name of a logical message destination. |
|
zero or more |
Specifies a name and optional publish location for a web service. |
|
zero or more |
Specifies a property or a variable. |
Example
<enterprise-beans>
<ejb>
<ejb-name>CustomerEJB</ejb-name>
<jndi-name>customer</jndi-name>
<resource-ref>
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/__default</jndi-name>
</resource-ref>
<is-read-only-bean>false</is-read-only-bean>
<commit-option>B</commit-option>
<bean-pool>
<steady-pool-size>10</steady-pool-size>
<resize-quantity>10</resize-quantity>
<max-pool-size>100</max-pool-size>
<pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds>
</bean-pool>
<bean-cache>
<max-cache-size>100</max-cache-size>
<resize-quantity>10</resize-quantity>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
</bean-cache>
</ejb>
</enterprise-beans>
Properties
The following table describes properties for the enterprise-beans
element.
Property | Default | Description |
---|---|---|
|
|
With this property, you can set whether to enable the default group to role mappings for your application’s security settings. This element is set up as a
Enabling the default group to role mappings will cause all named groups in the module’s linked security realm to be mapped to a role of the same name. This will save you the time of having to redefine the same roles and map them to the realm groups each time they are modified. |
entity-mapping
Specifies the mapping a bean to database columns.
Superelements
sun-cmp-mapping
(sun-cmp-mappings.xml
)
Subelements
The following table describes subelements for the entity-mapping
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the name of the entity bean in the |
|
only one |
Specifies the name of a database table. The table must be present in the database schema file. |
|
one or more |
Associates a field with one or more columns to which it maps. |
|
zero or more |
A container-managed relationship field has a name and one or more column pairs that define the relationship. |
|
zero or more |
Describes the relationship between a bean’s primary and secondary table. |
|
zero or one |
Specifies container behavior in guaranteeing transactional consistency of the data in the bean. |
establish-trust-in-client
Specifies if the target is capable of authenticating a client. The
values are NONE
, SUPPORTED
, or REQUIRED
.
Superelements
transport-config
(glassfish-ejb-jar.xml
)
establish-trust-in-target
Specifies if the target is capable of authenticating to a client. The
values are NONE
, SUPPORTED
, or REQUIRED
.
Superelements
transport-config
(glassfish-ejb-jar.xml
)
external-jndi-resource
Defines a resource that resides in an external JNDI repository. For example, a generic Java object could be stored in an LDAP server. An external JNDI factory must implement the javax.naming.spi.InitialContextFactory interface.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the
external-jndi-resource
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the
external-jndi-resource
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the JNDI name for the resource. |
|
none |
Specifies the JNDI lookup name for the resource. |
|
none |
Specifies the fully qualified type of the resource. |
|
none |
Specifies the fully qualified name of the factory class, which implements javax.naming.spi.InitialContextFactory . |
|
|
(optional) Defines the type of the resource. Allowed values are:
|
|
|
(optional) Determines whether this resource is enabled at runtime. |
fetched-with
Specifies the fetch group configuration for fields and relationships.
The fetched-with
element has different allowed and default subelements
based on its parent element and the data types of the fields.
-
If there is no
fetched-with
subelement of acmp-field-mapping
, and the data type is not BLOB, CLOB, VARBINARY, LONGVARBINARY, or OTHER,fetched-with
can have any valid subelement. The default subelement is as follows:
<fetched-with><default/></fetched-with>
-
If there is no
fetched-with
subelement of acmp-field-mapping
, and the data type is BLOB, CLOB, VARBINARY, LONGVARBINARY, or OTHER,fetched-with
can have any valid subelement except<default/>
. The default subelement is as follows:
<fetched-with><none/></fetched-with>
-
If there is no
fetched-with
subelement of acmr-field-mapping
,fetched-with
can have any valid subelement. The default subelement is as follows:
<fetched-with><none/></fetched-with>
Managed fields are multiple CMP or CMR fields that are mapped to the same column. A managed field can have any fetched-with
subelement except <default/>
.
For additional information, see "Managed Fields" in the Payara Server Application Development section.
Superelements
cmp-field-mapping
, cmr-field-mapping
(sun-cmp-mappings.xml
)
Subelements
The following table describes subelements for the fetched-with
element.
Element | Required | Description |
---|---|---|
exactly one subelement is required |
Specifies that a CMP field belongs to the default hierarchical fetch group, which means it is fetched any time the bean is loaded from a database. Enables prefetching of a CMR field. |
|
exactly one subelement is required |
Specifies the level number of a hierarchical fetch group. |
|
exactly one subelement is required |
Specifies the name of an independent fetch group. |
|
exactly one subelement is required |
Specifies that this field or relationship is placed into its own individual fetch group, which means it is loaded from a database the first time it is accessed in this transaction. |
field-name
Specifies the Java identifier of a field. This identifier must match the value of the field-name
subelement of the cmp-field
element in the ejb-jar.xml
file.
Superelements
cmp-field-mapping
(sun-cmp-mappings.xml
)
finder
Describes the finders for CMP 1.1 with a method name and query.
Superelements
one-one-finders
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the finder
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the method name for the finder. |
|
zero or one |
Specifies the query parameters for the CMP 1.1 finder. |
|
zero or one |
Specifies the query filter for the CMP 1.1 finder. |
|
zero or one |
Specifies variables in query expression for the CMP 1.1 finder. |
|
zero or one |
Specifies the query ordering for the CMP 1.1 finder. |
flush-at-end-of-method
Specifies the methods that force a database flush after execution. Applicable to entity beans.
Superelements
ejb
(glassfish-ejb-jar.xml
)
gen-classes
Specifies all the generated class names for a bean.
This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. |
Superelements
ejb
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the gen-classes
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies the fully-qualified class name of the generated |
|
zero or one |
Specifies the fully-qualified class name of the generated |
|
zero or one |
Specifies the fully-qualified class name of the generated |
|
zero or one |
Specifies the fully-qualified class name of the generated |
glassfish-application
Defines the Payara Server specific configuration for an application. This is the root element; there can only be one glassfish-application
element in a glassfish-application.xml
file. See The glassfish-application.xml File.
Subelements
The following table describes subelements for the glassfish-application
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies the application’s web tier configuration. |
|
zero or one |
Determines whether EJB modules use pass-by-value or pass-by-reference semantics. |
|
zero or one |
Contains the unique ID for the application. |
|
zero or more |
Maps a role in the corresponding Jakarta EE XML file to a user or group. |
|
zero or one |
Specifies an authentication realm. |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Specifies runtime settings for a web service reference. |
|
zero or more |
Specifies the name of a physical message destination. |
|
zero or more |
Specifies the name of a logical message destination. |
|
zero or one |
Specifies the name of the archive file. |
|
zero or one |
Specifies the Payara Server release with which to be backward compatible in terms of JAR visibility requirements for applications. |
|
zero or one |
Retains web sessions, stateful session bean instances, and persistently created EJB timers across redeployments. |
|
zero or one |
Contains version information for an application. |
|
zero or one |
Configures classloading delegation for the enterprise application. |
|
zero or one |
Enables implicit CDI bean scanning for the enterprise archive. |
|
zero or one |
Includes third party JAR files for CDI scanning using pattern matching. |
|
zero or one |
Excludes third party JAR files for CDI scanning using pattern matching. |
|
zero or one |
Marks packages to be whitelisted for extreme classloading isolation. |
Properties
The following table describes properties for the glassfish-application
element.
Property | Default | Description | ||
---|---|---|---|---|
|
|
With this property, you can set whether to enable the default group to role mappings for your application’s security settings. This element is set up as a
Enabling the default group to role mappings will cause all named groups in the application’s linked security realm to be mapped to a role of the same name. This will save you the time of having to redefine the same roles and map them to the realm groups each time they are modified. This will have the same effect as executing the following
Except its effect will only limit itself to the application instead of all applications deployed on the server.
|
glassfish-application-client
Defines the Payara Server specific configuration for an application client. This is the root element; there can only be one
glassfish-application-client
element in a glassfish-application-client.xml
file. See The glassfish-application-client.xml file.
Subelements
The following table describes subelements for the glassfish-application-client
element.
Element | Required | Description |
---|---|---|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Specifies runtime settings for a web service reference. |
|
zero or more |
Specifies the name of a physical message destination. |
|
zero or more |
Specifies the name of a logical message destination. |
|
zero or one |
Specifies changes to default Java Web Start parameters. |
|
zero or one |
Contains version information for an application client. |
glassfish-ejb-jar
Defines the Payara Server specific configuration for an EJB JAR file.
This is the root element; there can only be one glassfish-ejb-jar
element in a glassfish-ejb-jar.xml
file.
Subelements
The following table describes subelements for the glassfish-ejb-jar
element.
Element | Required | Description |
---|---|---|
zero or more |
Maps a role in the corresponding Jakarta EE XML file to a user or group. |
|
only one |
Describes all the runtime properties for an EJB JAR file in the application. |
|
zero or one |
Specifies the Payara Server release with which to be backward compatible in terms of JAR visibility requirements for applications. |
|
zero or one |
Disables Payara Server specific JNDI names. |
|
zero or one |
Retains stateful session bean instances and persistently created EJB timers across redeployments. |
|
zero or one |
Contains version information for an EJB module. |
|
zero or one |
Configures the default login module settings that will apply to all EJBs hosted in this archive. |
glassfish-web-app
or payara-web-app
Defines Payara Server specific configuration for a web module. This is the root element; there can only be one glassfish-web-app
element in a glassfish-web.xml
and payara-web.xml
file.
Subelements
The following table describes subelements for the glassfish-web-app
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains the web context root for the web module. |
|
zero or more |
Maps roles to users or groups in the currently active realm. |
|
zero or more |
Specifies a principal name for a servlet, which is used for the |
|
zero or more |
Specifies a URL pattern for idempotent requests. |
|
zero or one |
Specifies session manager, session cookie, and other session-related information. |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Maps the absolute JNDI name to the |
|
zero or more |
Specifies runtime settings for a web service reference. |
|
zero or more |
Specifies the name of a physical message destination. |
|
zero or one |
Configures caching for web application components. |
|
zero or one |
Specifies class loader configuration information. |
|
zero or one |
Specifies JSP configuration information. |
|
zero or one |
Deprecated. Use the |
|
zero or one |
Determines the default request character encoding and how the web container decodes parameters from forms according to a hidden field value. |
|
zero or more |
Specifies a property, which has a name and a value. |
|
zero or more |
Specifies a custom valve. |
|
zero or more |
Specifies the name of a logical message destination. |
|
zero or more |
Specifies a name and optional publish location for a web service. |
|
zero or one |
Retains web sessions across redeployments. |
|
zero or one |
Contains version information for a web application. |
|
zero or one |
Configures classloading delegation for the web application. |
|
zero or one |
Configures out of the box support for the |
|
zero or one |
Includes third party JAR files for CDI scanning using pattern matching. |
|
zero or one |
Excludes third party JAR files for CDI scanning using pattern matching. |
|
zero or one |
Marks packages to be whitelisted for extreme classloading isolation. |
Attributes
The following table describes attributes for the glassfish-web-app
element.
Attribute | Default | Description |
---|---|---|
|
(blank) |
(optional) Not implemented. Do not use. |
|
none |
(optional) Specifies the |
Properties
The following table describes properties for the glassfish-web-app
element.
Property | Default | Description | ||
---|---|---|---|---|
|
|
If
|
||
|
none |
Specifies an alternate document root (docroot), where n is a positive integer that allows specification of more than one. Alternate docroots allow web applications to serve requests for certain resources from outside their own docroot, based on whether those requests match one (or more) of the URI patterns of the web application’s alternate docroots. If a request matches an alternate docroot’s URI pattern, it is mapped to the alternate docroot by appending the request URI (minus the web application’s context root) to the alternate docroot’s physical location (directory). If a request matches multiple URI patterns, the alternate docroot is determined according to the following precedence order:
For example, the following properties specify three alternate docroots. The URI pattern of the first alternate docroot uses an exact match, whereas the URI patterns of the second and third alternate docroots use extension and longest path prefix matches, respectively.
The You can set this property for all the web applications on a specific virtual server. For details, see |
||
|
none |
This property is deprecated. Use the Specifies a fully qualified class name of a custom valve, where n is a positive integer that allows specification of more than one. The valve class must implement the org.apache.catalina.Valve interface from Tomcat or previous Payara Server releases, or the org.glassfish.web.valve.GlassFishValve interface from the current Payara Server release. For example:
You can set this property for all the web applications on a specific
virtual server. For details, see |
||
|
none |
Specifies a fully qualified class name of a custom Catalina listener, where n is a positive integer that allows specification of more than one. The listener class must implement the org.apache.catalina.ContainerListener, org.apache.catalina.LifecycleListener, or org.apache.catalina.InstanceListener interface. For example:
You can set this property for all the web applications on a specific
virtual server. For details, see |
||
|
|
If |
||
|
|
If |
||
|
|
If |
||
|
|
Set this property to You can set this property for all the web applications on a specific
virtual server. For details, see |
||
|
|
Specifies the maximum number of servlet instances allocated for each |
||
|
or
|
Specifies a temporary directory for use by this web module. This value
is used to construct the value of the |
||
|
|
If |
||
|
|
With this property, you can set whether to enable the default group to role mappings for your application’s security settings. This element is set up as a
Enabling the default group to role mappings will cause all named groups in the application’s linked security realm to be mapped to a role of the same name. This will save you the time of having to redefine the same roles and map them to the realm groups each time they are modified. |
||
|
|
This property configures whether to enable or disable the calling of For performance considerations, you can explicitly disable the servlet container initializer by setting the This can help solve the deployment of web applications that can suffer from conflicts with a custom bootstrapping process. |
group-map
Maps an EIS group to a group defined in the Payara Server domain.
Superelements
work-security-map
(glassfish-resources.xml
and payara-resources.xml
)
group-name
Specifies a group name in the current realm.
Superelements
security-role-mapping
(glassfish-application.xml
, glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
Superelements
cache-mapping
(glassfish-web.xml
and payara-web.xml
)
idempotent-url-pattern
Specifies a URL pattern for idempotent requests.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Attributes
The following table describes attributes for the idempotent-url-pattern
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies a URL pattern, which can contain wildcards. The URL pattern must conform to the mappings specified in section 12.2 of the Servlet 6.0 specification. |
|
|
(optional) Specifies the number of times the load balancer retries an idempotent request. A value of |
integrity
Specifies if the target supports integrity-protected messages. The values are NONE
, SUPPORTED
, or REQUIRED
.
Superelements
transport-config
(glassfish-ejb-jar.xml
)
ior-security-config
Specifies the security information for the interoperable object reference (IOR).
Superelements
ejb
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the ior-security-config
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies the security information for transport. |
|
zero or one |
Specifies the authentication mechanism used to authenticate the client. If specified, it is |
|
zero or one |
Describes the sas-context fields. |
is-cache-overflow-allowed
This element is deprecated. Do not use.
Superelements
bean-cache
(glassfish-ejb-jar.xml
)
java-method
Specifies a method.
Superelements
message
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
java-web-start-access
Specifies changes to default Java Web Start parameters for an embedded or stand-alone application client module.
Superelements
glassfish-application-client
(glassfish-application-client.xml
)
Subelements
The following table describes subelements for the java-web-start-access
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains the context root for the Java Web Start enabled application client module. If none is specified, a default is generated. The default for a web module is as follows:
The default for a stand-alone application client module is as follows:
If the |
|
zero or one |
Specifies whether the application client module is eligible to be Java Web Start enabled. Allowed values are |
|
zero or one |
Specifies the name of the vendor as it appears in Java Web Start download and launch screens. The default value is |
|
zero or one |
Specifies the name of a custom JNLP file. If none is specified, a default JNLP file is generated. |
jaxrs-roles-allowed-enabled
The Payara Platform both support using the @RolesAllowed
annotation out of the box to secure JAX-RS resources. In some cases this may clash with existing code that interprets the same annotation using custom code.
The out-of-the-box support of @RolesAllowed
for JAX-RS resources can be switched off by setting the <jaxrs-roles-allowed-enabled>
element like this:
<jaxrs-roles-allowed-enabled>false</jaxrs-roles-allowed-enabled>
Superelements
glassfish-web-app or payara-web-app
(glassfish-web-app.xml
)
jdbc-connection-pool
Defines the attributes and properties that are required for creating a JDBC connection pool.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the jdbc-connection-pool
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the jdbc-connection-pool
element.
Changing the following attributes requires a server restart or the redeployment or disabling and re-enabling of applications that refer to the resource: datasource-classname
, associate-with-thread
, lazy-connection-association
, and lazy-connection-enlistment
.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the name of the connection pool. A |
|
none |
(optional) Specifies the class name of the associated vendor-supplied data source. This class must implement javax.sql.DataSource, javax.sql.XADataSource, javax.sql.ConnectionPoolDatasource , or a combination. |
|
none |
(optional) Specifies the interface the data source class implements.
The value of this attribute can be javax.sql.DataSource, javax.sql.XADataSource , javax.sql.ConnectionPoolDatasource , or java.sql.Driver.
To support configuration of JDBC drivers and applications that use java.sql.Driver implementations, set this attribute to java.sql.Driver.
This attribute must be specified to avoid ambiguity when a data source class implements two or more of these interfaces or when a |
|
none |
(optional) Specifies the vendor-supplied JDBC driver class name. This driver must implement the java.sql.Driver interface. |
|
|
(optional) Specifies whether to ping the pool during pool creation or reconfiguration to identify and warn of any erroneous attribute values. |
|
|
(optional) Specifies the initial and minimum number of connections maintained in the pool. |
|
|
(optional) Specifies the maximum number of connections that can be created to satisfy client requests. |
|
|
(optional) Specifies the amount of time, in milliseconds, that the caller is willing to wait for a connection. If |
|
|
(optional) Specifies the number of idle connections to be destroyed if the existing number of connections is above the This is enforced periodically at the |
|
|
(optional) Specifies the maximum time that a connection can remain idle in the pool. After this amount of time, the pool can close this connection. This timeout value must be kept shorter than the server side (database) timeout value to prevent the accumulation of unusable connections in the application. |
|
default JDBC driver isolation level |
(optional) Specifies the transaction isolation level on the pooled database connections.
Allowed values are Applications that change the isolation level on a pooled connection programmatically risk polluting the pool, which can lead to errors. See |
|
|
(optional) Applicable only when |
|
|
(optional) Specifies whether connections have to be validated before being given to the application. If a resource’s validation fails, it is destroyed, and a new resource is created and returned. |
|
|
(optional) Legal values are as follows:
Because many JDBC drivers cache the results of The |
|
none |
(optional) Specifies the table name to be used to perform a query to validate a connection. This parameter is mandatory if and only if |
|
none |
(optional) Specifies the custom validation implementation class name. This parameter is mandatory if Payara Server provides the following custom validation class templates for MSSQL, DB2, and Sybase databases. All of them implement the org.glassfish.api.jdbc.ConnectionValidation interface.
|
|
none |
(optional) Specifies an SQL string to be executed whenever a connection is created (not reused) in the pool. This initializes the state of the connection. |
|
|
(optional) If |
|
|
(optional) If |
|
|
(optional) If |
|
|
(optional) Specifies the time interval within which a connection is validated at most once. Minimizes the number of validation calls. A value of zero implies that Payara Server does not attempt to minimize the number of validation requests by a connection. That is, a value of zero disables this attribute. As a result, the same connection is validated every time the application acquires the connection. |
|
|
(optional) Detects potential connection leaks by the application. A connection that is not returned back to the pool by the application within the specified period is assumed to be potentially leaking, and a stack trace of the caller is logged. A zero value disables leak detection. A nonzero value enables leak tracing. Use this attribute along with |
|
|
(optional) If |
|
|
(optional) Specifies the number of attempts to create a new connection in case of a failure. |
|
|
(optional) Specifies the time interval between attempts to create a connection when |
|
|
(optional) Detects potential statement leaks by the application. A statement that is not closed by the application within the specified period is assumed to be potentially leaking, and a stack trace of the caller is logged. A zero value disables leak detection. A nonzero value enables leak tracing. Use this attribute along with |
|
|
(optional) If |
|
|
(optional) Sets the query timeout property of a statement to enable termination of abnormally long running queries. The default value of An abnormally long running JDBC query executed by an application may leave it in a hanging state unless a timeout is explicitly set on the statement.
This attribute guarantees that all queries automatically time out if not completed within the specified period. When statements are created, the |
|
|
(optional) If |
|
|
(optional) If |
|
|
(optional) Specifies whether connections are associated with the thread to enable the thread to reuse the connections. If This attribute associates connections with a thread such that when the same thread is in need of connections, it can reuse the connections already associated with that thread. In this case, the overhead of getting connections from the pool is avoided.
However, when this value is set to |
|
|
(optional) Specifies whether a connection that is selected from the pool should be matched with the connections with certain credentials. If If the connection pool is used by applications that have multiple user credentials, |
|
|
(optional) Specifies the number of times a connections is reused by the pool, after which it is closed. A zero value disables this feature. By limiting the maximum number of times a connection can be reused, you can avoid statement leaks if the application does not close statements. |
|
none |
(optional) Specifies that SQL statements executed by applications need to be traced. Helps administrators analyze the statements. Expects as a value a comma-separated list of listener implementation class names. Enables easy filtering of log messages for the SQL statements. SQL trace listeners must implement the org.glassfish.api.jdbc.SQLTraceListener interface. |
|
|
(optional) Specifies the number of statements to be cached using the |
|
|
(optional) If |
|
|
(optional) If This option ensures that |
Payara Server Properties
The following table describes properties for the jdbc-connection-pool
element that are specific to Payara Server.
Property | Default | Description |
---|---|---|
|
none |
Specifies the timeout for dynamic reconfiguration of the pool.
In-progress connection requests must complete before this timeout expires or they must be retried. New connection requests wait for this
timeout to expire before acquiring connections to the reconfigured pool.
If this property exists and has a positive value, it is enabled. If this property is not set and pool reconfiguration results in pool recreation, in-progress connection requests must be retried. |
|
|
Specifies the number of most frequently used queries to display. For example, the default value of This property is disabled when |
|
|
Specifies the time to retain queries in a cache before they are purged. This property is disabled when |
Database Properties
Most JDBC drivers allow use of standard property lists to specify the user, password, and other resource configuration information. Although properties are optional with respect to the Payara Server, some properties might be necessary for most databases. For details, see the JDBC 4.0 Standard Extension API.
When properties are specified, they are passed to the vendor’s data source class (specified by the datasource-classname
attribute) as is using setName(value) methods.
The user
and password
properties are used as the default principal if container managed authentication is specified and a default-resource-principal
is not found in the application deployment descriptors.
The following table describes some common properties for the jdbc-connection-pool
element.
Changing JDBC driver properties requires a server restart.
Property | Description |
---|---|
|
Specifies the user name for connecting to the database. |
|
Specifies the password for connecting to the database. |
|
Specifies the database for this connection pool. |
|
Specifies the database server for this connection pool. |
|
Specifies the port on which the database server listens for requests. |
|
Specifies the communication protocol. |
|
Specifies the initial SQL role name. |
|
Specifies an underlying XADataSource, or a ConnectionPoolDataSource if connection pooling is done. |
|
Specifies a text description. |
|
Specifies the URL for this connection pool. Although this is not a standard property, it is commonly used. |
jdbc-resource
Defines a JDBC (javax.sql.DataSource) resource.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the jdbc-resource
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the jdbc-resource
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the JNDI name for the resource. |
|
none |
(optional) Specifies a text description of this element. |
|
none |
Specifies the |
|
|
(optional) Defines the type of the resource. Allowed values are:
|
|
|
(optional) Determines whether this resource is enabled at runtime. |
jms-durable-subscription-name
Specifies the durable subscription associated with a message-driven bean class. Only applies to the Jakarta Messaging Topic Destination type, and only when the message-driven bean deployment descriptor subscription durability is Durable.
Superelements
ejb
(glassfish-ejb-jar.xml
)
jms-max-messages-load
Specifies the maximum number of messages to load into a Jakarta Messaging session at one time for a message-driven bean to serve. The default is 1.
Superelements
ejb
(glassfish-ejb-jar.xml
)
jndi-name
Specifies the absolute jndi-name
of a URL resource or a resource.
For entity beans and session beans, this value specifies the global JNDI name of the EJBHome
object. It is only needed if the entity or session bean exposes a remote view.
For JMS message-driven beans, this is the JNDI name of the JMS resource from which the message-driven bean consumes JMS messages.
This information is alternatively specified within the activation-config
subelement of the mdb-resource-adapter
element.
For more information about JMS resources, see "Using the Jakarta Messaging" in the Payara Server Application Development section.
Superelements
ejb-ref
, message-destination
,
resource-env-ref
, resource-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
,
glassfish-application-client.xml
); cmp-resource
, ejb
, mdb-connection-factory
(glassfish-ejb-jar.xml
)
jnlp-doc
Contains the name of a custom JNLP file, which modifies the behavior of a Java Web Start enabled application client module. If none is specified, a default JNLP file is generated.
The value of this element is a relative path with the following format:
[path-to-JAR-in-EAR!]path-to-JNLP-in-JAR
The default path-to-JAR-in-EAR is the current application client JAR file. For example, if the JNLP file is in the application client JAR file at custom/myInfo.jnlp
, the element value would look like this:
<java-web-start-access>
<jnlp-doc>custom/myInfo.jnlp</jnlp-doc>
</java-web-start-access>
If the application client is inside an EAR file, you can place the custom JNLP file inside another JAR file in the EAR.
For example, if the JNLP file is in a JAR file at other/myLib.jar
, the element value would look like this, with an exclamation point (!
) separating the path to the JAR from the path in the JAR:
<java-web-start-access>
<jnlp-doc>other/myLib.jar!custom/myInfo.jnlp</jnlp-doc>
</java-web-start-access>
For information about the allowed contents of a custom JNLP file, see "Developing Java Clients" in the Payara Server Application Development section.
Superelements
java-web-start-access
(glassfish-application-client.xml
)
jsp-config
Specifies JSP configuration information.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the jsp-config
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Properties
The default property values are tuned for development of JSP files at the cost of performance. To maximize performance, set jsp-config
properties to these non-default values:
-
development
-false
(as an alternative, set totrue
and givemodificationTestInterval
a large value) -
mappedfile
-false
-
trimSpaces
-true
-
suppressSmap
-true
-
fork
-false
(on Solaris) -
classdebuginfo
-false
The following table describes properties for the jsp-config
element.
Property | Default | Description |
---|---|---|
|
|
If |
|
|
Specifies whether the generated Java servlets are compiled with the debug option set ( |
|
created dynamically based on the current web application |
Specifies the classpath to use when compiling generated servlets. |
|
|
Specifies the compiler Ant uses to compile JSP files. See the Ant documentation for more information: https://ant.apache.org/manual/index.html |
|
Depends on Payara Server’s Java runtime |
Specifies the JDK release with which source compatibility of the generated servlets is provided. Same as the |
|
Depends on Payara Server’s Java runtime |
Specifies the Virtual Machine for the Java platform (JVM software) version for which the servlet class files are generated. Same as the |
|
|
If |
|
|
If set to |
|
|
If set to |
|
|
If set to |
|
|
If set to |
|
|
If set to |
|
|
Specifies that Ant forks the compiling of JSP files, using a JVM machine separate from the one in which Tomcat is running. |
|
|
If |
|
|
If set to |
|
|
Specifies a comma separated list of HTTP methods supported by the |
|
|
Specifies the Java plug-in COM class ID for Internet Explorer. Used by the |
|
|
If set to |
|
|
Specifies the initial capacity of the |
|
|
Specifies the encoding for the generated Java servlet. This encoding is passed to the Java compiler that is used to compile the servlet as well. By default, the web container tries to use |
|
|
If set to |
|
|
If set to |
|
|
Specifies the frequency in seconds at which JSPs are checked for modification. A value of |
|
|
Specifies the frequency in seconds at which JSP files are checked for modifications.
Setting this value to |
|
|
If |
|
The default work directory for the web application |
Specifies the working directory created for storing all the generated code. |
|
|
If set to |
|
|
If set to |
|
|
If set to It is assumed that JSP files have been precompiled, and their corresponding servlet classes have been bundled in the web application’s |
|
|
If set to |
The default value of the compiler property for this element has changed from 1.5 to 1.8, denoting a change from JDK5 to JDK8.
You can change this to another value by editing the jsp-config element in the glassfish-web.xml file.
keep-state
If set to true
, retains web sessions, stateful session bean instances, and persistently created EJB timers across redeployments. The --keepstate
option of the redeploy
subcommand takes precedence. The default for both is false
.
Some changes to an application between redeployments prevent this feature from working properly. For example, do not change the set of instance variables in the SFSB bean class.
For web applications, this feature is applicable only if in the glassfish-web-app.xml
file the persistence-type
attribute of the session-manager
element is file
.
For stateful session bean instances, the persistence type without high availability is set in the server (the sfsb-persistence-type
attribute) and must be set to file
, which is the default and recommended value.
If any active web session, SFSB instance, or EJB timer fails to be preserved or restored, none of these will be available when the redeployment is complete. However, the redeployment continues and a warning is logged.
To preserve active state data, Payara Server serializes the data and saves it in memory. To restore the data, the class loader of the newly redeployed application deserializes the data that was previously saved.
Superelements
glassfish-application
(glassfish-application.xml
),
glassfish-web-app
(glassfish-web-app.xml
),
glassfish-ejb-jar
(glassfish-ejb-jar.xml
)
key-field
Specifies a component of the key used to look up and extract cache entries. The web container looks for the named parameter, or field, in the specified scope.
If this element is not present, the web container uses the Servlet Path (the path section that corresponds to the servlet mapping that activated the current request). See the Servlet 6.0 specification, section 3.6, for details on the Servlet Path.
Superelements
cache-mapping
(glassfish-web.xml
and payara-web.xml
)
Attributes
The following table describes attributes for the key-field
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the input parameter name. |
|
|
(optional) Specifies the scope from which the input parameter is retrieved. Allowed values are |
level
Specifies the name of a hierarchical fetch group. The name must be an integer. Fields and relationships that belong to a hierarchical fetch group of equal (or lesser) value are fetched at the same time. The value of level must be greater than zero. Only one is allowed.
Superelements
fetched-with
(sun-cmp-mappings.xml
)
local-home-impl
Specifies the fully-qualified class name of the generated EJBLocalHome
impl
class.
This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. |
Superelements
gen-classes
(glassfish-ejb-jar.xml
)
local-impl
Specifies the fully-qualified class name of the generated EJBLocalObject
impl
class.
This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. |
Superelements
gen-classes
(glassfish-ejb-jar.xml
)
locale-charset-info
Deprecated. For backward compatibility only. Use the parameter-encoding
subelement of
glassfish-web-app
instead. Specifies information about the application’s internationalization settings.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the locale-charset-info
element.
Element | Required | Description |
---|---|---|
one or more |
Maps a locale and an agent to a character encoding. Provided for backward compatibility. Used only for request processing, and only if no |
|
zero or one |
Determines the default request character encoding and how the web container decodes parameters from forms according to a hidden field value. |
Attributes
The following table describes attributes for the locale-charset-info
element.
Attribute | Default | Description |
---|---|---|
|
none |
Although a value is required, the value is ignored. Use the |
locale-charset-map
Maps locales and agents to character encodings. Provided for backward compatibility.
Used only for request processing. Used only if the character encoding is not specified in the request and cannot be derived from the optional parameter-encoding
element.
For encodings, see https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
.
Superelements
locale-charset-info
(glassfish-web.xml
and payara-web.xml
)
Attributes
The following table describes attributes for the locale-charset-map
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the locale name. |
|
none |
(optional) Specifies the type of client that interacts with the Payara Server. For a given locale, different agents can have different preferred character encodings.
The value of this attribute must exactly match the value of the |
|
none |
Specifies the character encoding to which the locale maps. |
Example Agents
The following table specifies example agent
attribute values.
Agent | user-agent Header and agent Attribute Value |
Internet Explorer 5.00 for Windows 2000 |
---|---|---|
|
Netscape 4.7.7 for Windows 2000 |
|
localpart
Specifies the local part of a QNAME.
Superelements
service-qname
,wsdl-port
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
lock-when-loaded
Places a database update lock on the rows corresponding to the bean whenever the bean is loaded. How the lock is placed is database-dependent. The lock is released when the transaction finishes (commit or rollback). While the lock is in place, other database users have read access to the bean.
Superelements
consistency
(sun-cmp-mappings.xml
)
lock-when-modified
This element is not implemented. Do not use.
Superelements
consistency
(sun-cmp-mappings.xml
)
log-service
Specifies configuration settings for the log file.
Superelements
client-container
(sun-acc.xml
)
Subelements
The following table describes subelements for the log-service
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Attributes
The following table describes attributes for the log-service
element.
Attribute | Default | Description |
---|---|---|
|
|
(optional) Specifies the file where the application client container logging information is stored. |
|
|
(optional) Sets the base level of severity. Messages at or above this setting get logged to the log file. |
login-config
Specifies the authentication configuration for an EJB web service endpoint. Not needed for servlet web service endpoints. A servlet’s security configuration is contained in the web.xml
file.
Superelements
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
mail-resource
Defines a Jakarta Mail (jakarta.mail.Session
) resource.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the mail-resource
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the mail-resource
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the JNDI name for the resource. |
|
|
(optional) Specifies the storage protocol service, which connects to a mail server, retrieves messages, and saves messages in folder(s). Allowed values are |
|
|
(optional) Specifies the service provider implementation class for storage. Allowed values are:
|
|
|
(optional) Specifies the transport protocol service, which sends messages. Allowed values are |
|
|
(optional) Specifies the service provider implementation class for transport. Allowed values are:
|
|
none |
The mail server host name. |
|
none |
The mail server username. |
|
none |
The email address the mail server uses to indicate the message sender. |
|
|
(optional) Determines whether debugging for this resource is enabled. |
|
|
(optional) Defines the type of the resource. Allowed values are:
|
|
|
(optional) Determines whether this resource is enabled at runtime. |
Properties
You can set properties for the mail-resource
element and then get these properties in a Jakarta Mail Session
object later. Every property name must start with a mail-
prefix.
The Payara Server changes the dash (-
) character to a period (.
) in the name of the property, then saves the property to the MailConfiguration
and Jakarta Mail Session
objects. If the name of the property doesn’t start with mail-
, the property is ignored.
For example, to define the property mail.password
in a Jakarta Mail Session object, first edit glassfish-resources.xml
and payara-resources.xml
as follows:
<mail-resource jndi-name="mail/Session">
<property name="mail-password" value="adminadmin"/>
<property name="mail-password" value="adminadmin"/>
</mail-resource>
After getting the Jakarta Mail Session
object, get the mail.password
property to retrieve the value adminadmin
, as follows:
public class Component{
public void businessMethod(){
var password = session.getProperty("mail.password");
}
}
For more information about Jakarta Mail properties, see Jakarta Mail API Documentation (https://jakarta.ee/specifications/mail
).
manager-properties
Specifies session manager properties.
Superelements
session-manager
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the manager-properties
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Properties
The following table describes properties for the manager-properties
element.
Property | Default | Description |
---|---|---|
|
|
Specifies the number of seconds between checks for expired sessions.
This is also the interval at which sessions are passivated if If To prevent data inconsistency, set this value lower than the frequency at which session data changes.
For example, this value should be as low as possible ( Applicable only if the |
|
|
Specifies the maximum number of sessions that are permitted in the cache, or If the |
|
empty string |
Specifies the absolute or relative path to the directory in which the session state is preserved between application restarts, if preserving the state is possible. A relative path is relative to the temporary directory for this web module, one of the following:
By default, this property’s value is set to an empty string, which disables this property and does not preserve the session state. Applicable only if the |
|
|
Specifies how often the session state is stored. Allowed values are as follows:
|
mapping-properties
This element is not implemented.
Superelements
cmp
(glassfish-ejb-jar.xml
)
max-cache-size
Specifies the maximum number of beans allowable in cache. A value of zero indicates an unbounded cache. In reality, there is no hard limit. The max-cache-size limit is just a hint to the cache implementation. Default is 512.
Applies to stateful session beans and entity beans.
Superelements
bean-cache
(glassfish-ejb-jar.xml
)
max-pool-size
Specifies the maximum number of bean instances in the pool. Values are from 0 (1 for message-driven bean) to MAX_INTEGER. A value of 0 means the pool is unbounded. Default is 64.
Applies to all beans.
Superelements
bean-pool
(glassfish-ejb-jar.xml
)
max-wait-time-in-millis
This element controls what to do when the number of requests exceeds the amount of beans available in the pool.
Applies to all beans.
Possible values of this element include:
-
-1
(default)When the pooled number is exceeded, a new EJB instance is created, there is no upper bound in place.
-
0
When the pooled number is exceeded, the request will wait for a bean to free up in the pool. This effectively caps the number of threads that are concurrently created for the bean’s client request.
-
Between
1
-MAX_INTEGER
When the pool number is exceeded, the request will wait for a bean to free up in the pool, up to the number of milliseconds specified here.
After this time has expired, a new EJB instance is created and dispatched, thus the configured pool size acts as a soft upper bound, one that can be exceeded once the timer has expired.
Superelements
bean-pool
(glassfish-ejb-jar.xml
)
mdb-connection-factory
Specifies the connection factory associated with a message-driven bean. Queue or Topic type must be consistent with the Jakarta Messaging Destination type associated with the message-driven bean class.
Superelements
ejb
(glassfish-ejb-jar.xml
)
mdb-resource-adapter
Specifies runtime configuration information for a message-driven bean.
Superelements
ejb
(glassfish-ejb-jar.xml
)
message
Specifies the methods or operations to which message security requirements apply.
Superelements
message-security
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
Subelements
The following table describes subelements for the message
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies the methods or operations to which message security requirements apply. |
|
zero or one |
Specifies the WSDL name of an operation of a web service. |
message-destination
Specifies the name of a logical message-destination
defined within an application.
The message-destination-name
matches the corresponding message-destination-name
in the corresponding Jakarta EE deployment descriptor file.
Use when the message destination reference in the corresponding Jakarta EE deployment descriptor file specifies a message-destination-link
to a logical message-destination
.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
enterprise-beans
(glassfish-ejb-jar.xml
),
glassfish-application-client
(glassfish-application-client.xml
)
Subelements
The following table describes subelements for the message-destination
element.
Element | Required | Description a |
---|---|---|
only one |
Specifies the name of a logical message destination defined within the corresponding Jakarta EE deployment descriptor file. |
|
only one |
Specifies the |
message-destination-name
Specifies the name of a logical message destination defined within the corresponding Jakarta EE deployment descriptor file.
Superelements
message-destination
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
message-destination-ref
Directly binds a message destination reference to the JNDI name of a Queue
, Topic
, or other physical destination.
Use only when the message destination reference in the corresponding Jakarta EE deployment descriptor file does not specify a message-destination-link
to a logical message-destination
.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
ejb
(glassfish-ejb-jar.xml
),
glassfish-application-client
(glassfish-application-client.xml
)
Subelements
The following table describes subelements for the message-destination-ref
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the name of a physical message destination defined within the corresponding Jakarta EE deployment descriptor file. |
|
only one |
Specifies the |
message-destination-ref-name
Specifies the name of a physical message destination defined within the corresponding Jakarta EE deployment descriptor file.
Superelements
message-destination-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
message-security
Specifies message security requirements.
-
If the grandparent element is
webservice-endpoint
, these requirements pertain to request and response messages of the endpoint. -
If the grandparent element is
port-info
, these requirements pertain to the port of the referenced service.
Superelements
message-security-binding
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
Subelements
The following table describes subelements for the message-security
element.
Element | Required | Description |
---|---|---|
one or more |
Specifies the methods or operations to which message security requirements apply. |
|
zero or one |
Defines the authentication policy requirements of the application’s request processing. |
|
zero or one |
Defines the authentication policy requirements of the application’s response processing. |
message-security-binding
Specifies a custom authentication provider binding for a parent webservice-endpoint
or port-info
element in one or both of these ways:
-
By binding to a specific provider
-
By specifying the message security requirements enforced by the provider
Superelements
webservice-endpoint
, port-info
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
Subelements
The following table describes subelements for the message-security-binding
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies message security requirements. |
Attributes
The following table describes attributes for the message-security-binding
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the message layer at which authentication is performed. The value must be |
|
none |
(optional) Specifies the authentication provider used to satisfy application-specific message security requirements. If this attribute is not specified, a default provider is used, if it is defined for the message layer. If no default provider is defined, authentication requirements defined in the |
message-security-config
Specifies configurations for message security providers.
Superelements
client-container
(sun-acc.xml
)
Subelements
The following table describes subelements for the message-security-config
element.
Element | Required | Description |
---|---|---|
one or more |
Specifies a configuration for one message security provider. |
Attributes
The following table describes attributes for the message-security-config
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the message layer at which authentication is performed. The value must be |
|
none |
(optional) Specifies the server provider that is invoked for any application not bound to a specific server provider. |
|
none |
(optional) Specifies the client provider that is invoked for any application not bound to a specific client provider. |
method
Specifies a bean method.
Superelements
checkpoint-at-end-of-method
,
flush-at-end-of-method
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the method
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies an optional text description. |
|
zero or one |
Matches the |
|
only one |
Specifies a method name. |
|
zero or one |
Specifies the method interface to distinguish between methods with the same name in different interfaces. |
|
zero or one |
Specifies fully qualified Java type names of method parameters. |
method-intf
Specifies the method interface to distinguish between methods with the same name in different interfaces. Allowed values are Home
, Remote
, LocalHome
, and Local
.
Superelements
method
(glassfish-ejb-jar.xml
)
method-name
Specifies a method name or *
(an asterisk) for all methods. If a method is overloaded, specifies all methods with the same name.
Superelements
java-method
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
); finder
, query-method
, method
(glassfish-ejb-jar.xml
)
method-param
Specifies the fully qualified Java type name of a method parameter.
Superelements
method-params
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
method-params
Specifies fully qualified Java type names of method parameters.
Superelements
java-method
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
);
query-method
, method
(glassfish-ejb-jar.xml
)
name
Specifies the name of the entity.
Superelements
call-property
, default-resource-principal
, stub-property
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
); enterprise-beans
, principal
, property
(with subelements) (glassfish-ejb-jar.xml
)
named-group
Specifies the name of one independent fetch group. All the fields and relationships that are part of a named group are fetched at the same time. A field belongs to only one fetch group, regardless of what type of fetch group is used.
Superelements
fetched-with
(sun-cmp-mappings.xml
)
namespaceURI
Specifies the namespace URI.
Superelements
service-qname
, wsdl-port
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
none
Specifies that this field or relationship is fetched by itself, with no other fields or relationships.
Superelements
consistency
, fetched-with
(sun-cmp-mappings.xml
)
one-one-finders
Describes the finders for CMP 1.1 beans.
Superelements
cmp
(glassfish-ejb-jar.xml
)
operation-name
Specifies the WSDL name of an operation of a web service.
Superelements
message
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
parameter-encoding
Specifies the default request character encoding and how the web container decodes parameters from forms according to a hidden field value.
If both the glassfish-web-app
and locale-charset-info
elements have parameter-encoding
subelements, the subelement of glassfish-web-app
takes precedence.
For encodings, see https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
.
Superelements
locale-charset-info
, glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Attributes
The following table describes attributes for the parameter-encoding
element.
Attribute | Default | Description |
---|---|---|
|
none |
(optional) The name of the hidden field in the form. This field specifies the character encoding the web container uses for |
|
|
(optional) The default request character encoding. |
pass-by-reference
Specifies the passing method used by a servlet or enterprise bean calling a remote interface method in another bean that is colocated within the same process.
-
If
false
(the default if this element is not present), this application uses pass-by-value semantics. -
If
true
, this application uses pass-by-reference semantics.
The pass-by-reference element only applies to remote calls. As defined in the Jakarta Enterprise Beans 4.0 specification, section 3.2.3, calls to local interfaces use pass-by-reference semantics. |
If the pass-by-reference
element is set to its default value of false
, the passing semantics for calls to remote interfaces comply with the Jakarta Enterprise Beans 4.0 specification, section 3.2.3.
If set to true
, remote calls involve pass-by-reference semantics instead of pass-by-value semantics, contrary to this specification.
Portable programs cannot assume that a copy of the object is made during such a call, and thus that it’s safe to modify the original.
Nor can they assume that a copy is not made, and thus that changes to the object are visible to both caller and callee. When this element is set to true
, parameters and return values should be considered read-only.
The behavior of a program that modifies such parameters or return values is undefined.
When a servlet or enterprise bean calls a remote interface method in another bean that is colocated within the same process, by default Payara Server makes copies of all the call parameters in order to preserve the pass-by-value semantics. This increases the call overhead and decreases performance.
However, if the calling method does not change the object being passed as a parameter, it is safe to pass the object itself without making a copy of it. To do this, set the pass-by-reference value to true
.
The setting of this element in the glassfish-application.xml
file applies to all EJB modules in the application. For an individually deployed EJB module, you can set the same element in the glassfish-ejb-jar.xml
file.
If pass-by-reference
is used at both the bean and application level, the bean level takes precedence.
Superelements
glassfish-application
(payara-application.xml
),
ejb
(glassfish-ejb-jar.xml
)
password
Specifies the password for the principal.
Superelements
default-resource-principal
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
per-request-load-balancing
Specifies the per-request load balancing behavior of EJB 2.x and 3.x remote client invocations on a stateless session bean. If set to true
, per-request load balancing is enabled for the associated stateless session bean.
If set to false
or not set, per-request load balancing is not enabled. The default is false
.
Superelements
ejb
(glassfish-ejb-jar.xml
)
pm-descriptors
This element and its subelements are deprecated. Do not use.
Superelements
enterprise-beans
(glassfish-ejb-jar.xml
)
pool-idle-timeout-in-seconds
Specifies the maximum time, in seconds, that a bean instance is allowed to remain idle in the pool. When this timeout expires, the bean instance in a pool becomes a candidate for passivation or deletion. This is a hint to the server. A value of 0 specifies that idle beans remain in the pool indefinitely. Default value is 600.
Applies to stateless session beans, entity beans, and message-driven beans.
For a stateless session bean or a message-driven bean, the bean is removed (garbage collected) when the timeout expires. |
Superelements
bean-pool
(glassfish-ejb-jar.xml
)
port-component-name
Specifies a unique name for a port component within a web or EJB module.
Superelements
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
port-info
Specifies information for a port within a web service reference.
Either a service-endpoint-interface
or a wsdl-port
or both must be specified. If both are specified, wsdl-port
specifies the port that the container chooses for container-managed port selection.
The same wsdl-port
value must not appear in more than one port-info
element within the same service-ref
.
If a service-endpoint-interface
is using container-managed port selection, its value must not appear in more than one port-info
element within the same service-ref
.
Superelements
service-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
Subelements
The following table describes subelements for the port-info
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies the web service reference name relative to |
|
zero or one |
Specifies the WSDL port. |
|
zero or more |
Specifies JAX-RPC property values that are set on a |
|
zero or more |
Specifies JAX-RPC property values that are set on a |
|
zero or one |
Specifies a custom authentication provider binding. |
prefetch-disabled
Disables prefetching of entity bean states for the specified query methods. Container-managed relationship fields are prefetched if their fetched-with
element is set to default
.
Superelements
cmp
(glassfish-ejb-jar.xml
)
principal
Defines a user name on the platform.
Superelements
ejb
(glassfish-ejb-jar.xml
);
security-map
(glassfish-resources.xml
and payara-resources.xml
)
principal-map
Maps an EIS principal to a principal defined in the Payara Server domain.
Superelements
work-security-map
(glassfish-resources.xml
and payara-resources.xml
)
principal-name
Contains the principal username.
In an enterprise bean, specifies the principal username that has the run-as
role specified.
Superelements
security-role-mapping
(glassfish-application.xml
, glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
), servlet
(glassfish-web.xml
and payara-web.xml
)
Attributes
The following table describes attributes for the principal-name
element.
Attribute | Default | Description |
---|---|---|
|
|
(optional) Specifies the custom principal implementation class corresponding to the named principal. |
property
(with attributes)
Specifies the name and value of a property. A property adds configuration information to its parent element that is one or both of the following:
-
Optional with respect to Payara Server
-
Needed by a system or object that Payara Server doesn’t have knowledge of, such as an LDAP server or a Java class
Superelements
cache
, cache-helper
,
class-loader
, cookie-properties
,
default-helper
, manager-properties
,
session-properties
, store-properties
,
glassfish-web-app
, valve
,
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
);
auth-realm
, client-container
,
client-credential
, log-service
,
provider-config
(sun-acc.xml
);
admin-object-resource
,
connector-connection-pool
,
connector-resource
, custom-resource
,
external-jndi-resource
,
jdbc-connection-pool
, jdbc-resource
,
mail-resource
, resource-adapter-config
(glassfish-resources.xml
and payara-resources.xml
),
glassfish-web-app
/payara-web-app
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the property
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies an optional text description of a property. |
The property element in the sun-acc.xml file has no subelements.
|
property
(with subelements)
Specifies the name and value of a property. A property adds configuration information to its parent element that is one or both of the following:
-
Optional with respect to Payara Server
-
Needed by a system or object that Payara Server doesn’t have knowledge of, such as an LDAP server or a Jakarta class
Superelements
enterprise-beans
, cmp-resource
,
schema-generator-properties
,
webservice-endpoint
(glassfish-ejb-jar.xml
)
provider-config
Specifies a configuration for one message security provider.
Although the request-policy
and response-policy
subelements are optional, the provider-config
element does nothing if they are not specified.
Use property subelements to configure provider-specific properties. Property values are passed to the provider when its initialize
method is called.
Superelements
message-security-config
(sun-acc.xml
)
Subelements
The following table describes subelements for the provider-config
element.
Element | Required | Description |
---|---|---|
zero or one |
Defines the authentication policy requirements of the authentication provider’s request processing. |
|
zero or one |
Defines the authentication policy requirements of the authentication provider’s response processing. |
|
zero or more |
Specifies a property, which has a name and a value. |
Attributes
The following table describes attributes for the provider-config
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the provider ID. |
|
none |
Specifies whether the provider is a |
|
none |
Specifies the Jakarta implementation class of the provider. Client authentication providers must implement the com.sun.enterprise.security.jauth.ClientAuthModule interface. Server authentication providers must implement the com.sun.enterprise.security.jauth.ServerAuthModule interface. Client-server providers must implement both interfaces. |
query-filter
Specifies the query filter for the CMP 1.1 finder.
Superelements
finder
(glassfish-ejb-jar.xml
)
query-method
Specifies a query method.
Superelements
prefetch-disabled
(glassfish-ejb-jar.xml
)
query-ordering
Specifies the query ordering for the CMP 1.1 finder.
Superelements
finder
(glassfish-ejb-jar.xml
)
query-params
Specifies the query parameters for the CMP 1.1 finder.
Superelements
finder
(glassfish-ejb-jar.xml
)
query-variables
Specifies variables in the query expression for the CMP 1.1 finder.
Superelements
finder
(glassfish-ejb-jar.xml
)
read-only
Specifies that a field is read-only if true
. If this element is absent, the default value is false
.
Superelements
cmp-field-mapping
(sun-cmp-mappings.xml
)
realm
Specifies the name of the realm used to process all authentication requests associated with this application. If this element is not specified or does not match the name of a configured realm, the default realm is used. For more information about realms, see "Realm Configuration" in the Payara Server Application Development section.
Superelements
glassfish-application
(glassfish-application.xml
), as-context
, login-config
(glassfish-ejb-jar.xml
)
refresh-field
Specifies a field that gives the application component a programmatic way to refresh a cached entry.
Superelements
cache-mapping
(glassfish-web.xml
and payara-web.xml
)
Attributes
The following table describes attributes for the refresh-field
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the input parameter name. |
|
|
(optional) Specifies the scope from which the input parameter is retrieved. Allowed values are
|
refresh-period-in-seconds
Specifies the rate at which a read-only-bean must be refreshed from the data source. If the value is less than or equal to zero, the bean is never refreshed; if the value is greater than zero, the bean instances are refreshed at the specified interval. This rate is just a hint to the container. Default is 0 (no refresh).
Superelements
ejb
(glassfish-ejb-jar.xml
)
removal-timeout-in-seconds
Specifies the amount of time a bean instance can remain idle in the container before it is removed (timeout). A value of 0 specifies that the container does not remove inactive beans automatically. The default value is 5400.
If removal-timeout-in-seconds
is less than or equal to cache-idle-timeout-in-seconds
, beans are removed immediately without being passivated.
Applies to stateful session beans.
For related information, see cache-idle-timeout-in-seconds
.
Superelements
bean-cache
(glassfish-ejb-jar.xml
)
remote-home-impl
Specifies the fully-qualified class name of the generated EJBHome
impl
class.
This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. |
Superelements
gen-classes
(glassfish-ejb-jar.xml
)
remote-impl
Specifies the fully-qualified class name of the generated EJBObject
impl
class.
This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. |
Superelements
gen-classes
(glassfish-ejb-jar.xml
)
request-policy
Defines the authentication policy requirements of the authentication provider’s request processing.
Superelements
provider-config
(sun-acc.xml
)
Attributes
The following table describes attributes for the request-policy
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the type of required authentication, either |
|
none |
Specifies whether recipient authentication occurs before or after content authentication. Allowed values are |
request-protection
Defines the authentication policy requirements of the application’s request processing.
Superelements
message-security
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
Attributes
The following table describes attributes for the request-protection
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the type of required authentication, either |
|
none |
Specifies whether recipient authentication occurs before or after content authentication. Allowed values are |
required
Specifies whether the authentication method specified in the
auth-method
element must be used for client authentication. The value is true
or false
(the default).
Superelements
as-context
(glassfish-ejb-jar.xml
)
res-ref-name
Specifies the res-ref-name
in the corresponding Jakarta EE deployment descriptor file resource-ref
entry.
The res-ref-name
element specifies the name of a resource manager connection factory reference. The name must be unique within an enterprise bean.
Superelements
resource-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
resize-quantity
Specifies the number of bean instances to be:
-
Created, if a request arrives when the pool has less than
steady-pool-size
quantity of beans (applies to pools only for creation). If the pool has more thansteady-pool-size
minusresize-quantity
of beans, thenresize-quantity
is still created. -
Removed, when the
pool-idle-timeout-in-seconds
timer expires and a cleaner thread removes any unused instances.-
For caches, when
max-cache-size
is reached,resize-quantity
beans are selected for passivation using thevictim-selection-policy
. In addition, thecache-idle-timeout-in-seconds
orremoval-timeout-in-seconds
timers passivate beans from the cache. -
For pools, when the
max-pool-size
is reached,resize-quantity
beans are selected for removal. In addition, thepool-idle-timeout-in-seconds
timer removes beans untilsteady-pool-size
is reached.
-
Values are from 0 to MAX_INTEGER. The pool is not resized below the steady-pool-size
. Default is 16.
Applies to stateless session beans, entity beans, and message-driven beans.
For EJB pools, the value can be defined in the EJB container. Default is 16.
For EJB caches, the value can be defined in the EJB container. Default is 32.
For message-driven beans, the value can be defined in the EJB container. Default is 2.
Superelements
bean-cache
, bean-pool
(glassfish-ejb-jar.xml
)
resource-adapter-config
Defines a connector (resource adapter) configuration. Stores configuration information for the resource adapter JavaBean in property
subelements.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the resource-adapter-config
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
Attributes
The following table describes attributes for the resource-adapter-config
element.
Attribute | Default | Description |
---|---|---|
|
none |
(optional) Not used. See |
|
none |
(optional) Specifies a comma-separated list of the names of thread pools. |
|
|
(optional) Defines the type of the resource. Allowed values are:
|
|
none |
Specifies the name of a deployed connector module or application. If the resource adapter is embedded in an application, then it is |
resource-adapter-mid
Specifies the module ID of the resource adapter that is responsible for delivering messages to the message-driven bean.
Superelements
mdb-resource-adapter
(glassfish-ejb-jar.xml
)
resource-env-ref
Maps the res-ref-name
in the corresponding Jakarta EE deployment descriptor file resource-env-ref
entry to the absolute jndi-name
of a resource.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
ejb
(glassfish-ejb-jar.xml
),
glassfish-application-client
(glassfish-application-client.xml
)
Subelements
The following table describes subelements for the resource-env-ref
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the |
|
only one |
Specifies the absolute |
resource-env-ref-name
Specifies the res-ref-name
in the corresponding Jakarta EE deployment descriptor file resource-env-ref
entry.
Superelements
resource-env-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
resource-ref
Maps the res-ref-name
in the corresponding Jakarta EE deployment descriptor file resource-ref
entry to the absolute jndi-name
of a resource.
Connections acquired from JMS connection factories are not shareable in the current release of Payara Server.
The res-sharing-scope element in the ejb-jar.xml file resource-ref element is ignored for JMS connection factories.
|
When resource-ref
specifies a JMS connection factory for the Open Message Queue, the default-resource-principal
(name/password) must exist in the Message Queue user repository.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
ejb
(glassfish-ejb-jar.xml
),
glassfish-application-client
(glassfish-application-client.xml
)
Subelements
The following table describes subelements for the resource-ref
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the |
|
only one |
Specifies the absolute |
|
zero or one |
Specifies the default principal (user) for the resource. |
resources
Defines application-scoped resources for an enterprise application, web module, EJB module, connector module, or application client module. This is the root element; there can only be one resources
element in a glassfish-resources.xml
or payara-resources.xml
file.
You must specify a Java Naming and Directory Interface (JNDI) name for each resource. To avoid collisions with names of other enterprise resources in JNDI, and to avoid portability problems, all names in a Payara Server application should begin with the string java:app/ .
|
Subelements
The following table describes subelements for the resources
element.
Element | Required | Description |
---|---|---|
zero or more |
Defines a custom resource. |
|
zero or more |
Defines a resource that resides in an external JNDI repository. |
|
zero or more |
Defines a JDBC (Java Database Connectivity) resource. |
|
zero or more |
Defines a Jakarta Mail resource. |
|
zero or more |
Defines an administered object for an inbound resource adapter. |
|
zero or more |
Defines a connector (resource adapter) resource. |
|
zero or more |
Defines a resource adapter configuration. |
|
zero or more |
Defines the properties that are required for creating a JDBC connection pool. |
|
zero or more |
Defines the properties that are required for creating a connector connection pool. |
|
zero or more |
Defines a work security map. |
Subelements of a resources element can occur in any order.
|
response-policy
Defines the authentication policy requirements of the authentication provider’s response processing.
Superelements
provider-config
(sun-acc.xml
)
Attributes
The following table describes attributes for the response-policy
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the type of required authentication, either |
|
none |
Specifies whether recipient authentication occurs before or after content authentication. Allowed values are |
response-protection
Defines the authentication policy requirements of the application’s response processing.
Superelements
message-security
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
Attributes
The following table describes attributes for the response-protection
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the type of required authentication, either |
|
none |
Specifies whether recipient authentication occurs before or after content authentication. Allowed values are |
role-name
Contains the role-name
in the security-role
element of the corresponding Jakarta EE deployment descriptor file.
Superelements
security-role-mapping
(glassfish-application.xml
, glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
sas-context
Describes the sas-context fields.
Superelements
ior-security-config
(glassfish-ejb-jar.xml
)
scanning-exclude
and scanning-include
Modern WAR and EAR files very often include a number of 3rd party JARs. In situations where some JARs require CDI scanning and others may break if scanned, these can now be explicitly included or excluded from such component scanning.
Both the glassfish-application.xml
and the glassfish-web.xml
files support the following directives:
<webapp>
<scanning-exclude>*</scanning-exclude>
<scanning-include>ejb*</scanning-include>
<scanning-include>conflicting-web-library</scanning-include>
</webapp>
In the above example, all JARs will be excluded by default, then all JARs beginning with ejb
will be scanned along with the JAR named conflicting-web-library
.
Superelements
glassfish-application
(glassfish-application.xml
),
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
schema
Specifies the file that contains a description of the database schema to which the beans in this sun-cmp-mappings.xml
file are mapped. If this element is empty, the database schema file is automatically generated at deployment time. Otherwise, the schema
element names a .dbschema
file with a pathname relative to the directory containing the sun-cmp-mappings.xml
file, but without the .dbschema
extension.
See "Automatic Database Schema Capture" in the Payara Server Application Development section.
Superelements
sun-cmp-mapping
(sun-cmp-mappings.xml
)
schema-generator-properties
Specifies field-specific column attributes in property
subelements.
Superelements
cmp-resource
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the schema-generator-properties
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property name and value. |
Properties
The following table describes properties for the schema-generator-properties
element.
Property | Default | Description |
---|---|---|
|
|
Specifies that generated table names are unique within each Payara Server domain. This property can be overridden during deployment. See "Generation Options for CMP" in the Payara Server Application Development section. |
|
none |
Defines a column attribute. For attribute descriptions, see Table C-130. |
The following table lists the column attributes for properties defined in the schema-generator-properties
element.
Attribute | Description |
---|---|
|
Specifies the JDBC type of the column created for the CMP field. The actual SQL type generated is based on this JDBC type but is database vendor specific. |
|
Specifies the maximum number of characters stored in the column corresponding to the CMP field. Applies only when the actual SQL that is generated for the column requires a length. For example, a |
|
Specifies the maximum number of digits stored in a column which represents a numeric type. |
|
Specifies the number of digits stored to the right of the decimal point in a column that represents a floating point number. |
|
Specifies whether the column generated for the CMP field allows null values. |
Example
<schema-generator-properties>
<property>
<name>Employee.firstName.jdbc-type</name>
<value>char</value>
</property>
<property>
<name>Employee.firstName.jdbc-maximum-length</name>
<value>25</value>
</property>
<property>
<name>use-unique-table-names</name>
<value>true</value>
</property>
</schema-generator-properties>
secondary-table
Specifies a bean’s secondary table(s).
Superelements
entity-mapping
(sun-cmp-mappings.xml
)
Subelements
The following table describes subelements for the secondary-table
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the name of a database table. |
|
one or more |
Specifies the pair of columns that determine the relationship between two database tables. |
security
Defines the SSL security configuration for IIOP/SSL communication with the target server.
Superelements
target-server
(sun-acc.xml
)
security-map
Maps the principal received during servlet or EJB authentication to the credentials accepted by the EIS. This mapping is optional. It is possible to map multiple Payara Server principals to the same back-end principal.
This is different from a work-security-map
, which maps a principal associated with an incoming work instance to a principal in the Payara Server’s security domain.
Superelements
connector-connection-pool
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the security-map
element.
Element | Required | Description |
---|---|---|
one or more |
Contains the principal of the servlet or EJB client. |
|
one or more |
Contains the group to which the principal belongs. |
|
only one |
Specifies the username and password required by the EIS. |
security-role-mapping
Maps roles to users or groups in the currently active realm. See "Realm Configuration" in the Payara Server Application Development section.
The role mapping element maps a role, as specified in the EJB JAR role-name
entries, to a environment-specific user or group.
If it maps to a user, it must be a concrete user which exists in the current realm, who can log into the server using the current authentication method.
If it maps to a group, the realm must support groups and the group must be a concrete group which exists in the current realm.
To be useful, there must be at least one user in that realm who belongs to that group.
Superelements
glassfish-application
(glassfish-application.xml
),
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
glassfish-ejb-jar
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the security-role-mapping
element.
Element | Required | Description |
---|---|---|
only one |
Contains the |
|
one or more if no |
Contains a principal (user) name in the current realm. In an enterprise bean, the principal must have the run-as role specified. |
|
one or more if no |
Contains a group name in the current realm. |
service-endpoint-interface
Specifies the web service reference name relative to java:comp/env
.
Superelements
port-info
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
service-impl-class
Specifies the name of the generated service implementation class.
Superelements
service-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
service-qname
Specifies the WSDL service element that is being referred to.
Superelements
service-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
);
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
service-ref
Specifies runtime settings for a web service reference. Runtime information is only needed in the following cases:
-
To define the port used to resolve a container-managed port
-
To define the default Stub/Call property settings for Stub objects
-
To define the URL of a final WSDL document to be used instead of the one associated with the
service-ref
in the standard Jakarta EE deployment descriptor
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
ejb
(glassfish-ejb-jar.xml
),
glassfish-application-client
(glassfish-application-client.xml
)
Subelements
The following table describes subelements for the service-ref
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the web service reference name relative to |
|
zero or more |
Specifies information for a port within a web service reference. |
|
zero or more |
Specifies JAX-RPC property values that can be set on a |
|
zero or one |
Specifies a valid URL pointing to a final WSDL document. |
|
zero or one |
Specifies the name of the generated service implementation class. |
|
zero or one |
Specifies the WSDL service element that is being referenced. |
service-ref-name
Specifies the web service reference name relative to java:comp/env
.
Superelements
service-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
servlet
Specifies a principal name for a servlet. Used for the run-as
role defined in web.xml
.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the servlet
element.
Element | Required | Description |
---|---|---|
only one |
Contains the name of a servlet, which is matched to a |
|
zero or one |
Contains a principal (user) name in the current realm. |
|
zero or more |
Specifies information about a web service endpoint. |
servlet-impl-class
Specifies the automatically generated name of the servlet implementation class.
Superelements
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
servlet-name
Specifies the name of a servlet, which is matched to a servlet-name
in web.xml
. This name must be present in web.xml
.
Superelements
cache-mapping
, servlet
(glassfish-web.xml
and payara-web.xml
)
session-config
Specifies session configuration information. Overrides the web container settings for an individual web module.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the session-config
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies session manager configuration information. |
|
zero or one |
Specifies session properties. |
|
zero or one |
Specifies session cookie properties. |
session-manager
Specifies session manager information.
Superelements
session-config
(glassfish-web.xml
and payara-web.xml
)
session-properties
Specifies session properties.
Superelements
session-config
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the session-properties
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Properties
The following table describes properties for the session-properties
element.
Property | Default | Description |
---|---|---|
|
|
Specifies the default maximum inactive interval (in seconds) for all sessions created in this web module. If set to If a Note that the |
|
|
Uses cookies for session tracking if set to |
|
|
Enables URL rewriting. This provides session tracking via URL rewriting when the browser does not accept cookies. You must also use an |
ssl
Defines SSL processing parameters.
Superelements
security
(sun-acc.xml
)
Attributes
The following table describes attributes for the SSL
element.
Attribute | Default | Description |
---|---|---|
|
|
(optional) The nickname of the server certificate in the certificate database or the PKCS#11 token.
In the certificate, the name format is |
|
|
(optional) Determines whether SSL2 is enabled. |
|
none |
(optional) A comma-separated list of the SSL2 ciphers to be used.
Ciphers not explicitly listed will be disabled for the target, even if those ciphers are available in the particular cipher suite you are using.
If this option is not used, all supported ciphers are assumed to be enabled. Allowed values are |
|
|
(optional) Determines whether SSL3 is enabled. |
|
none |
(optional) A comma-separated list of the SSL3 and/or TLS ciphers to be used.
Ciphers not explicitly listed will be disabled for the target, even if those ciphers are available in the particular cipher suite you are using. If this option is not used, all supported ciphers are assumed to be enabled.
Allowed values are |
|
|
(optional) Determines whether TLS is enabled. |
|
|
(optional) Determines whether TLS rollback is enabled. Enable TLS rollback for Microsoft Internet Explorer 5.0 and 5.5. |
steady-pool-size
Specifies the initial and minimum number of bean instances that are maintained in the pool. Default is 32. Applies to stateless session beans and message-driven beans.
Superelements
bean-pool
(glassfish-ejb-jar.xml
)
store-properties
Specifies session persistence (storage) properties.
Superelements
session-manager
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the store-properties
element.
Element | Required | Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
Properties
The following table describes properties for the store-properties
element.
Property | Default | Description |
---|---|---|
|
|
Specifies the absolute or relative pathname of the directory into which individual session files are written.
A relative path is relative to the temporary work directory for this web module. Applicable only if the |
|
|
Specifies how much of the session state is stored. Allowed values are as follows:
Applicable only if the |
If the persistenceScope
store property is set to modified-attribute
, a web module must follow these guidelines:
-
Call
setAttribute
every time the session state is modified. -
Make sure there are no cross-references between attributes. The object graph under each distinct attribute key is serialized and stored separately. If there are any object cross references between the objects under each separate key, they are not serialized and deserialized correctly.
-
Distribute the session state across multiple attributes, or at least between a read-only attribute and a modifiable attribute.
stub-property
Specifies JAX-RPC property values that are set on a javax.xml.rpc.Stub
object before it is returned to the web service client. The property names can be any properties supported by the JAX-RPC Stub
implementation.
Superelements
port-info
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
Subelements
The following table describes subelements for the stub-property
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the name of the entity. |
|
only one |
Specifies the value of the entity. |
Properties
The following table describes properties for the stub-property
element.
Property | Default | Description |
---|---|---|
|
|
Determines whether the visibility of this endpoint as a Java Business Integration service is enabled or disabled. |
Example
<service-ref>
<service-ref-name>service/FooProxy</service-ref-name>
<port-info>
<service-endpoint-interface>a.FooPort</service-endpoint-interface>
<wsdl-port>
<namespaceURI>urn:Foo</namespaceURI>
<localpart>FooPort</localpart>
</wsdl-port>
<stub-property>
<name>javax.xml.rpc.service.endpoint.address</name>
<value>http://localhost:8080/a/Foo</value>
</stub-property>
</port-info>
</service-ref>
sun-cmp-mapping
Specifies beans mapped to a particular database schema.
A bean cannot be related to a bean that maps to a different database schema, even if the beans are deployed in the same EJB JAR file. |
Superelements
sun-cmp-mappings
(sun-cmp-mappings.xml
)
sun-cmp-mappings
Defines the Payara Server specific CMP mapping configuration for an EJB JAR file. This is the root element; there can only be one sun-cmp-mappings
element in a sun-cmp-mappings.xml
file.
table-name
Specifies the name of a database table. The table must be present in the database schema file. See "Automatic Database Schema Capture" in the Payara Server Application Development section.
Superelements
entity-mapping
, secondary-table
(sun-cmp-mappings.xml
)
target-server
Specifies the IIOP listener for the target server. Also specifies IIOP endpoints used for load balancing. If the Payara Server instance on which the application client is deployed participates in a cluster, Payara Server finds all currently active IIOP endpoints in the cluster automatically. However, a client should have at least two endpoints specified for bootstrapping purposes, in case one of the endpoints has failed.
A listener or endpoint is in the form host:port
, where the host is an IP address or host name, and the port specifies the port number.
Not used if the deprecated endpoints
property is defined for load balancing. For more information, see client-container
.
Superelements
client-container
(sun-acc.xml
)
Subelements
The following table describes subelements for the target-server
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies the description of the target server. |
|
zero or one |
Specifies the security configuration for the IIOP/SSL communication with the target server. |
Attributes
The following table describes attributes for the target-server
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the name of the server instance accessed by the client container. |
|
none |
Specifies the host name or IP address (resolvable by DNS) of the server to which this client attaches. |
|
none |
Specifies the naming service port number of the server to which this client attaches. For a new server instance, assign a port number other than 3700. You can change the port number in the Administration Console. Click the Help button in the Administration Console for more information. |
tie-class
Specifies the automatically generated name of a tie implementation class for a port component.
Superelements
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
timeout
Specifies the cache-mapping
specific maximum amount of time in seconds that an entry can remain in the cache after it is created or refreshed.
If not specified, the default is the value of the timeout
attribute of the cache
element.
Superelements
cache-mapping
(glassfish-web.xml
and payara-web.xml
)
Attributes
The following table describes attributes for the timeout
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies the timeout input parameter, whose value is interpreted in seconds. The field’s type must be |
|
|
(optional) Specifies the scope from which the input parameter is retrieved.
Allowed values are |
transport-config
Specifies the security transport information.
Superelements
ior-security-config
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the transport-config
element.
Element | Required | Description |
---|---|---|
only one |
Specifies if the target supports integrity-protected messages. The values are NONE, SUPPORTED, or REQUIRED. |
|
only one |
Specifies if the target supports privacy-protected messages. The values are NONE, SUPPORTED, or REQUIRED. |
|
only one |
Specifies if the target is capable of authenticating to a client. The values are NONE, SUPPORTED, or REQUIRED. |
|
only one |
Specifies if the target is capable of authenticating a client. The values are NONE, SUPPORTED, or REQUIRED. |
transport-guarantee
Specifies that the communication between client and server is NONE
, INTEGRAL
, or CONFIDENTIAL
.
-
NONE
means the application does not require any transport guarantees. -
INTEGRAL
means the application requires that the data sent between client and server be sent in such a way that it can’t be changed in transit. -
CONFIDENTIAL
means the application requires that the data be transmitted in a fashion that prevents other entities from observing the contents of the transmission.
In most cases, a value of INTEGRAL
or CONFIDENTIAL
indicates that the use of SSL is required.
Superelements
webservice-endpoint
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
unique-id
Contains the unique ID for the application. This value is automatically updated each time the application is deployed or redeployed. Do not edit this value.
Superelements
glassfish-application
(glassfish-application.xml
),
enterprise-beans
(glassfish-ejb-jar.xml
)
url-pattern
Specifies a servlet URL pattern for which caching is enabled. See the Servlet 6.0 specification section 12.2 for applicable patterns.
Superelements
cache-mapping
(glassfish-web.xml
and payara-web.xml
)
user-group
Contains the group to which the principal belongs.
Superelements
security-map
(glassfish-resources.xml
and payara-resources.xml
)
use-thread-pool-id
Specifies the thread pool from which threads are selected for remote invocations of this bean.
Superelements
ejb
(glassfish-ejb-jar.xml
)
value
Specifies the value of the entity.
Superelements
call-property
, stub-property
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
); property
(with subelements) (glassfish-ejb-jar.xml
)
valve
Specifies a custom valve for this web application. You can define a valve for all the web applications on a specific virtual server. For details, see create-virtual-server
.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
)
Subelements
The following table describes subelements for the valve
element.
Element | Required | Description |
---|---|---|
zero or one |
Specifies a text description of this element. |
|
zero or more |
Specifies a property, which has a name and a value. |
Attributes
The following table describes attributes for the valve
element.
Attribute | Default | Description |
---|---|---|
|
none |
Specifies a unique name for the valve. |
|
none |
Specifies the fully qualified class name of the valve. The valve class must implement the |
vendor
Specifies a vendor-specific icon, splash screen, text string, or a combination of these for Java Web Start download and launch screens. The complete format of this element’s data is as follows:
<vendor>icon-image-URI::splash-screen-image-URI::vendor-text</vendor>
The following example vendor element contains an icon, a splash screen, and a text string:
<vendor>images/icon.jpg::otherDir/splash.jpg::MyCorp, Inc.</vendor>
The following example vendor element contains an icon and a text string:
<vendor>images/icon.jpg::MyCorp, Inc.</vendor>
The following example vendor element contains a splash screen and a text string; note the initial double colon:
<vendor>::otherDir/splash.jpg::MyCorp, Inc.</vendor>
The following example vendor element contains only a text string:
<vendor>MyCorp, Inc.</vendor>
The default value is the text string Application Client
.
Superelements
java-web-start-access
(glassfish-application-client.xml
)
version-identifier
Contains version information for an application or module. For more information about application versioning, see Module and Application Versions.
Superelements
glassfish-application
(glassfish-application.xml
),
glassfish-web-app
(glassfish-web-app.xml
),
glassfish-ejb-jar
(glassfish-ejb-jar.xml
),
glassfish-application-client
(glassfish-application-client.xml
)
victim-selection-policy
Specifies how stateful session beans are selected for passivation. Possible values are First In, First Out (FIFO
), Least Recently Used (LRU
), Not Recently Used (NRU
).
The default value is NRU
, which is actually pseudo-LRU.
You cannot plug in your own victim selection algorithm. |
The victims are generally passivated into a backup store (typically a file system or database). This store is cleaned during startup, and also by a periodic background process that removes idle entries as specified by removal-timeout-in-seconds
.
The backup store is monitored by a background thread (or sweeper thread) to remove unwanted entries.
Applies to stateful session beans.
Superelements
bean-cache
(glassfish-ejb-jar.xml
)
Example
<victim-selection-policy>LRU</victim-selection-policy>
If both SSL2 and SSL3 are enabled, the server tries SSL3 encryption first. If that fails, the server tries SSL2 encryption. If both SSL2 and SSL3 are enabled for a virtual server, the server tries SSL3 encryption first. If that fails, the server tries SSL2 encryption.
web
Specifies the application’s web tier configuration.
Superelements
glassfish-application
(payara-application.xml
)
web-uri
Contains the web URI for the application. Must match the corresponding element in the application.xml
file.
Superelements
web
(glassfish-application.xml
)
webservice-default-login-config
When declaring a secured Web Service based on an EJB using the glassfish-ejb-jar.xml
deployment descriptor, it’s necessary to define the login configuration (authentication method, security realm name, etc.) for each EJB Web Service that is secured inside the assembly.
For example, if an application contains 2 EJB web services called EJBWS1 and EJBWS2, and they need to be secured using BASIC
authentication against the file security realm, the following configuration would be needed:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>EJBWS1</ejb-name>
<webservice-endpoint>
<port-component-name>EJBWS1Port</port-component-name>
<endpoint-address-uri>EJBWS1/EJBWebService</endpoint-address-uri>
<login-config>
<auth-method>BASIC</auth-method>
<realm>file</realm>
</login-config>
</webservice-endpoint>
</ejb>
<ejb>
<ejb-name>EJBWS2</ejb-name>
<webservice-endpoint>
<port-component-name>EJBWS2Port</port-component-name>
<endpoint-address-uri>EJBWS2/EJBWebService</endpoint-address-uri>
<login-config>
<auth-method>BASIC</auth-method>
<realm>file</realm>
</login-config>
</webservice-endpoint>
</ejb>
</enterprise-beans>
</glassfish-ejb-jar>
Notice that the login-config
element is repeated exactly like it is in the 2 EJB definitions. Not only that, but if these Web services are defined using annotations for each EJB component, then the JAX-WS information (Port Component Name, Endpoint Address, etc.) would be duplicated too, which is too cumbersome for cases when there are lots of EJB Web service definitions.
For this scenario, the webservice-default-login-config
has been introduced to simplify this configuration. When this element is declared, the login configuration inside it will apply to all the EJB defined Web Services by default.
The previous example can be simplified like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-jar>
<webservice-default-login-config>
<auth-method>BASIC</auth-method>
<realm>file</realm>
</webservice-default-login-config>
</glassfish-ejb-jar>
All sub-elements tags of the login-config can be used inside this element.
|
If an EJB Web service definition needs a different login configuration from the default, just redefine it as shown in the example, and it will override the default configuration. |
Superelements
glassfish-ejb-jar
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the webservice-default-login-config
element.
Element | Required | Description |
---|---|---|
only one |
Specifies the authentication method. |
|
zero or one |
Specifies the name of the realm used to process all authentication requests. |
webservice-description
Specifies a name and optional publish location for a web service.
Superelements
glassfish-web-app
(glassfish-web.xml
and payara-web.xml
),
enterprise-beans
(glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the webservice-description
element.
Element | Required | Description |
---|---|---|
only one |
Specifies a unique name for the web service within a web or EJB module. |
|
zero or one |
Specifies the URL of a directory to which a web service’s WSDL is published during deployment. |
webservice-description-name
Specifies a unique name for the web service within a web or EJB module.
Superelements
webservice-description
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
Subelements
The following table describes subelements for the webservice-endpoint
element.
Element | Required | Description |
---|---|---|
only one |
Specifies a unique name for a port component within a web or EJB module. |
|
zero or one |
Specifies the automatically generated endpoint address. |
|
zero or one |
Specifies the authentication configuration for an EJB web service endpoint. |
|
zero or one |
Specifies a custom authentication provider binding. |
|
zero or one |
Specifies that the communication between client and server is |
|
zero or one |
Specifies the WSDL service element that is being referenced. |
|
zero or one |
Specifies the automatically generated name of a tie implementation class for a port component. |
|
zero or one |
Specifies the automatically generated name of the generated servlet implementation class. |
|
zero or one |
Specifies whether the debugging servlet is enabled for this web service endpoint. Allowed values are |
|
|
zero or more |
Specifies a property, which has a name and a value. |
whitelist-package
This element can be used to whitelist packages on extreme class loading isolation.
Whitelisted packages are taken into account by the server when scanning libraries.
For more information about how extreme class loading isolation works on Payara Server, see the Enhanced Classloading section.
Superelements
glassfish-application
(glassfish-application.xml
),
glassfish-web-app
or payara-web-app
(glassfish-web.xml
)
work-security-map
Defines a work security map, which maps a principal associated with an incoming work instance to a principal in the Payara Server’s security domain. It is possible to map multiple EIS group or user principals to the same Payara Server principal.
This is different from a security-map
, which maps the principal received during servlet or EJB authentication to the credentials accepted by the EIS.
Superelements
resources
(glassfish-resources.xml
and payara-resources.xml
)
Subelements
The following table describes subelements for the work-security-map
element.
Element | Required | Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Maps an EIS principal to a principal defined in the Payara Server domain. |
|
zero or more |
Maps an EIS group to a group defined in the Payara Server domain. |
wsdl-override
Specifies a valid URL pointing to a final WSDL document. If not specified, the WSDL document associated with the service-ref
in the standard Jakarta EE deployment descriptor is used.
Superelements
service-ref
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
wsdl-port
Specifies the WSDL port.
Superelements
port-info
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
, glassfish-application-client.xml
)
wsdl-publish-location
Specifies the URL of a directory to which a web service’s WSDL is published during deployment.
Any required files are published to this directory, preserving their location relative to the module-specific WSDL directory (META-INF/wsdl
or WEB-INF/wsdl
).
Superelements
webservice-description
(glassfish-web.xml
and payara-web.xml
, glassfish-ejb-jar.xml
)
Example
Suppose you have an ejb.jar
file whose webservices.xml
file’s wsdl-file
element contains the following reference:
META-INF/wsdl/a/Foo.wsdl
Suppose your glassfish-ejb.jar
file contains the following element:
<wsdl-publish-location>file:/home/user1/publish</wsdl-publish-location>
The final WSDL is stored in /home/user1/publish/a/Foo.wsdl
.