This chapter describes deployment descriptor files specific to the Sun GlassFish Enterprise Server in the following sections:
For GlassFish v3 Prelude, EJB modules are not supported unless the optional EJB container add-on component is downloaded from the Update Tool. Only stateless session beans with local interfaces and entity beans that use the Java Persistence API are supported. Stateful, message-driven, and EJB 2.0 and 2.1 entity beans are not supported. Remote interfaces and remote business interfaces for any of the bean types are not supported. The sun-ejb-jar.xml elements related to these features are ignored.
Web services are not supported unless the optional Metro (JSR 109) add-on component is downloaded from the Update Tool. Without the Metro add-on component, a servlet or EJB module cannot be a web service endpoint, and the sun-web.xml and sun-ejb-jar.xml elements related to web services are ignored.
Global (XA) transactions are not supported unless the optional JTS and Object Management Group (OMG) add-on components are downloaded from the Update Tool. Without the these components, only local transactions are supported. Transaction recovery is not implemented for GlassFish v3 Prelude, even if the JTS and OMG add-on components are installed. Therefore, all transaction service attributes and properties pertaining to transaction recovery or transaction logs are not implemented.
For information about the Update Tool, see the Sun GlassFish Enterprise Server v3 Prelude Installation Guide.
GlassFish v3 Prelude does not support clustering or load balancing features, Sun GlassFish Message Queue software, container-managed persistence (CMP), or descriptor-based schema generation. Elements related to these features are ignored.
Sun GlassFish Enterprise Server uses optional deployment descriptors in addition to the Java EE standard descriptors for configuring features specific to the Enterprise Server.
Settings in the Enterprise Server deployment descriptors override corresponding settings in the Java EE deployment descriptors and in the Enterprise Server's domain.xml file unless otherwise stated. For more information about the domain.xml file, see the Sun GlassFish Enterprise Server v3 Prelude Administration Reference.
Each deployment descriptor (or XML) file has a corresponding DTD file, which defines the elements, data, and attributes that the deployment descriptor file can contain. The DTD files for the Enterprise Server deployment descriptors are located in the as-install/lib/dtds directory.
Do not edit the DTD files; their contents change only with new versions of the Enterprise Server.
For general information about DTD files and XML, see the XML specification at http://www.w3.org/TR/REC-xml.
The following table lists the Enterprise Server deployment descriptors and their DTD files.
Table A–1 Sun GlassFish Enterprise Server Descriptors
Deployment Descriptor |
DTD File |
Description |
---|---|---|
Configures a web application (WAR file). |
||
Configures an enterprise bean (EJB JAR file). |
The Enterprise Server deployment descriptors must be readable and writable by the file owners.
In each deployment descriptor file, subelements must be defined in the order in which they are listed under each Subelements heading, unless otherwise noted.
The element hierarchy in the sun-web.xml file is as follows:
sun-web-app . context-root . security-role-mapping . . role-name . . principal-name . . group-name . servlet . . servlet-name . . principal-name . . webservice-endpoint . . . port-component-name . . . endpoint-address-uri . . . login-config . . . . auth-method . . . message-security-binding . . . . message-security . . . . . message . . . . . . java-method . . . . . . . method-name . . . . . . . method-params . . . . . . . . method-param . . . . . . operation-name . . . . . request-protection . . . . . response-protection . . . transport-guarantee . . . service-qname . . . tie-class . . . servlet-impl-class . . . debugging-enabled . . . property (with attributes) . . . . description . idempotent-url-pattern . session-config . . session-manager . . . manager-properties . . . . property (with attributes) . . . . . description . . . store-properties . . . . property (with attributes) . . . . . description . . session-properties . . . property (with attributes) . . . . description . . cookie-properties . . . property (with attributes) . . . . description . ejb-ref . . ejb-ref-name . . jndi-name . resource-ref . . res-ref-name . . jndi-name . . default-resource-principal . . . name . . . password . resource-env-ref . . resource-env-ref-name . . jndi-name . service-ref . . service-ref-name . . port-info . . . service-endpoint-interface . . . wsdl-port . . . . namespaceURI . . . . localpart . . . stub-property . . . . name . . . . value . . . call-property . . . . name . . . . value . . . message-security-binding . . . . message-security . . . . . message . . . . . . java-method . . . . . . . method-name . . . . . . . method-params . . . . . . . . method-param . . . . . . operation-name . . . . . request-protection . . . . . response-protection . . call-property . . . name . . . value . . wsdl-override . . service-impl-class . . service-qname . . . namespaceURI . . . localpart . message-destination-ref . . message-destination-ref-name . . jndi-name . cache . . cache-helper . . . property (with attributes) . . . . description . . default-helper . . . property (with attributes) . . . . description . . property (with attributes) . . . description . . cache-mapping . . . servlet-name . . . url-pattern . . . cache-helper-ref . . . dispatcher . . . timeout . . . refresh-field . . . http-method . . . key-field . . . constraint-field . . . . constraint-field-value . class-loader . . property (with attributes) . . . description . jsp-config . locale-charset-info . . locale-charset-map . . parameter-encoding . parameter-encoding . property (with attributes) . . description . message-destination . . message-destination-name . . jndi-name . webservice-description . . webservice-description-name . . wsdl-publish-location
Here is a sample sun-web.xml file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN' 'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'> <sun-web-app> <session-config> <session-manager/> </session-config> <resource-ref> <res-ref-name>mail/Session</res-ref-name> <jndi-name>mail/Session</jndi-name> </resource-ref> <jsp-config/> </sun-web-app>
The element hierarchy in the sun-ejb-jar.xml file is as follows:
sun-ejb-jar . security-role-mapping . . role-name . . principal-name . . group-name . enterprise-beans . . name . . unique-id . . ejb . . . ejb-name . . . jndi-name . . . ejb-ref . . . . ejb-ref-name . . . . jndi-name . . . resource-ref . . . . res-ref-name . . . . jndi-name . . . . default-resource-principal . . . . . name . . . . . password . . . resource-env-ref . . . . resource-env-ref-name . . . . jndi-name . . . service-ref . . . . service-ref-name . . . . port-info . . . . . service-endpoint-interface . . . . . wsdl-port . . . . . . namespaceURI . . . . . . localpart . . . . . stub-property . . . . . . name . . . . . . value . . . . . call-property . . . . . . name . . . . . . value . . . . . message-security-binding . . . . . . message-security . . . . . . . message . . . . . . . . java-method . . . . . . . . . method-name . . . . . . . . . method-params . . . . . . . . . . method-param . . . . . . . . operation-name . . . . . . . request-protection . . . . . . . response-protection . . . . call-property . . . . . name . . . . . value . . . . wsdl-override . . . . service-impl-class . . . . service-qname . . . . . namespaceURI . . . . . localpart . . . message-destination-ref . . . . message-destination-ref-name . . . . jndi-name . . . pass-by-reference . . . cmp . . . . mapping-properties . . . . is-one-one-cmp . . . . one-one-finders . . . . . finder . . . . . . method-name . . . . . . query-params . . . . . . query-filter . . . . . . query-variables . . . . . . query-ordering . . . . prefetch-disabled . . . . . query-method . . . . . . method-name . . . . . . method-params . . . . . . . method-param . . . principal . . . . name . . . mdb-connection-factory . . . . jndi-name . . . . default-resource-principal . . . . . name . . . . . password . . . jms-durable-subscription-name . . . jms-max-messages-load . . . ior-security-config . . . . transport-config . . . . . integrity . . . . . confidentiality . . . . . establish-trust-in-target . . . . . establish-trust-in-client . . . . as-context . . . . . auth-method . . . . . realm . . . . . required . . . . sas-context . . . . . caller-propagation . . . is-read-only-bean . . . refresh-period-in-seconds . . . commit-option . . . cmt-timeout-in-seconds . . . use-thread-pool-id . . . gen-classes . . . . remote-impl . . . . local-impl . . . . remote-home-impl . . . . local-home-impl . . . bean-pool . . . . steady-pool-size . . . . resize-quantity . . . . max-pool-size . . . . pool-idle-timeout-in-seconds . . . . max-wait-time-in-millis . . . bean-cache . . . . max-cache-size . . . . resize-quantity . . . . is-cache-overflow-allowed . . . . cache-idle-timeout-in-seconds . . . . removal-timeout-in-seconds . . . . victim-selection-policy . . . mdb-resource-adapter . . . . resource-adapter-mid . . . . activation-config . . . . . description . . . . . activation-config-property . . . . . . activation-config-property-name . . . . . . activation-config-property-value . . . webservice-endpoint . . . . port-component-name . . . . endpoint-address-uri . . . . login-config . . . . . auth-method . . . . . realm . . . . message-security-binding . . . . . message-security . . . . . . message . . . . . . . java-method . . . . . . . . method-name . . . . . . . . method-params . . . . . . . . . method-param . . . . . . . operation-name . . . . . . request-protection . . . . . . response-protection . . . . transport-guarantee . . . . service-qname . . . . tie-class . . . . servlet-impl-class . . . . debugging-enabled . . . . property (with subelements) . . . . . name . . . . . value . . . flush-at-end-of-method . . . . method . . . . . description . . . . . ejb-name . . . . . method-name . . . . . method-intf . . . . . method-params . . . . . . method-param . . . checkpointed-methods . . . checkpoint-at-end-of-method . . . . method . . . . . description . . . . . ejb-name . . . . . method-name . . . . . method-intf . . . . . method-params . . . . . . method-param . . pm-descriptors . . cmp-resource . . . jndi-name . . . default-resource-principal . . . . name . . . . password . . . property (with subelements) . . . . name . . . . value . . . create-tables-at-deploy . . . drop-tables-at-undeploy . . . database-vendor-name . . . schema-generator-properties . . . . property (with subelements) . . . . . name . . . . . value . . message-destination . . . message-destination-name . . . jndi-name . . webservice-description . . . webservice-description-name . . . wsdl-publish-location
If any configuration information for an enterprise bean is not specified in the sun-ejb-jar.xml file, it defaults to a corresponding setting in the EJB container if an equivalency exists.
Here is a sample sun-ejb-jar.xml file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN' 'http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd'> <sun-ejb-jar> <display-name>First Module</display-name> <enterprise-beans> <ejb> <ejb-name>CustomerEJB</ejb-name> <jndi-name>customer</jndi-name> <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> <cmp-resource> <jndi-name>jdbc/__default</jndi-name> <create-tables-at-deploy>true</create-tables-at-deploy> <drop-tables-at-undeploy>true</drop-tables-at-undeploy> </cmp-resource> </enterprise-beans> </sun-ejb-jar>
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.
mdb-resource-adapter (sun-ejb-jar.xml)
The following table describes subelements for the activation-config element.
Table A–2 activation-config subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies a text description of the activation configuration. |
|
one or more |
Specifies an activation configuration property. |
Specifies the name and value of an activation configuration property.
activation-config (sun-ejb-jar.xml)
The following table describes subelements for the activation-config-property element.
Table A–3 activation-config-property subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the name of an activation configuration property. |
|
only one |
Specifies the value of an activation configuration property. |
Specifies the name of an activation configuration property.
activation-config-property (sun-ejb-jar.xml)
none - contains data
Specifies the value of an activation configuration property.
activation-config-property (sun-ejb-jar.xml)
none - contains data
Specifies the authentication mechanism used to authenticate the client.
ior-security-config (sun-ejb-jar.xml)
The following table describes subelements for the as-context element.
Table A–4 as-context Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the authentication method. The only supported value is USERNAME_PASSWORD. |
|
only one |
Specifies the realm in which the user is authenticated. |
|
only one |
Specifies whether the authentication method specified in the auth-method element must be used for client authentication. |
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.
login-config (sun-web.xml), as-context (sun-ejb-jar.xml)
none - contains data
Specifies the entity bean cache properties. Used for entity beans and stateful session beans.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the bean-cache element.
Table A–5 bean-cache Subelements
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 removal-timeout-in-seconds is less than idle-timeout, the bean is removed without being passivated. |
|
zero or one |
Specifies the number of beans to be created if the pool is empty (subject to the max-pool-size limit). Values are from 0 to MAX_INTEGER. |
|
zero or one |
Specifies the algorithm that must be used by the container to pick victims. Applies only to stateful session beans. |
<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>
Specifies the pool properties of stateless session beans, entity beans, and message-driven bean.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the bean-pool element.
Table A–6 bean-pool Subelements
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 max-pool-size limit). Values are from 0 to MAX_INTEGER. |
|
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). |
<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>
Configures caching for web application components.
sun-web-app (sun-web.xml)
The following table describes subelements for the cache element.
Table A–7 cache Subelements
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 cache-helper class. |
|
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. |
The following table describes attributes for the cache element.
Table A–8 cache Attributes
Attribute |
Default |
Description |
---|---|---|
4096 |
(optional) Specifies the maximum number of entries the cache can contain. Must be a positive integer. |
|
30 |
(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 timeout element. |
|
true |
(optional) Determines whether servlet and JSP caching is enabled. |
The following table describes properties for the cache element.
Table A–9 cache Properties
Property |
Default |
Description |
---|---|---|
com.sun.appserv.web.cache.LruCache |
Specifies the fully qualified name of the class that implements the cache functionality. See Cache Class Names for possible values. |
|
4096 |
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 cacheClassName is set to com.sun.appserv.web.cache.MultiLruCache. |
|
unlimited; Long.MAX_VALUE |
Specifies an upper bound on the cache memory size in bytes (KB or MB units). Example values are 32 KB or 2 MB. Applicable only if cacheClassName is set to com.sun.appserv.web.cache.BoundedMultiLruCache. |
The following table lists possible values of the cacheClassName property.
Table A–10 cacheClassName Values
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 MultiLRUSegmentSize property. |
|
A cache suitable for limiting the cache size by memory rather than number of entries. Uses the MaxSize property. |
Specifies a class that implements the com.sun.appserv.web.cache.CacheHelper interface.
cache (sun-web.xml)
The following table describes subelements for the cache-helper element.
Table A–11 cache-helper Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
The following table describes attributes for the cache-helper element.
Table A–12 cache-helper Attributes
Attribute |
Default |
Description |
---|---|---|
name |
default |
Specifies a unique name for the helper class, which is referenced in the cache-mapping element. |
none |
Specifies the fully qualified class name of the cache helper, which must implement the com.sun.appserv.web.CacheHelper interface. |
Specifies the name of the cache-helper used by the parent cache-mapping element.
cache-mapping (sun-web.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
bean-cache (sun-ejb-jar.xml)
none - contains data
Maps a URL pattern or a servlet name to its cacheability constraints.
cache (sun-web.xml)
The following table describes subelements for the cache-mapping element.
Table A–13 cache-mapping Subelements
Element |
Required |
Description |
---|---|---|
requires one servlet-name or url-pattern |
Contains the name of a servlet. |
|
requires one servlet-name or url-pattern |
Contains a servlet URL pattern for which caching is enabled. |
|
required if dispatcher, timeout, refresh-field, http-method, key-field, and constraint-field are not used |
Contains the name of the cache-helper used by the parent cache-mapping element. |
|
zero or one if cache-helper-ref is not used |
Contains a comma-separated list of RequestDispatcher methods for which caching is enabled. |
|
zero or one if cache-helper-ref is not used |
Contains the cache-mapping specific maximum amount of time in seconds that an entry can remain in the cache after it is created or refreshed. |
|
zero or one if cache-helper-ref is not used |
Specifies a field that gives the application component a programmatic way to refresh a cached entry. |
|
zero or more if cache-helper-ref is not used |
Contains an HTTP method that is eligible for caching. |
|
zero or more if cache-helper-ref is not used |
Specifies a component of the key used to look up and extract cache entries. |
|
zero or more if cache-helper-ref is not used |
Specifies a cacheability constraint for the given url-pattern or servlet-name. |
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.
port-info, service-ref (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the call-property element.
Table A–14 call-property subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the name of the entity. |
|
only one |
Specifies the value of the entity. |
Specifies whether the target accepts propagated caller identities. The values are NONE, SUPPORTED, or REQUIRED.
sas-context (sun-ejb-jar.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the checkpoint-at-end-of-method element.
Table A–15 checkpoint-at-end-of-method Subelements
Element |
Required |
Description |
---|---|---|
one or more |
Specifies a bean method. |
Deprecated. Supported for backward compatibility. Use checkpoint-at-end-of-method instead.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
Configures the class loader for the web module.
sun-web-app (sun-web.xml)
The following table describes subelements for the class-loader element.
Table A–16 class-loader Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
The following table describes attributes for the class-loader element.
Table A–17 class-loader Attributes
If the delegate element is set to false, the class loader delegation behavior complies with the Servlet 2.4 specification, section 9.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 Java EE specification. The behavior of a program that includes such classes or interfaces in its WAR file is undefined.
The following table describes properties for the class-loader element.
Table A–18 class-loader Properties
Property |
Default |
Description |
---|---|---|
false |
If true, specifies that all JAR and ZIP files in the WEB-INF/lib directory that start with a period (.) are ignored by the class loader. |
Describes runtime information for a CMP entity bean object for EJB 1.1 and EJB 2.1 beans.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the cmp element.
Table A–19 cmp Subelements
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. |
Specifies the database to be used for storing CMP beans.
This element is not implemented for GlassFish v3 Prelude.
enterprise-beans (sun-ejb-jar.xml)
The following table describes subelements for the cmp-resource element.
Table A–20 cmp-resource Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the absolute jndi-name of a JDBC resource. |
|
zero or one |
Specifies the default runtime bindings of a resource reference. |
|
zero or more |
Specifies a property name and value. Used to configure PersistenceManagerFactory properties. |
|
zero or one |
If true, specifies that database tables are created for beans that are automatically mapped by the EJB container. |
|
zero or one |
If true, specifies that database tables that were automatically created when the bean(s) were last deployed are dropped when the bean(s) are undeployed. |
|
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 use-unique-table-names property. |
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.
ejb (sun-ejb-jar.xml)
none - contains data
Specifies the commit option used on transaction completion. Valid values for the Enterprise Server are B or C. Default value is B. Applies to entity beans.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
none - contains data
Specifies if the target supports privacy-protected messages. The values are NONE, SUPPORTED, or REQUIRED.
transport-config (sun-ejb-jar.xml)
none - contains data
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.
cache-mapping (sun-web.xml)
The following table describes subelements for the constraint-field element.
Table A–21 constraint-field Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Contains a value to be matched to the input parameter value. |
The following table describes attributes for the constraint-field element.
Table A–22 constraint-field Attributes
Attribute |
Default |
Description |
---|---|---|
name |
none |
Specifies the input parameter name. |
request.parameter |
(optional) Specifies the scope from which the input parameter is retrieved. Allowed values are context.attribute, request.header, request.parameter, request.cookie, request.attribute, and session.attribute. |
|
true |
(optional) If true, caches the response if matching succeeds. Overrides the same attribute in a constraint-field-value subelement. |
|
false |
(optional) If true, caches the response if matching fails. Overrides the same attribute in a constraint-field-value subelement. |
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>
constraint-field (sun-web.xml)
none - contains data
The following table describes attributes for the constraint-field-value element.
Table A–23 constraint-field-value Attributes
Attribute |
Default |
Description |
---|---|---|
equals |
(optional) Specifies the type of comparison performed with the value. Allowed values are equals, not-equals, greater, lesser, and in-range. If match-expr is greater or lesser, the value must be a number. If match-expr is in-range, the value must be of the form n1-n2, where n1 and n2 are numbers. |
|
true |
(optional) If true, caches the response if matching succeeds. |
|
false |
(optional) If true, caches the response if matching fails. |
Contains the web context root for the web application. Overrides the corresponding element in the web.xml file.
sun-web-app (sun-web.xml)
none - contains data
Specifies session cookie properties.
session-config (sun-web.xml)
The following table describes subelements for the cookie-properties element.
Table A–24 cookie-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
The following table describes properties for the cookie-properties element.
Table A–25 cookie-properties Properties
Property |
Default |
Description |
---|---|---|
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 / (slash), the browser sends cookies to all URLs served by the Enterprise Server. You can set the path to a narrower mapping to limit the request URLs to which the browser sends cookies. |
|
-1 |
Specifies the expiration time (in seconds) after which the browser expires the cookie. |
|
(unset) |
Specifies the domain for which the cookie is valid. |
|
Sun GlassFish Enterprise Server Session Tracking Cookie |
Specifies the comment that identifies the session tracking cookie in the cookie file. Applications can provide a more specific comment for the cookie. |
|
dynamic |
Sets the Secure attribute of any JSESSIONID cookies associated with the web application. Allowed values are as follows:
To set the Secure attribute of a JSESSIONIDSSO cookie, use the ssoCookieSecure virtual-server property in the domain.xml file. For details, see virtual-server in Sun GlassFish Enterprise Server v3 Prelude Administration Reference. |
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 is not implemented for GlassFish v3 Prelude.
cmp-resource (sun-ejb-jar.xml)
none - contains data
Specifies the name of the database vendor for which tables can be created. Allowed values are javadb, db2, mssql, oracle, postgresql, pointbase, 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 is not implemented for GlassFish v3 Prelude.
cmp-resource (sun-ejb-jar.xml)
none - contains data
Specifies whether the debugging servlet is enabled for this web service endpoint. Allowed values are true (the default) and false.
webservice-endpoint (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Passes property values to the built-in default cache-helper class.
cache (sun-web.xml)
The following table describes subelements for the default-helper element.
Table A–26 default-helper Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
The following table describes properties for the default-helper element.
Table A–27 default-helper Properties
Property |
Default |
Description |
---|---|---|
Uses the built-in default cache-helper key generation, which concatenates the servlet path with key-field values, if any. |
The caching engine looks in the ServletContext for an attribute with a name equal to the value specified for this property to determine whether a customized CacheKeyGenerator implementation is used. An application can provide a customized key generator rather than using the default helper. See The CacheKeyGenerator Interface in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide. |
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 Sun JavaTM System Message Queue broker user repository.
resource-ref (sun-web.xml, sun-ejb-jar.xml); cmp-resource, mdb-connection-factory (sun-ejb-jar.xml)
The following table describes subelements for the default-resource-principal element.
Table A–28 default-resource-principal Subelements
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. |
Specifies a text description of the containing element.
property (with attributes) (sun-web.xml); activation-config, method (sun-ejb-jar.xml)
none - contains data
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 SRV.6.2.5 of the Servlet 2.4 specification for more information.
cache-mapping (sun-web.xml)
none - contains data
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 is not implemented for GlassFish v3 Prelude.
cmp-resource (sun-ejb-jar.xml)
none - contains data
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
enterprise-beans (sun-ejb-jar.xml)
The following table describes subelements for the ejb element.
Table A–29 ejb Subelements
Element |
Required |
Description |
---|---|---|
only one |
Matches the ejb-name in the corresponding ejb-jar.xml file. |
|
zero or more |
Specifies the absolute jndi-name. |
|
zero or more |
Maps the absolute JNDI name to the ejb-ref element in the corresponding Java EE XML file. |
|
zero or more |
Maps the absolute JNDI name to the resource-ref in the corresponding Java EE XML file. |
|
zero or more |
Maps the absolute JNDI name to the resource-env-ref in the corresponding Java EE XML file. |
|
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 run-as role specified. |
|
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 Java Message Service 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 checkpoint-at-end-of-method instead. |
|
zero or one |
Specifies that the stateful session bean state is checkpointed, or persisted, after the specified methods are executed. The availability-enabled attribute must be set to true. |
The following table describes attributes for the ejb element.
Table A–30 ejb Attributes
Attribute |
Default |
Description |
---|---|---|
false |
(optional) If set to true, and if availability is enabled in the EJB container, high-availability features apply to this bean if it is a stateful session bean. |
<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>
In the sun-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.
none - contains data
Maps the ejb-ref-name in the corresponding Java 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.
sun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml)
The following table describes subelements for the ejb-ref element.
Table A–31 ejb-ref Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the ejb-ref-name in the corresponding Java EE deployment descriptor file ejb-ref entry. |
|
only one |
Specifies the absolute jndi-name of a resource. |
Specifies the ejb-ref-name in the corresponding Java EE deployment descriptor file ejb-ref entry.
ejb-ref (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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.
webservice-endpoint (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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
Specifies all the runtime properties for an EJB JAR file in the application.
sun-ejb-jar (sun-ejb-jar.xml)
The following table describes subelements for the enterprise-beans element.
Table A–32 enterprise-beans Subelements
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. |
<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>
Specifies if the target is capable of authenticating a client. The values are NONE, SUPPORTED, or REQUIRED.
transport-config (sun-ejb-jar.xml)
none - contains data
Specifies if the target is capable of authenticating to a client. The values are NONE, SUPPORTED, or REQUIRED.
transport-config (sun-ejb-jar.xml)
none - contains data
Describes the finders for CMP 1.1 with a method name and query.
This element is not implemented for GlassFish v3 Prelude.
one-one-finders (sun-ejb-jar.xml)
The following table describes subelements for the finder element.
Table A–33 finder Subelements
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. |
Specifies the methods that force a database flush after execution. Applicable to entity beans.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the flush-at-end-of-method element.
Table A–34 flush-at-end-of-method Subelements
Element |
Required |
Description |
---|---|---|
one or more |
Specifies a bean method. |
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.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the gen-classes element.
Table A–35 gen-classes Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies the fully-qualified class name of the generated EJBObject impl class. |
|
zero or one |
Specifies the fully-qualified class name of the generated EJBLocalObject impl class. |
|
zero or one |
Specifies the fully-qualified class name of the generated EJBHome impl class. |
|
zero or one |
Specifies the fully-qualified class name of the generated EJBLocalHome impl class. |
Specifies a group name in the current realm.
security-role-mapping (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Specifies an HTTP method that is eligible for caching. The default is GET.
cache-mapping (sun-web.xml)
none - contains data
Specifies a URL pattern for idempotent requests.
sun-web-app (sun-web.xml)
none
The following table describes attributes for the idempotent-url-pattern element.
Table A–36 idempotent-url-pattern Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies a URL pattern, which can contain wildcards. The URL pattern must conform to the mappings specified in section SRV 11.2 of the Servlet 2.4 specification. |
|
-1 |
(optional) Specifies the number of times the load balancer retries an idempotent request. A value of -1 indicates infinite retries. |
The following example specifies that all requests for the URI sun-java/* are idempotent.
<idempotent-url-pattern url-pattern="sun_java/*" no-of-retries="10"/>
Specifies if the target supports integrity-protected messages. The values are NONE, SUPPORTED, or REQUIRED.
transport-config (sun-ejb-jar.xml)
none - contains data
Specifies the security information for the input-output redirection (IOR).
ejb (sun-ejb-jar.xml)
The following table describes subelements for the ior-security-config element.
Table A–37 ior-security-config Subelements
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 USERNAME_PASSWORD. |
|
zero or one |
Describes the sas-context fields. |
This element is deprecated. Do not use.
bean-cache (sun-ejb-jar.xml)
cmp (sun-ejb-jar.xml)
Specifies that this entity bean is a read-only bean if true. If this element is absent, the default value of false is used.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
none - contains data
Specifies a method.
This element is not implemented for GlassFish v3 Prelude.
message (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the java-method element.
Table A–38 java-method Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies a method name. |
|
zero or one |
Specifies fully qualified Java type names of method parameters. |
Specifies the durable subscription associated with a message-driven bean class. Only applies to the Java Message Service Topic Destination type, and only when the message-driven bean deployment descriptor subscription durability is Durable.
ejb (sun-ejb-jar.xml)
none - contains data
Specifies the maximum number of messages to load into a Java Message Service session at one time for a message-driven bean to serve. The default is 1.
ejb (sun-ejb-jar.xml)
none - contains data
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.
ejb-ref, message-destination, resource-env-ref, resource-ref (sun-web.xml, sun-ejb-jar.xml); cmp-resource, ejb, mdb-connection-factory (sun-ejb-jar.xml)
none - contains data
Specifies JSP configuration information.
sun-web-app (sun-web.xml)
The following table describes subelements for the jsp-config element.
Table A–39 jsp-config Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
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 to true and give modificationTestInterval 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.
Table A–40 jsp-config Properties
Property |
Default |
Description |
---|---|---|
0 |
If development is set to false and checkInterval is greater than zero, background compilations are enabled. The checkInterval is the time in seconds between checks to see if a JSP file needs to be recompiled. |
|
true |
Specifies whether the generated Java servlets are compiled with the debug option set (-g for javac). |
|
created dynamically based on the current web application |
Specifies the classpath to use when compiling generated servlets. |
|
javac |
Specifies the compiler Ant uses to compile JSP files. See the Ant documentation for more information: |
|
Depends on the Enterprise Server's Java runtime |
Specifies the JDK release with which source compatibility of the generated servlets is provided. Same as the -source release option of javac. For more information, see http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html#options. |
|
Depends on the Enterprise Server's Java runtime |
Specifies the Virtual Machine for the Java platform (JVMTM software) version for which the servlet class files are generated. Same as the -target release option of javac. For more information, see http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html#options. |
|
false |
If true, the default for the buffer attribute of the page directive is none. |
|
true |
If set to true, enables development mode, which allows JSP files to be checked for modification. Specify the frequency at which JSPs are checked using the modificationTestInterval property. |
|
false |
If set to true, dumps SMAP information for JSR 45 debugging to a file. Set to false if suppressSmap is true. |
|
true |
If set to true, tag handler pooling is enabled. |
|
false |
If set to true, all Tag Library Descriptor (TLD) files referenced by the web application are validated against their underlying schema or DTD file. |
|
false |
If set to true, issues an error when the value of the class attribute in a useBean action is not a valid bean class. |
|
true |
Specifies that Ant forks the compiling of JSP files, using a JVM machine separate from the one in which Tomcat is running. |
|
true |
If true, text strings are generated as bytes (encoded with the page encoding), if the page is not buffered. |
|
false |
If set to true, generates text strings as char arrays, which improves performance in some cases. |
|
* for all methods |
Specifies a comma separated list of HTTP methods supported by the JspServlet. |
|
clsid:8AD9C840-044E-11D1-B3E9-00805F499D93 |
Specifies the Java plug-in COM class ID for Internet Explorer. Used by the <jsp:plugin> tags. |
|
false |
If set to true, instructs the compiler to ignore any JSP precompilation errors pertaining to statically included JSP segments that, despite not being top level JSP files, use the .jsp or .jspx extension (instead of the recommended .jspf). |
|
32 |
Specifies the initial capacity of the HashMap that maps JSP files to their corresponding servlets. |
|
UTF8 |
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 UTF8. If that fails, it tries to use the javaEncoding value. For encodings, see: http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html |
|
true with JDK 5 and before and for jspc, otherwise false |
If set to true, keeps the generated Java files. If false, deletes the Java files. |
|
true |
If set to true, generates static content with one print statement per input line, to ease debugging. |
|
0 |
Specifies the frequency in seconds at which JSPs are checked for modification. A value of 0 causes the JSP to be checked on every access. Used only if development is set to true. |
|
0 |
Specifies the frequency in seconds at which JSP files are checked for modifications. Setting this value to 0 checks JSP files for modifications on every request. Setting this value to -1 disables checks for JSP modifications and JSP recompilation. |
|
true for jspc, otherwise false |
If true, generated byte code is saved to .class files? This option is meaningful only when the Java compiler API, JSR 199 (available with and used as the default on Java 6) is used for javac compilations. |
|
The default work directory for the web application |
Specifies the working directory created for storing all the generated code. |
|
false |
If set to true, generation of SMAP information for JSR 45 debugging is suppressed. |
|
false |
If set to true, trims white spaces in template text between actions or directives. |
|
false |
If set to true, an accessed JSP file is not compiled. Its precompiled servlet class is used instead. It is assumed that JSP files have been precompiled, and their corresponding servlet classes have been bundled in the web application’s WEB-INF/lib or WEB-INF/classes directory. |
|
true |
If set to true, the X-Powered-By response header is added by the generated servlet. |
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 2.4 specification, section SRV 4.4, for details on the Servlet Path.
cache-mapping (sun-web.xml)
none
The following table describes attributes for the key-field element.
Table A–41 key-field Attributes
Attribute |
Default |
Description |
---|---|---|
name |
none |
Specifies the input parameter name. |
request.parameter |
(optional) Specifies the scope from which the input parameter is retrieved. Allowed values are context.attribute, request.header, request.parameter, request.cookie, session.id, and session.attribute. |
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.
This element is not implemented for GlassFish v3 Prelude.
gen-classes (sun-ejb-jar.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
gen-classes (sun-ejb-jar.xml)
none - contains data
Deprecated. For backward compatibility only. Use the parameter-encoding subelement of sun-web-app instead. Specifies information about the application’s internationalization settings.
sun-web-app (sun-web.xml)
The following table describes subelements for the locale-charset-info element.
Table A–42 locale-charset-info Subelements
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 parameter-encoding is defined. |
|
zero or one |
Determines the default request character encoding and how the web container decodes parameters from forms according to a hidden field value. |
The following table describes attributes for the locale-charset-info element.
Table A–43 locale-charset-info Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Although a value is required, the value is ignored. Use the default-charset attribute of the parameter-encoding element. |
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 http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html.
locale-charset-info (sun-web.xml)
The following table describes subelements for the locale-charset-map element.
Table A–44 locale-charset-map Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies an optional text description of a mapping. |
The following table describes attributes for the locale-charset-map element.
Table A–45 locale-charset-map Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the locale name. |
|
none |
(optional) Specifies the type of client that interacts with the application 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 user-agent HTTP request header sent by the client. See Table A–46 for more information. |
|
none |
Specifies the character encoding to which the locale maps. |
The following table specifies example agent attribute values.
Table A–46 Example agent Attribute Values
Agent |
user-agent Header and agent Attribute Value |
---|---|
Internet Explorer 5.00 for Windows 2000 |
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) |
Netscape 4.7.7 for Windows 2000 |
Mozilla/4.77 [en] (Windows NT 5.0; U) |
Netscape 4.7 for Solaris |
Mozilla/4.7 [en] (X11; u; Sun OS 5.6 sun4u) |
Specifies the local part of a QNAME.
service-qname, wsdl-port (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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.
webservice-endpoint (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the login-config element.
Table A–47 login-config subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the authentication method. |
|
zero or one |
Specifies the name of the realm used to process all authentication requests. |
Specifies session manager properties.
session-manager (sun-web.xml)
The following table describes subelements for the manager-properties element.
Table A–48 manager-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
The following table describes properties for the manager-properties element.
Table A–49 manager-properties Properties
Property |
Default |
Description |
---|---|---|
60 |
Specifies the number of seconds between checks for expired sessions. This is also the interval at which sessions are passivated if maxSessions is exceeded. If persistenceFrequency is set to time-based, active sessions are stored at this interval. 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 (1 second) for a hit counter servlet on a frequently accessed web site, or the last few hits might be lost each time the server is restarted. Applicable only if the persistence-type attribute of the parent session-manager element is file or replicated. Note – The replicated persistence type is not supported in GlassFish v3 Prelude. |
|
-1 |
Specifies the maximum number of sessions that are permitted in the cache, or -1 for no limit. After this, an attempt to create a new session causes an IllegalStateException to be thrown. |
|
One of the following: domain-dir/generated/jsp/module-name/context-path_SESSIONS.ser domain-dir/generated/jsp/app-name/module-name/context-path_SESSIONS.ser |
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. To disable preservation of the session state, set this property's value to an empty string. Applicable only if the persistence-type attribute of the parent session-manager element is memory. To disable this behavior and not preserve the session state, specify an empty string as the value of this property. |
|
web-method |
Specifies how often the session state is stored. Allowed values are as follows:
Applicable only if the persistence-type attribute of the parent session-manager element is replicated. Note – The replicated persistence type is not supported in GlassFish v3 Prelude. |
This element is not implemented.
cmp (sun-ejb-jar.xml)
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.
This element is not implemented for GlassFish v3 Prelude.
bean-cache (sun-ejb-jar.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
bean-pool (sun-ejb-jar.xml)
none - contains data
This element is deprecated. Do not use.
bean-pool (sun-ejb-jar.xml)
Specifies the connection factory associated with a message-driven bean. Queue or Topic type must be consistent with the Java Message Service Destination type associated with the message-driven bean class.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the mdb-connection-factory element.
Table A–50 mdb-connection-factory Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the absolute jndi-name. |
|
zero or one |
Specifies the default sign-on (name/password) to the resource manager. |
Specifies runtime configuration information for a message-driven bean.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the mdb-resource-adapter element.
Table A–51 mdb-resource-adapter subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies a resource adapter module ID. |
|
one or more |
Specifies an activation configuration. |
Specifies the methods or operations to which message security requirements apply.
This element is not implemented for GlassFish v3 Prelude.
message-security (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the message element.
Table A–52 message Subelements
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. |
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 Java EE deployment descriptor file. Use when the message destination reference in the corresponding Java EE deployment descriptor file specifies a message-destination-link to a logical message-destination.
sun-web-app (sun-web.xml), enterprise-beans (sun-ejb-jar.xml)
The following table describes subelements for the message-destination element.
Table A–53 message-destination subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the name of a logical message destination defined within the corresponding Java EE deployment descriptor file. |
|
only one |
Specifies the jndi-name of the associated entity. |
Specifies the name of a logical message destination defined within the corresponding Java EE deployment descriptor file.
message-destination (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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 Java EE deployment descriptor file does not specify a message-destination-link to a logical message-destination.
sun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml)
The following table describes subelements for the message-destination-ref element.
Table A–54 message-destination-ref subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the name of a physical message destination defined within the corresponding Java EE deployment descriptor file. |
|
only one |
Specifies the jndi-name of the associated entity. |
Specifies the name of a physical message destination defined within the corresponding Java EE deployment descriptor file.
message-destination-ref (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
message-security-binding (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the message-security element.
Table A–55 message-security Subelements
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. |
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
This element is not implemented for GlassFish v3 Prelude.
webservice-endpoint, port-info (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the message-security-binding element.
Table A–56 message-security-binding Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies message security requirements. |
The following table describes attributes for the message-security-binding element.
Table A–57 message-security-binding Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the message layer at which authentication is performed. The value must be SOAP. |
|
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-binding are not enforced. |
Specifies a bean method.
This element is not implemented for GlassFish v3 Prelude.
checkpoint-at-end-of-method, flush-at-end-of-method (sun-ejb-jar.xml)
The following table describes subelements for the method element.
Table A–58 method Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies an optional text description. |
|
zero or one |
Matches the ejb-name in the corresponding ejb-jar.xml file. |
|
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. |
Specifies the method interface to distinguish between methods with the same name in different interfaces. Allowed values are Home, Remote, LocalHome, and Local.
This element is not implemented for GlassFish v3 Prelude.
method (sun-ejb-jar.xml)
none - contains data
Specifies a method name or * (an asterisk) for all methods. If a method is overloaded, specifies all methods with the same name.
This element is not implemented for GlassFish v3 Prelude.
java-method (sun-web.xml, sun-ejb-jar.xml); finder, query-method , method (sun-ejb-jar.xml)
none - contains data
<method-name>findTeammates</method-name>
<method-name>*</method-name>
Specifies the fully qualified Java type name of a method parameter.
This element is not implemented for GlassFish v3 Prelude.
method-params (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Specifies fully qualified Java type names of method parameters.
This element is not implemented for GlassFish v3 Prelude.
java-method (sun-web.xml, sun-ejb-jar.xml); query-method, method (sun-ejb-jar.xml)
The following table describes subelements for the method-params element.
Table A–59 method-params Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies the fully qualified Java type name of a method parameter. |
Specifies the name of the entity.
call-property, default-resource-principal, stub-property (sun-web.xml, sun-ejb-jar.xml); enterprise-beans, principal, property (with subelements) (sun-ejb-jar.xml)
none - contains data
Specifies the namespace URI.
service-qname, wsdl-port (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Describes the finders for CMP 1.1 beans.
This element is not implemented for GlassFish v3 Prelude.
cmp (sun-ejb-jar.xml)
The following table describes subelements for the one-one-finders element.
Table A–60 one-one-finders Subelements
Element |
Required |
Description |
---|---|---|
one or more |
Describes the finders for CMP 1.1 with a method name and query. |
Specifies the WSDL name of an operation of a web service.
This element is not implemented for GlassFish v3 Prelude.
message (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Specifies the default request character encoding and how the web container decodes parameters from forms according to a hidden field value.
If both the sun-web-app and locale-charset-info elements have parameter-encoding subelements, the subelement of sun-web-app takes precedence. For encodings, see http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html.
locale-charset-info, sun-web-app (sun-web.xml)
none
The following table describes attributes for the parameter-encoding element.
Table A–61 parameter-encoding Attributes
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 EJB 2.1 specification, section 5.4, 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 EJB 2.1 specification, section 5.4. 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 the Enterprise 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.
ejb (sun-ejb-jar.xml)
none - contains data
Specifies the password for the principal.
default-resource-principal (sun-web.xml, sun-ejb-jar.xml)
none - contains data
This element and its subelements are deprecated. Do not use.
enterprise-beans (sun-ejb-jar.xml)
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.
This element is not implemented for GlassFish v3 Prelude.
bean-pool (sun-ejb-jar.xml)
none - contains data
Specifies a unique name for a port component within a web or EJB module.
webservice-endpoint (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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.
service-ref (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the port-info element.
Table A–62 port-info subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies the web service reference name relative to java:comp/env. |
|
zero or one |
Specifies the WSDL port. |
|
zero or more |
Specifies JAX-RPC property values that are set on a javax.xml.rpc.Stub object before it is returned to the web service client. |
|
zero or more |
Specifies JAX-RPC property values that are set on a javax.xml.rpc.Call object before it is returned to the web service client. |
|
zero or one |
Specifies a custom authentication provider binding. |
Disables prefetching of entity bean states for the specified query methods.
This element is not implemented for GlassFish v3 Prelude.
cmp (sun-ejb-jar.xml)
The following table describes subelements for the prefetch-disabled element.
Table A–63 prefetch-disabled Subelements
Element |
Required |
Description |
---|---|---|
one or more |
Specifies a query method. |
Defines a node that specifies a user name on the platform.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the principal element.
Table A–64 principal Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the name of the user. |
Contains the principal (user) name.
In an enterprise bean, specifies the principal (user) name that has the run-as role specified.
security-role-mapping (sun-web.xml, sun-ejb-jar.xml), servlet (sun-web.xml)
none - contains data
The following table describes attributes for the principal-name element.
Table A–65 principal-name Attributes
Attribute |
Default |
Description |
---|---|---|
com.sun.enterprise.deployment.PrincipalImpl |
(optional) Specifies the custom principal implementation class corresponding to the named principal. |
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 Enterprise Server
Needed by a system or object that Enterprise Server doesn’t have knowledge of, such as an LDAP server or a Java class
cache, cache-helper, class-loader, cookie-properties, default-helper, manager-properties, session-properties, store-properties, sun-web-app, webservice-endpoint (sun-web.xml)
The following table describes subelements for the property element.
Table A–66 property Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies an optional text description of a property. |
The following table describes attributes for the property element.
Table A–67 property Attributes
Attribute |
Default |
Description |
---|---|---|
name |
none |
Specifies the name of the property. |
none |
Specifies the value of the property. |
<property name="reapIntervalSeconds" value="20" />
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 Enterprise Server
Needed by a system or object that Enterprise Server doesn’t have knowledge of, such as an LDAP server or a Java class
cmp-resource, schema-generator-properties, webservice-endpoint (sun-ejb-jar.xml)
The following table describes subelements for the property element.
Table A–68 property subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the name of the property. |
|
only one |
Specifies the value of the property. |
<property> <name>use-unique-table-names</name> <value>true</value> </property>
Specifies the query filter for the CMP 1.1 finder.
This element is not implemented for GlassFish v3 Prelude.
finder (sun-ejb-jar.xml)
none - contains data
Specifies a query method.
This element is not implemented for GlassFish v3 Prelude.
prefetch-disabled (sun-ejb-jar.xml)
The following table describes subelements for the query-method element.
Table A–69 query-method Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies a method name. |
|
only one |
Specifies the fully qualified Java type names of method parameters. |
Specifies the query ordering for the CMP 1.1 finder.
This element is not implemented for GlassFish v3 Prelude.
finder (sun-ejb-jar.xml)
none - contains data
Specifies the query parameters for the CMP 1.1 finder.
This element is not implemented for GlassFish v3 Prelude.
finder (sun-ejb-jar.xml)
none - contains data
Specifies variables in the query expression for the CMP 1.1 finder.
This element is not implemented for GlassFish v3 Prelude.
finder (sun-ejb-jar.xml)
none - contains data
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 Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.
as-context, login-config (sun-ejb-jar.xml)
none - contains data
Specifies a field that gives the application component a programmatic way to refresh a cached entry.
cache-mapping (sun-web.xml)
none
The following table describes attributes for the refresh-field element.
Table A–70 refresh-field Attributes
Attribute |
Default |
Description |
---|---|---|
name |
none |
Specifies the input parameter name. |
request.parameter |
(optional) Specifies the scope from which the input parameter is retrieved. Allowed values are context.attribute, request.header, request.parameter, request.cookie, session.id, and session.attribute. |
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).
ejb (sun-ejb-jar.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
bean-cache (sun-ejb-jar.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
gen-classes (sun-ejb-jar.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
gen-classes (sun-ejb-jar.xml)
none - contains data
Defines the authentication policy requirements of the application’s request processing.
This element is not implemented for GlassFish v3 Prelude.
message-security (sun-web.xml, sun-ejb-jar.xml)
none
The following table describes attributes for the request-protection element.
Table A–71 request-protection Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the type of required authentication, either sender (user name and password) or content (digital signature). |
|
none |
Specifies whether recipient authentication occurs before or after content authentication. Allowed values are before-content and after-content. |
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).
as-context (sun-ejb-jar.xml)
none - contains data
Specifies the res-ref-name in the corresponding Java 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.
resource-ref (sun-web.xml, sun-ejb-jar.xml)
none - contains data
This element is not implemented for GlassFish v3 Prelude.
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 than steady-pool-size minus resize-quantity of beans, then resize-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 the victim-selection-policy. In addition, the cache-idle-timeout-in-seconds or removal-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, the pool-idle-timeout-in-seconds timer removes beans until steady-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.
bean-cache, bean-pool (sun-ejb-jar.xml)
none - contains data
Specifies the module ID of the resource adapter that is responsible for delivering messages to the message-driven bean.
mdb-resource-adapter (sun-ejb-jar.xml)
none - contains data
Maps the res-ref-name in the corresponding Java EE deployment descriptor file resource-env-ref entry to the absolute jndi-name of a resource.
sun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml))
The following table describes subelements for the resource-env-ref element.
Table A–72 resource-env-ref Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the res-ref-name in the corresponding Java EE deployment descriptor file resource-env-ref entry. |
|
only one |
Specifies the absolute jndi-name of a resource. |
<resource-env-ref> <resource-env-ref-name>jms/StockQueueName</resource-env-ref-name> <jndi-name>jms/StockQueue</jndi-name> </resource-env-ref>
Specifies the res-ref-name in the corresponding Java EE deployment descriptor file resource-env-ref entry.
resource-env-ref (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Maps the res-ref-name in the corresponding Java 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 the Enterprise 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 Sun GlassFish Message Queue, the default-resource-principal (name/password) must exist in the Message Queue user repository.
sun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml)
The following table describes subelements for the resource-ref element.
Table A–73 resource-ref Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the res-ref-name in the corresponding Java EE deployment descriptor file resource-ref entry. |
|
only one |
Specifies the absolute jndi-name of a resource. |
|
zero or one |
Specifies the default principal (user) for the resource. |
<resource-ref> <res-ref-name>jdbc/EmployeeDBName</res-ref-name> <jndi-name>jdbc/EmployeeDB</jndi-name> </resource-ref>
Defines the authentication policy requirements of the application’s response processing.
This element is not implemented for GlassFish v3 Prelude.
message-security (sun-web.xml, sun-ejb-jar.xml)
none
The following table describes attributes for the response-protection element.
Table A–74 response-protection Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the type of required authentication, either sender (user name and password) or content (digital signature). |
|
none |
Specifies whether recipient authentication occurs before or after content authentication. Allowed values are before-content and after-content. |
Contains the role-name in the security-role element of the corresponding Java EE deployment descriptor file.
security-role-mapping (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Describes the sas-context fields.
ior-security-config (sun-ejb-jar.xml)
The following table describes subelements for the sas-context element.
Table A–75 sas-context Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies whether the target accepts propagated caller identities. The values are NONE, SUPPORTED, or REQUIRED. |
Specifies field-specific column attributes in property subelements.
This element is not implemented for GlassFish v3 Prelude.
cmp-resource (sun-ejb-jar.xml)
The following table describes subelements for the schema-generator-properties element.
Table A–76 schema-generator-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property name and value. |
The following table describes properties for the schema-generator-properties element.
Table A–77 schema-generator-properties Properties
Property |
Default |
Description |
---|---|---|
false |
Specifies that generated table names are unique within each application server domain. |
|
bean-name.field-name.attribute |
none |
Defines a column attribute. For attribute descriptions, see Table A–78. |
The following table lists the column attributes for properties defined in the schema-generator-properties element.
Table A–78 schema-generator-properties Column Attributes
Attribute |
Description |
---|---|
jdbc-type |
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. |
jdbc-maximum-length |
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 jdbc-maximum-length of 32 on a CMP String field such as firstName normally results in a column definition such as VARCHAR(32). But if the jdbc-type is CLOB and you are deploying on Oracle, the resulting column definition is CLOB. No length is given, because in an Oracle database, a CLOB has no length. |
jdbc-precision |
Specifies the maximum number of digits stored in a column which represents a numeric type. |
jdbc-scale |
Specifies the number of digits stored to the right of the decimal point in a column that represents a floating point number. |
jdbc-nullable |
Specifies whether the column generated for the CMP field allows null values. |
<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>
Maps roles to users or groups in the currently active realm. See Realm Configuration in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.
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.
sun-web-app (sun-web.xml), sun-ejb-jar (sun-ejb-jar.xml)
The following table describes subelements for the security-role-mapping element.
Table A–79 security-role-mapping Subelements
Element |
Required |
Description |
---|---|---|
only one |
Contains the role-name in the security-role element of the corresponding Java EE deployment descriptor file. |
|
one or more if no group-name, otherwise zero or more |
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 principal-name, otherwise zero or more |
Contains a group name in the current realm. |
Specifies the web service reference name relative to java:comp/env.
port-info (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Specifies the name of the generated service implementation class.
service-ref (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Specifies the WSDL service element that is being referred to.
service-ref (sun-web.xml, sun-ejb-jar.xml); webservice-endpoint (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the service-qname element.
Table A–80 service-qname subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the namespace URI. |
|
only one |
Specifies the local part of a QNAME. |
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 Java EE deployment descriptor
sun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml)
The following table describes subelements for the service-ref element.
Table A–81 service-ref subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the web service reference name relative to java:comp/env. |
|
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 javax.xml.rpc.Call object before it is returned to the web service client. |
|
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. |
Specifies the web service reference name relative to java:comp/env.
service-ref (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Specifies a principal name for a servlet. Used for the run-as role defined in web-xml.
sun-web-app (sun-web.xml)
The following table describes subelements for the servlet element.
Table A–82 servlet Subelements
Element |
Required |
Description |
---|---|---|
only one |
Contains the name of a servlet, which is matched to a servlet-name in web.xml. |
|
zero or one |
Contains a principal (user) name in the current realm. |
|
zero or more |
Specifies information about a web service endpoint. |
Specifies the automatically generated name of the servlet implementation class.
webservice-endpoint (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Specifies the name of a servlet, which is matched to a servlet-name in web.xml. This name must be present in web.xml.
cache-mapping, servlet (sun-web.xml)
none - contains data
Specifies session configuration information. Overrides the web container settings for an individual web module.
sun-web-app (sun-web.xml)
The following table describes subelements for the session-config element.
Table A–83 session-config Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies session manager configuration information. |
|
zero or one |
Specifies session properties. |
|
zero or one |
Specifies session cookie properties. |
Specifies session manager information.
session-config (sun-web.xml)
The following table describes subelements for the session-manager element.
Table A–84 session-manager Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies session manager properties. |
|
zero or one |
Specifies session persistence (storage) properties. |
The following table describes attributes for the session-manager element.
Table A–85 session-manager Attributes
Attribute |
Default |
Description |
---|---|---|
memory |
(optional) Specifies the session persistence mechanism. Allowed values are memory, file, and replicated. Note – The replicated persistence type is not supported in GlassFish v3 Prelude. |
Specifies session properties.
session-config (sun-web.xml)
The following table describes subelements for the session-properties element.
Table A–86 session-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
The following table describes properties for the session-properties element.
Table A–87 session-properties Properties
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.
This element is not implemented for GlassFish v3 Prelude.
bean-pool (sun-ejb-jar.xml)
none - contains data
Specifies session persistence (storage) properties.
session-manager (sun-web.xml)
The following table describes subelements for the store-properties element.
Table A–88 store-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
The following table describes properties for the store-properties element.
Table A–89 store-properties Properties
Property |
Default |
Description |
---|---|---|
domain-dir/generated/jsp/app-name/module-name_war |
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 persistence-type attribute of the parent session-manager element is file. |
|
session |
Specifies how much of the session state is stored. Allowed values are as follows:
Applicable only if the persistence-type attribute of the parent session-manager element is replicated. Note – The replicated persistence type is not supported in GlassFish v3 Prelude. |
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.
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.
port-info (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the stub-property element.
Table A–90 stub-property subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the name of the entity. |
|
only one |
Specifies the value of the entity. |
The following table describes properties for the stub-property element.
Table A–91 stub-property properties
Property |
Default |
Description |
---|---|---|
true |
Determines whether the visibility of this endpoint as a Java Business Integration service is enabled or disabled. |
<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>
Defines the Enterprise Server specific configuration for an EJB JAR file. This is the root element; there can only be one sun-ejb-jar element in a sun-ejb-jar.xml file. See The sun-ejb-jar.xml File.
none
The following table describes subelements for the sun-ejb-jar element.
Table A–92 sun-ejb-jar Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Maps a role in the corresponding Java EE XML file to a user or group. |
|
only one |
Describes all the runtime properties for an EJB JAR file in the application. |
Defines Enterprise Server specific configuration for a web module. This is the root element; there can only be one sun-web-app element in a sun-web.xml file. See The sun-web.xml File.
none
The following table describes subelements for the sun-web-app element.
Table A–93 sun-web-app Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Contains the web context root for the web application. |
|
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 run-as role defined in web.xml. |
|
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 ejb-ref in the corresponding Java EE XML file. |
|
zero or more |
Maps the absolute JNDI name to the resource-ref in the corresponding Java EE XML file. |
|
zero or more |
Maps the absolute JNDI name to the resource-env-ref in the corresponding Java EE XML file. |
|
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 parameter-encoding subelement of sun-web-app instead. |
|
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 the name of a logical message destination. |
|
zero or more |
Specifies a name and optional publish location for a web service. |
The following table describes attributes for the sun-web-app element.
Table A–94 sun-web-app Attributes
Attribute |
Default |
Description |
---|---|---|
(blank) |
(optional) Not implemented. Do not use. |
|
none |
(optional) Specifies the HttpServlet message layer provider that the web container's servlet auth-constraint processing calls. |
The following table describes properties for the sun-web-app element.
Table A–95 sun-web-app Properties
Property |
Default |
Description |
---|---|---|
false |
If true, resources in this web application that are symbolic links are served. You can also define this property for a virtual server. Web applications on the virtual server that do not define this property use the virtual server's value. For details, see virtual-server in Sun GlassFish Enterprise Server v3 Prelude Administration Reference. Caution – Setting this property to true on Windows systems exposes JSP source code. |
|
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. <property name="alternatedocroot_1" value="from=/my.jpg dir=/srv/images/jpg"/> <property name="alternatedocroot_2" value="from=*.jpg dir=/srv/images/jpg"/> <property name="alternatedocroot_3" value="from=/jpg/* dir=/src/images"/> The value of each alternate docroot has two components: The first component, from, specifies the alternate docroot's URI pattern, and the second component, dir, specifies the alternate docroot's physical location (directory). Spaces are allowed in the dir component. You can set this property for all the web applications on a specific virtual server. For details, see virtual-server in Sun GlassFish Enterprise Server v3 Prelude Administration Reference. |
|
none |
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 Enterprise Server releases, or the org.glassfish.web.valve.GlassFishValve interface from the current Enterprise Server release. For example: <property name="valve_1" value="org.glassfish.extension.Valve"/> You can set this property for all the web applications on a specific virtual server. For details, see virtual-server in Sun GlassFish Enterprise Server v3 Prelude Administration Reference. |
|
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: <property name="listener_1" value="org.glassfish.extension.MyLifecycleListener"/> You can set this property for all the web applications on a specific virtual server. For details, see virtual-server in Sun GlassFish Enterprise Server v3 Prelude Administration Reference. |
|
true |
If true, allows this web application to access the contexts of other web applications using the ServletContext.getContext()method. |
|
false |
If true, allows this web application to send a relative URL to the client using HttpServletResponse.sendRedirect(), and instructs the web container not to translate any relative URLs to fully qualified ones. |
|
false |
If true, sessions generated for this web application use the session ID specified in the request. |
|
true |
Set this property to false to ensure that for this web application file downloads using SSL work properly in Internet Explorer. You can set this property for all the web applications on a specific virtual server. For details, see virtual-server in Sun GlassFish Enterprise Server v3 Prelude Administration Reference. |
|
5 |
Specifies the maximum number of servlet instances allocated for each SingleThreadModel servlet in the web application. |
|
domain-dir/generated/app-name or domain-dir/generated/module-name |
Specifies a temporary directory for use by this web module. This value is used to construct the value of the javax.servlet.context.tempdir context attribute. Compiled JSP files are also placed in this directory. |
|
false |
If true, response headers are encoded using the response’s charset instead of the default (UTF-8). |
Specifies the automatically generated name of a tie implementation class for a port component.
webservice-endpoint (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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.
cache-mapping (sun-web.xml)
none - contains data
The following table describes attributes for the timeout element.
Table A–96 timeout Attributes
Attribute |
Default |
Description |
---|---|---|
name |
none |
Specifies the timeout input parameter, whose value is interpreted in seconds. The field’s type must be java.lang.Long or java.lang.Integer. |
request.attribute |
(optional) Specifies the scope from which the input parameter is retrieved. Allowed values are context.attribute, request.header, request.parameter, request.cookie, request.attribute, and session.attribute. |
Specifies the security transport information.
ior-security-config (sun-ejb-jar.xml)
The following table describes subelements for the transport-config element.
Table A–97 transport-config Subelements
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. |
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.
webservice-endpoint (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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.
enterprise-beans (sun-ejb-jar.xml)
none - contains data
Specifies a servlet URL pattern for which caching is enabled. See the Servlet 2.4 specification section SRV. 11.2 for applicable patterns.
cache-mapping (sun-web.xml)
none - contains data
Specifies the thread pool from which threads are selected for remote invocations of this bean.
This element is not implemented for GlassFish v3 Prelude.
ejb (sun-ejb-jar.xml)
none - contains data
Specifies the value of the entity.
call-property, stub-property (sun-web.xml, sun-ejb-jar.xml); property (with subelements) (sun-ejb-jar.xml)
none - contains data
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.
This element is not implemented for GlassFish v3 Prelude.
bean-cache (sun-ejb-jar.xml)
none - contains data
<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.
Specifies a name and optional publish location for a web service.
sun-web-app (sun-web.xml), enterprise-beans (sun-ejb-jar.xml)
The following table describes subelements for the webservice-description element.
Table A–98 webservice-description subelements
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. |
Specifies a unique name for the web service within a web or EJB module.
webservice-description (sun-web.xml, sun-ejb-jar.xml)
none - contains data
Specifies information about a web service endpoint.
servlet (sun-web.xml), ejb (sun-ejb-jar.xml)
The following table describes subelements for the webservice-endpoint element.
Table A–99 webservice-endpoint subelements
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 NONE, INTEGRAL, or CONFIDENTIAL. |
|
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 true and false (the default). |
|
property (with attributes) (sun-web.xml) property (with subelements) (sun-ejb-jar.xml) |
zero or more |
Specifies a property, which has a name and a value. |
Specifies a valid URL pointing to a final WSDL document. If not specified, the WSDL document associated with the service-ref in the standard Java EE deployment descriptor is used.
service-ref (sun-web.xml, sun-ejb-jar.xml)
none - contains data
// available via HTTP <wsdl-override>http://localhost:8000/myservice/myport?WSDL</wsdl-override>
// in a file <wsdl-override>file:/home/user1/myfinalwsdl.wsdl</wsdl-override>
Specifies the WSDL port.
port-info (sun-web.xml, sun-ejb-jar.xml)
The following table describes subelements for the wsdl-port element.
Table A–100 wsdl-port subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the namespace URI. |
|
only one |
Specifies the local part of a QNAME. |
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).
webservice-description (sun-web.xml, sun-ejb-jar.xml)
none - contains data
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 sun-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.