Contained WithinFind More DocumentationFeatured Support Resources | Scarica il manuale in formato PDF (1095 KB)
Appendix A Deployment Descriptor FilesThis chapter describes deployment descriptor files specific to the Sun GlassFish Enterprise Server in the following sections: Note – 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. Note – 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 Java System Application Server DescriptorsSun GlassFish Enterprise Server uses optional deployment descriptors in addition to the Java EE standard descriptors for configuring features specific to the Enterprise Server. Note – 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. Note – 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
Note – 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 sun-web.xml FileThe 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 sun-ejb-jar.xml FileThe 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 Note – 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> Alphabetical Listing of All ElementsAactivation-configSpecifies 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. Superelementsmdb-resource-adapter (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the activation-config element. Table A–2 activation-config subelements
activation-config-propertySpecifies the name and value of an activation configuration property. Superelementsactivation-config (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the activation-config-property element. Table A–3 activation-config-property subelements
activation-config-property-nameSpecifies the name of an activation configuration property. Superelementsactivation-config-property (sun-ejb-jar.xml) Subelementsnone - contains data activation-config-property-valueSpecifies the value of an activation configuration property. Superelementsactivation-config-property (sun-ejb-jar.xml) Subelementsnone - contains data as-contextSpecifies the authentication mechanism used to authenticate the client. Superelementsior-security-config (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the as-context element. Table A–4 as-context Subelements
auth-methodSpecifies 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. Superelementslogin-config (sun-web.xml), as-context (sun-ejb-jar.xml) Subelementsnone - contains data Bbean-cacheSpecifies the entity bean cache properties. Used for entity beans and stateful session beans. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the bean-cache element. Table A–5 bean-cache Subelements
Example<bean-cache>
<max-cache-size>100</max-cache-size>
<cache-resize-quantity>10</cache-resize-quantity>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
<cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
<removal-timeout-in-seconds>5400</removal-timeout-in-seconds>
</bean-cache>
bean-poolSpecifies the pool properties of stateless session beans, entity beans, and message-driven bean. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the bean-pool element. Table A–6 bean-pool Subelements
Example<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> CcacheConfigures caching for web application components. Superelementssun-web-app (sun-web.xml) SubelementsThe following table describes subelements for the cache element. Table A–7 cache Subelements
AttributesThe following table describes attributes for the cache element. Table A–8 cache Attributes
PropertiesThe following table describes properties for the cache element. Table A–9 cache Properties
Cache Class NamesThe following table lists possible values of the cacheClassName property. Table A–10 cacheClassName Values
cache-helperSpecifies a class that implements the com.sun.appserv.web.cache.CacheHelper interface. Superelementscache (sun-web.xml) SubelementsThe following table describes subelements for the cache-helper element. Table A–11 cache-helper Subelements
AttributesThe following table describes attributes for the cache-helper element. Table A–12 cache-helper Attributes
cache-helper-refSpecifies the name of the cache-helper used by the parent cache-mapping element. Superelementscache-mapping (sun-web.xml) Subelementsnone - contains data cache-idle-timeout-in-secondsSpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsbean-cache (sun-ejb-jar.xml) Subelementsnone - contains data cache-mappingMaps a URL pattern or a servlet name to its cacheability constraints. Superelementscache (sun-web.xml) SubelementsThe following table describes subelements for the cache-mapping element. Table A–13 cache-mapping Subelements
call-propertySpecifies 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. Superelementsport-info, service-ref (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the call-property element. Table A–14 call-property subelements
caller-propagationSpecifies whether the target accepts propagated caller identities. The values are NONE, SUPPORTED, or REQUIRED. Superelementssas-context (sun-ejb-jar.xml) Subelementsnone - contains data checkpoint-at-end-of-methodSpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the checkpoint-at-end-of-method element. Table A–15 checkpoint-at-end-of-method Subelements
checkpointed-methodsDeprecated. Supported for backward compatibility. Use checkpoint-at-end-of-method instead. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) class-loaderConfigures the class loader for the web module. Superelementssun-web-app (sun-web.xml) SubelementsThe following table describes subelements for the class-loader element. Table A–16 class-loader Subelements
AttributesThe following table describes attributes for the class-loader element. Table A–17 class-loader Attributes
Note – 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. PropertiesThe following table describes properties for the class-loader element. Table A–18 class-loader Properties
cmpDescribes runtime information for a CMP entity bean object for EJB 1.1 and EJB 2.1 beans. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the cmp element. Table A–19 cmp Subelements
cmp-resourceSpecifies the database to be used for storing CMP beans. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsenterprise-beans (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the cmp-resource element. Table A–20 cmp-resource Subelements
cmt-timeout-in-secondsOverrides 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. Superelementsejb (sun-ejb-jar.xml) Subelementsnone - contains data commit-optionSpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) Subelementsnone - contains data confidentialitySpecifies if the target supports privacy-protected messages. The values are NONE, SUPPORTED, or REQUIRED. Superelementstransport-config (sun-ejb-jar.xml) Subelementsnone - contains data constraint-fieldSpecifies 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. Superelementscache-mapping (sun-web.xml) SubelementsThe following table describes subelements for the constraint-field element. Table A–21 constraint-field Subelements
AttributesThe following table describes attributes for the constraint-field element. Table A–22 constraint-field Attributes
constraint-field-valueSpecifies 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> Superelementsconstraint-field (sun-web.xml) Subelementsnone - contains data AttributesThe following table describes attributes for the constraint-field-value element. Table A–23 constraint-field-value Attributes
context-rootContains the web context root for the web application. Overrides the corresponding element in the web.xml file. Superelementssun-web-app (sun-web.xml) Subelementsnone - contains data cookie-propertiesSpecifies session cookie properties. Superelementssession-config (sun-web.xml) SubelementsThe following table describes subelements for the cookie-properties element. Table A–24 cookie-properties Subelements
PropertiesThe following table describes properties for the cookie-properties element. Table A–25 cookie-properties Properties
create-tables-at-deploySpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementscmp-resource (sun-ejb-jar.xml) Subelementsnone - contains data Ddatabase-vendor-nameSpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementscmp-resource (sun-ejb-jar.xml) Subelementsnone - contains data debugging-enabledSpecifies whether the debugging servlet is enabled for this web service endpoint. Allowed values are true (the default) and false. Superelementswebservice-endpoint (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data default-helperPasses property values to the built-in default cache-helper class. Superelementscache (sun-web.xml) SubelementsThe following table describes subelements for the default-helper element. Table A–26 default-helper Subelements
PropertiesThe following table describes properties for the default-helper element. Table A–27 default-helper Properties
default-resource-principalSpecifies 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. Superelementsresource-ref (sun-web.xml, sun-ejb-jar.xml); cmp-resource, mdb-connection-factory (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the default-resource-principal element. Table A–28 default-resource-principal Subelements
descriptionSpecifies a text description of the containing element. Superelementsproperty (with attributes) (sun-web.xml); activation-config, method (sun-ejb-jar.xml) Subelementsnone - contains data dispatcherSpecifies 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. Superelementscache-mapping (sun-web.xml) Subelementsnone - contains data drop-tables-at-undeploySpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementscmp-resource (sun-ejb-jar.xml) Subelementsnone - contains data EejbDefines runtime properties for a single enterprise bean within the application. The subelements listed below apply to particular enterprise beans as follows:
Superelementsenterprise-beans (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the ejb element. Table A–29 ejb Subelements
AttributesThe following table describes attributes for the ejb element. Table A–30 ejb Attributes
Example<ejb>
<ejb-name>CustomerEJB</ejb-name>
<jndi-name>customer</jndi-name>
<resource-ref>
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/__default</jndi-name>
</resource-ref>
<is-read-only-bean>false</is-read-only-bean>
<commit-option>B</commit-option>
<bean-pool>
<steady-pool-size>10</steady-pool-size>
<resize-quantity>10</resize-quantity>
<max-pool-size>100</max-pool-size>
<pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds>
</bean-pool>
<bean-cache>
<max-cache-size>100</max-cache-size>
<resize-quantity>10</resize-quantity>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
</bean-cache>
</ejb>
ejb-nameIn 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. SuperelementsSubelementsnone - contains data ejb-refMaps 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. Superelementssun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the ejb-ref element. Table A–31 ejb-ref Subelements
ejb-ref-nameSpecifies the ejb-ref-name in the corresponding Java EE deployment descriptor file ejb-ref entry. Superelementsejb-ref (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data endpoint-address-uriSpecifies 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. Superelementswebservice-endpoint (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data ExampleIf the web server is listening at http://localhost:8080, the following endpoint-address-uri: <endpoint-address-uri>StockQuoteService/StockQuotePort</endpoint-address-uri> results in the following target endpoint address: http://localhost:8080/StockQuoteService/StockQuotePort enterprise-beansSpecifies all the runtime properties for an EJB JAR file in the application. Superelementssun-ejb-jar (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the enterprise-beans element. Table A–32 enterprise-beans Subelements
Example<enterprise-beans> <ejb> <ejb-name>CustomerEJB</ejb-name> <jndi-name>customer</jndi-name> <resource-ref> <res-ref-name>jdbc/SimpleBank</res-ref-name> <jndi-name>jdbc/__default</jndi-name> </resource-ref> <is-read-only-bean>false</is-read-only-bean> <commit-option>B</commit-option> <bean-pool> <steady-pool-size>10</steady-pool-size> <resize-quantity>10</resize-quantity> <max-pool-size>100</max-pool-size> <pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds> </bean-pool> <bean-cache> <max-cache-size>100</max-cache-size> <resize-quantity>10</resize-quantity> <removal-timeout-in-seconds>3600</removal-timeout-in-seconds> <victim-selection-policy>LRU</victim-selection-policy> </bean-cache> </ejb> </enterprise-beans> establish-trust-in-clientSpecifies if the target is capable of authenticating a client. The values are NONE, SUPPORTED, or REQUIRED. Superelementstransport-config (sun-ejb-jar.xml) Subelementsnone - contains data establish-trust-in-targetSpecifies if the target is capable of authenticating to a client. The values are NONE, SUPPORTED, or REQUIRED. Superelementstransport-config (sun-ejb-jar.xml) Subelementsnone - contains data FfinderDescribes the finders for CMP 1.1 with a method name and query. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsone-one-finders (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the finder element. Table A–33 finder Subelements
flush-at-end-of-methodSpecifies the methods that force a database flush after execution. Applicable to entity beans. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the flush-at-end-of-method element. Table A–34 flush-at-end-of-method Subelements
Ggen-classesSpecifies all the generated class names for a bean. Note – This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the gen-classes element. Table A–35 gen-classes Subelements
group-nameSpecifies a group name in the current realm. Superelementssecurity-role-mapping (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data Hhttp-methodSpecifies an HTTP method that is eligible for caching. The default is GET. Superelementscache-mapping (sun-web.xml) Subelementsnone - contains data Iidempotent-url-patternSpecifies a URL pattern for idempotent requests. Superelementssun-web-app (sun-web.xml) Subelementsnone AttributesThe following table describes attributes for the idempotent-url-pattern element. Table A–36 idempotent-url-pattern Attributes
ExampleThe following example specifies that all requests for the URI sun-java/* are idempotent. <idempotent-url-pattern url-pattern="sun_java/*" no-of-retries="10"/> integritySpecifies if the target supports integrity-protected messages. The values are NONE, SUPPORTED, or REQUIRED. Superelementstransport-config (sun-ejb-jar.xml) Subelementsnone - contains data ior-security-configSpecifies the security information for the input-output redirection (IOR). Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the ior-security-config element. Table A–37 ior-security-config Subelements
is-cache-overflow-allowedThis element is deprecated. Do not use. Superelementsbean-cache (sun-ejb-jar.xml) is-one-one-cmpSuperelementscmp (sun-ejb-jar.xml) is-read-only-beanSpecifies that this entity bean is a read-only bean if true. If this element is absent, the default value of false is used. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) Subelementsnone - contains data Jjava-methodSpecifies a method. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsmessage (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the java-method element. Table A–38 java-method Subelements
jms-durable-subscription-nameSpecifies 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. Superelementsejb (sun-ejb-jar.xml) Subelementsnone - contains data jms-max-messages-loadSpecifies 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. Superelementsejb (sun-ejb-jar.xml) Subelementsnone - contains data jndi-nameSpecifies 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. Superelementsejb-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) Subelementsnone - contains data jsp-configSpecifies JSP configuration information. Superelementssun-web-app (sun-web.xml) SubelementsThe following table describes subelements for the jsp-config element. Table A–39 jsp-config Subelements
PropertiesThe 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:
The following table describes properties for the jsp-config element. Table A–40 jsp-config Properties
Kkey-fieldSpecifies 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. Superelementscache-mapping (sun-web.xml) Subelementsnone AttributesThe following table describes attributes for the key-field element. Table A–41 key-field Attributes
Llocal-home-implSpecifies the fully-qualified class name of the generated EJBLocalHome impl class. Note – This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsgen-classes (sun-ejb-jar.xml) Subelementsnone - contains data local-implSpecifies the fully-qualified class name of the generated EJBLocalObject impl class. Note – This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsgen-classes (sun-ejb-jar.xml) Subelementsnone - contains data locale-charset-infoDeprecated. For backward compatibility only. Use the parameter-encoding subelement of sun-web-app instead. Specifies information about the application’s internationalization settings. Superelementssun-web-app (sun-web.xml) SubelementsThe following table describes subelements for the locale-charset-info element. Table A–42 locale-charset-info Subelements
AttributesThe following table describes attributes for the locale-charset-info element. Table A–43 locale-charset-info Attributes
locale-charset-mapMaps 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. Superelementslocale-charset-info (sun-web.xml) SubelementsThe following table describes subelements for the locale-charset-map element. Table A–44 locale-charset-map Subelements
AttributesThe following table describes attributes for the locale-charset-map element. Table A–45 locale-charset-map Attributes
Example AgentsThe following table specifies example agent attribute values. Table A–46 Example agent Attribute Values
localpartSpecifies the local part of a QNAME. Superelementsservice-qname, wsdl-port (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data login-configSpecifies 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. Superelementswebservice-endpoint (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the login-config element. Table A–47 login-config subelements
Mmanager-propertiesSpecifies session manager properties. Superelementssession-manager (sun-web.xml) SubelementsThe following table describes subelements for the manager-properties element. Table A–48 manager-properties Subelements
PropertiesThe following table describes properties for the manager-properties element. Table A–49 manager-properties Properties
mapping-propertiesThis element is not implemented. Superelementscmp (sun-ejb-jar.xml) max-cache-sizeSpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsbean-cache (sun-ejb-jar.xml) Subelementsnone - contains data max-pool-sizeSpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsbean-pool (sun-ejb-jar.xml) Subelementsnone - contains data max-wait-time-in-millisThis element is deprecated. Do not use. Superelementsbean-pool (sun-ejb-jar.xml) mdb-connection-factorySpecifies 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. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the mdb-connection-factory element. Table A–50 mdb-connection-factory Subelements
mdb-resource-adapterSpecifies runtime configuration information for a message-driven bean. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the mdb-resource-adapter element. Table A–51 mdb-resource-adapter subelements
messageSpecifies the methods or operations to which message security requirements apply. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsmessage-security (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the message element. Table A–52 message Subelements
message-destinationSpecifies 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. Superelementssun-web-app (sun-web.xml), enterprise-beans (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the message-destination element. Table A–53 message-destination subelements
message-destination-nameSpecifies the name of a logical message destination defined within the corresponding Java EE deployment descriptor file. Superelementsmessage-destination (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data message-destination-refDirectly 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. Superelementssun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the message-destination-ref element. Table A–54 message-destination-ref subelements
message-destination-ref-nameSpecifies the name of a physical message destination defined within the corresponding Java EE deployment descriptor file. Superelementsmessage-destination-ref (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data message-securitySpecifies message security requirements.
Note – This element is not implemented for GlassFish v3 Prelude. Superelementsmessage-security-binding (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the message-security element. Table A–55 message-security Subelements
message-security-bindingSpecifies a custom authentication provider binding for a parent webservice-endpoint or port-info element in one or both of these ways:
Note – This element is not implemented for GlassFish v3 Prelude. Superelementswebservice-endpoint, port-info (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the message-security-binding element. Table A–56 message-security-binding Subelements
AttributesThe following table describes attributes for the message-security-binding element. Table A–57 message-security-binding Attributes
methodSpecifies a bean method. Note – This element is not implemented for GlassFish v3 Prelude. Superelementscheckpoint-at-end-of-method, flush-at-end-of-method (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the method element. Table A–58 method Subelements
method-intfSpecifies the method interface to distinguish between methods with the same name in different interfaces. Allowed values are Home, Remote, LocalHome, and Local. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsmethod (sun-ejb-jar.xml) Subelementsnone - contains data method-nameSpecifies a method name or * (an asterisk) for all methods. If a method is overloaded, specifies all methods with the same name. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsjava-method (sun-web.xml, sun-ejb-jar.xml); finder, query-method , method (sun-ejb-jar.xml) Subelementsnone - contains data Examples<method-name>findTeammates</method-name> <method-name>*</method-name> method-paramSpecifies the fully qualified Java type name of a method parameter. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsmethod-params (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data method-paramsSpecifies fully qualified Java type names of method parameters. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsjava-method (sun-web.xml, sun-ejb-jar.xml); query-method, method (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the method-params element. Table A–59 method-params Subelements
NnameSpecifies the name of the entity. Superelementscall-property, default-resource-principal, stub-property (sun-web.xml, sun-ejb-jar.xml); enterprise-beans, principal, property (with subelements) (sun-ejb-jar.xml) Subelementsnone - contains data namespaceURISpecifies the namespace URI. Superelementsservice-qname, wsdl-port (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data Oone-one-findersDescribes the finders for CMP 1.1 beans. Note – This element is not implemented for GlassFish v3 Prelude. Superelementscmp (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the one-one-finders element. Table A–60 one-one-finders Subelements
operation-nameSpecifies the WSDL name of an operation of a web service. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsmessage (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data Pparameter-encodingSpecifies 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. Superelementslocale-charset-info, sun-web-app (sun-web.xml) Subelementsnone AttributesThe following table describes attributes for the parameter-encoding element. Table A–61 parameter-encoding Attributes
pass-by-referenceSpecifies 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.
Note – 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. Superelementsejb (sun-ejb-jar.xml) Subelementsnone - contains data passwordSpecifies the password for the principal. Superelementsdefault-resource-principal (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data pm-descriptorsThis element and its subelements are deprecated. Do not use. Superelementsenterprise-beans (sun-ejb-jar.xml) pool-idle-timeout-in-secondsSpecifies 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. Note – For a stateless session bean or a message-driven bean, the bean is removed (garbage collected) when the timeout expires. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsbean-pool (sun-ejb-jar.xml) Subelementsnone - contains data port-component-nameSpecifies a unique name for a port component within a web or EJB module. Superelementswebservice-endpoint (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data port-infoSpecifies 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. Superelementsservice-ref (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the port-info element. Table A–62 port-info subelements
prefetch-disabledDisables prefetching of entity bean states for the specified query methods. Note – This element is not implemented for GlassFish v3 Prelude. Superelementscmp (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the prefetch-disabled element. Table A–63 prefetch-disabled Subelements
principalDefines a node that specifies a user name on the platform. Superelementsejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the principal element. Table A–64 principal Subelements
principal-nameContains the principal (user) name. In an enterprise bean, specifies the principal (user) name that has the run-as role specified. Superelementssecurity-role-mapping (sun-web.xml, sun-ejb-jar.xml), servlet (sun-web.xml) Subelementsnone - contains data AttributesThe following table describes attributes for the principal-name element. Table A–65 principal-name Attributes
property (with attributes)Specifies the name and value of a property. A property adds configuration information to its parent element that is one or both of the following:
Superelementscache, cache-helper, class-loader, cookie-properties, default-helper, manager-properties, session-properties, store-properties, sun-web-app, webservice-endpoint (sun-web.xml) SubelementsThe following table describes subelements for the property element. Table A–66 property Subelements
AttributesThe following table describes attributes for the property element. Table A–67 property Attributes
Example<property name="reapIntervalSeconds" value="20" /> property (with subelements)Specifies the name and value of a property. A property adds configuration information to its parent element that is one or both of the following:
Superelementscmp-resource, schema-generator-properties, webservice-endpoint (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the property element. Table A–68 property subelements
Example<property> <name>use-unique-table-names</name> <value>true</value> </property> Qquery-filterSpecifies the query filter for the CMP 1.1 finder. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsfinder (sun-ejb-jar.xml) Subelementsnone - contains data query-methodSpecifies a query method. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsprefetch-disabled (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the query-method element. Table A–69 query-method Subelements
query-orderingSpecifies the query ordering for the CMP 1.1 finder. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsfinder (sun-ejb-jar.xml) Subelementsnone - contains data query-paramsSpecifies the query parameters for the CMP 1.1 finder. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsfinder (sun-ejb-jar.xml) Subelementsnone - contains data query-variablesSpecifies variables in the query expression for the CMP 1.1 finder. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsfinder (sun-ejb-jar.xml) Subelementsnone - contains data RrealmSpecifies 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. Superelementsas-context, login-config (sun-ejb-jar.xml) Subelementsnone - contains data refresh-fieldSpecifies a field that gives the application component a programmatic way to refresh a cached entry. Superelementscache-mapping (sun-web.xml) Subelementsnone AttributesThe following table describes attributes for the refresh-field element. Table A–70 refresh-field Attributes
refresh-period-in-secondsSpecifies 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). Superelementsejb (sun-ejb-jar.xml) Subelementsnone - contains data removal-timeout-in-secondsSpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsbean-cache (sun-ejb-jar.xml) Subelementsnone - contains data remote-home-implSpecifies the fully-qualified class name of the generated EJBHome impl class. Note – This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsgen-classes (sun-ejb-jar.xml) Subelementsnone - contains data remote-implSpecifies the fully-qualified class name of the generated EJBObject impl class. Note – This value is automatically generated by the server at deployment or redeployment time. Do not specify it or change it after deployment. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsgen-classes (sun-ejb-jar.xml) Subelementsnone - contains data request-protectionDefines the authentication policy requirements of the application’s request processing. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsmessage-security (sun-web.xml, sun-ejb-jar.xml) Subelementsnone AttributesThe following table describes attributes for the request-protection element. Table A–71 request-protection Attributes
requiredSpecifies whether the authentication method specified in the auth-method element must be used for client authentication. The value is true or false (the default). Superelementsas-context (sun-ejb-jar.xml) Subelementsnone - contains data res-ref-nameSpecifies 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. Superelementsresource-ref (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data resize-quantityNote – This element is not implemented for GlassFish v3 Prelude. Specifies the number of bean instances to be:
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. Superelementsbean-cache, bean-pool (sun-ejb-jar.xml) Subelementsnone - contains data resource-adapter-midSpecifies the module ID of the resource adapter that is responsible for delivering messages to the message-driven bean. Superelementsmdb-resource-adapter (sun-ejb-jar.xml) Subelementsnone - contains data resource-env-refMaps the res-ref-name in the corresponding Java EE deployment descriptor file resource-env-ref entry to the absolute jndi-name of a resource. Superelementssun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml)) SubelementsThe following table describes subelements for the resource-env-ref element. Table A–72 resource-env-ref Subelements
Example<resource-env-ref> <resource-env-ref-name>jms/StockQueueName</resource-env-ref-name> <jndi-name>jms/StockQueue</jndi-name> </resource-env-ref> resource-env-ref-nameSpecifies the res-ref-name in the corresponding Java EE deployment descriptor file resource-env-ref entry. Superelementsresource-env-ref (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data resource-refMaps the res-ref-name in the corresponding Java EE deployment descriptor file resource-ref entry to the absolute jndi-name of a resource. Note – 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. Superelementssun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the resource-ref element. Table A–73 resource-ref Subelements
Example<resource-ref> <res-ref-name>jdbc/EmployeeDBName</res-ref-name> <jndi-name>jdbc/EmployeeDB</jndi-name> </resource-ref> response-protectionDefines the authentication policy requirements of the application’s response processing. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsmessage-security (sun-web.xml, sun-ejb-jar.xml) Subelementsnone AttributesThe following table describes attributes for the response-protection element. Table A–74 response-protection Attributes
role-nameContains the role-name in the security-role element of the corresponding Java EE deployment descriptor file. Superelementssecurity-role-mapping (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data Ssas-contextDescribes the sas-context fields. Superelementsior-security-config (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the sas-context element. Table A–75 sas-context Subelements
schema-generator-propertiesSpecifies field-specific column attributes in property subelements. Note – This element is not implemented for GlassFish v3 Prelude. Superelementscmp-resource (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the schema-generator-properties element. Table A–76 schema-generator-properties Subelements
PropertiesThe following table describes properties for the schema-generator-properties element. Table A–77 schema-generator-properties Properties
The following table lists the column attributes for properties defined in the schema-generator-properties element. Table A–78 schema-generator-properties Column Attributes
Example<schema-generator-properties> <property> <name>Employee.firstName.jdbc-type</name> <value>char</value> </property> <property> <name>Employee.firstName.jdbc-maximum-length</name> <value>25</value> </property> <property> <name>use-unique-table-names</name> <value>true</value> </property> </schema-generator-properties> security-role-mappingMaps 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. Superelementssun-web-app (sun-web.xml), sun-ejb-jar (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the security-role-mapping element. Table A–79 security-role-mapping Subelements
service-endpoint-interfaceSpecifies the web service reference name relative to java:comp/env. Superelementsport-info (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data service-impl-classSpecifies the name of the generated service implementation class. Superelementsservice-ref (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data service-qnameSpecifies the WSDL service element that is being referred to. Superelementsservice-ref (sun-web.xml, sun-ejb-jar.xml); webservice-endpoint (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the service-qname element. Table A–80 service-qname subelements
service-refSpecifies runtime settings for a web service reference. Runtime information is only needed in the following cases:
Superelementssun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the service-ref element. Table A–81 service-ref subelements
service-ref-nameSpecifies the web service reference name relative to java:comp/env. Superelementsservice-ref (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data servletSpecifies a principal name for a servlet. Used for the run-as role defined in web-xml. Superelementssun-web-app (sun-web.xml) SubelementsThe following table describes subelements for the servlet element. Table A–82 servlet Subelements
servlet-impl-classSpecifies the automatically generated name of the servlet implementation class. Superelementswebservice-endpoint (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data servlet-nameSpecifies the name of a servlet, which is matched to a servlet-name in web.xml. This name must be present in web.xml. Superelementscache-mapping, servlet (sun-web.xml) Subelementsnone - contains data session-configSpecifies session configuration information. Overrides the web container settings for an individual web module. Superelementssun-web-app (sun-web.xml) SubelementsThe following table describes subelements for the session-config element. Table A–83 session-config Subelements
session-managerSpecifies session manager information. Superelementssession-config (sun-web.xml) SubelementsThe following table describes subelements for the session-manager element. Table A–84 session-manager Subelements
AttributesThe following table describes attributes for the session-manager element. Table A–85 session-manager Attributes
session-propertiesSpecifies session properties. Superelementssession-config (sun-web.xml) SubelementsThe following table describes subelements for the session-properties element. Table A–86 session-properties Subelements
PropertiesThe following table describes properties for the session-properties element. Table A–87 session-properties Properties
steady-pool-sizeSpecifies 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsbean-pool (sun-ejb-jar.xml) Subelementsnone - contains data store-propertiesSpecifies session persistence (storage) properties. Superelementssession-manager (sun-web.xml) SubelementsThe following table describes subelements for the store-properties element. Table A–88 store-properties Subelements
PropertiesThe following table describes properties for the store-properties element. Table A–89 store-properties Properties
If the persistenceScope store property is set to modified-attribute, a web module must follow these guidelines:
stub-propertySpecifies 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. Superelementsport-info (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the stub-property element. Table A–90 stub-property subelements
PropertiesThe following table describes properties for the stub-property element. Table A–91 stub-property properties
Example<service-ref> <service-ref-name>service/FooProxy</service-ref-name> <port-info> <service-endpoint-interface>a.FooPort</service-endpoint-interface> <wsdl-port> <namespaceURI>urn:Foo</namespaceURI> <localpart>FooPort</localpart> </wsdl-port> <stub-property> <name>javax.xml.rpc.service.endpoint.address</name> <value>http://localhost:8080/a/Foo</value> </stub-property> </port-info> </service-ref> sun-ejb-jarDefines 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. Superelementsnone SubelementsThe following table describes subelements for the sun-ejb-jar element. Table A–92 sun-ejb-jar Subelements
sun-web-appDefines 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. Superelementsnone SubelementsThe following table describes subelements for the sun-web-app element. Table A–93 sun-web-app Subelements
AttributesThe following table describes attributes for the sun-web-app element. Table A–94 sun-web-app Attributes
PropertiesThe following table describes properties for the sun-web-app element. Table A–95 sun-web-app Properties
Ttie-classSpecifies the automatically generated name of a tie implementation class for a port component. Superelementswebservice-endpoint (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data timeoutSpecifies 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. Superelementscache-mapping (sun-web.xml) Subelementsnone - contains data AttributesThe following table describes attributes for the timeout element. Table A–96 timeout Attributes
transport-configSpecifies the security transport information. Superelementsior-security-config (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the transport-config element. Table A–97 transport-config Subelements
transport-guaranteeSpecifies that the communication between client and server is NONE, INTEGRAL, or CONFIDENTIAL.
In most cases, a value of INTEGRAL or CONFIDENTIAL indicates that the use of SSL is required. Superelementswebservice-endpoint (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data Uunique-idContains the unique ID for the application. This value is automatically updated each time the application is deployed or redeployed. Do not edit this value. Superelementsenterprise-beans (sun-ejb-jar.xml) Subelementsnone - contains data url-patternSpecifies a servlet URL pattern for which caching is enabled. See the Servlet 2.4 specification section SRV. 11.2 for applicable patterns. Superelementscache-mapping (sun-web.xml) Subelementsnone - contains data use-thread-pool-idSpecifies the thread pool from which threads are selected for remote invocations of this bean. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsejb (sun-ejb-jar.xml) Subelementsnone - contains data VvalueSpecifies the value of the entity. Superelementscall-property, stub-property (sun-web.xml, sun-ejb-jar.xml); property (with subelements) (sun-ejb-jar.xml) Subelementsnone - contains data victim-selection-policySpecifies 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. Note – 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. Note – This element is not implemented for GlassFish v3 Prelude. Superelementsbean-cache (sun-ejb-jar.xml) Subelementsnone - contains data Example<victim-selection-policy>LRU</victim-selection-policy> If both SSL2 and SSL3 are enabled, the server tries SSL3 encryption first. If that fails, the server tries SSL2 encryption. If both SSL2 and SSL3 are enabled for a virtual server, the server tries SSL3 encryption first. If that fails, the server tries SSL2 encryption. Wwebservice-descriptionSpecifies a name and optional publish location for a web service. Superelementssun-web-app (sun-web.xml), enterprise-beans (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the webservice-description element. Table A–98 webservice-description subelements
webservice-description-nameSpecifies a unique name for the web service within a web or EJB module. Superelementswebservice-description (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data webservice-endpointSpecifies information about a web service endpoint. Superelementsservlet (sun-web.xml), ejb (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the webservice-endpoint element. Table A–99 webservice-endpoint subelements
wsdl-overrideSpecifies 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. Superelementsservice-ref (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data Example// 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> wsdl-portSpecifies the WSDL port. Superelementsport-info (sun-web.xml, sun-ejb-jar.xml) SubelementsThe following table describes subelements for the wsdl-port element. Table A–100 wsdl-port subelements
wsdl-publish-locationSpecifies 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). Superelementswebservice-description (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data ExampleSuppose 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||