Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.1.0) B28221-02 |
|
Previous |
Next |
The <session-deployment>
section provides additional deployment information for a session bean deployed within this JAR file.
The <session-deployment>
section contains the following structure:
<session-deployment pool-cache-timeout=... call-timeout=... copy-by-value=... location=... max-instances=... min-instances=... max-tx-retries=... tx-retry-wait=... name=... persistence-filename=... replication=... timeout=... idletime=... memory-threshold=... max-instances-threshold=... resource-check-interval=... passivate-count=... wrapper=... local-wrapper=... interceptor-type= ... <ior-security-config> <transport-config> <integrity></integrity> <confidentiality></confidentiality> <establish-trust-in-target></establish-trust-in-target> <establish-trust-in-client></establish-trust-in-client> </transport-config> <as-context> <auth-method></auth-method> <realm></realm> <required></required> </as-context> <sas-context> <caller-propagation></caller-propagation> </sas-context> </ior-security-config> <env-entry-mapping name=...> </env-entry-mapping <ejb-ref-mapping location=... name=... remote=... jndi-properties=... /> <resource-ref-mapping location=... name=... > <lookup-context location=...> <context-attribute name=... value=... /> </lookup-context> </resource-ref-mapping> <resource-env-ref-mapping location=... name=... /> <message-destination-ref-mapping location=... name=... /> </session-deployment>
Note: Alternatively, in an EJB 3.0 application, you can use the OC4J-proprietary annotations@StatelessDeployment and @StatefulDeployment . You can use the orion-ejb-jar.xml file <session-deployment> configuration to override @StatelessDeployment and @StatefulDeployment configuration. For more information, see "Configuring OC4J-Proprietary Deployment Options on an EJB 3.0 Session Bean". |
For information on each of these elements and sub-elements, see the following:
For session bean examples, which include <session-deployment>
, @StatefulDeployment
, or @StatelessDeployment
configuration (where relevant), see the following:
Table A-1 lists the attributes for the <session-deployment>
element, their @StatelessDeployment
and @StatefulDeployment
annotation attribute equivalents (where appropriate), and indicates which are applicable to stateless session beans only, stateful session beans only, or both.
Table A-1 Attributes for the <session-deployment> Element
Attribute | @StatelessDeployment Equivalent | @StatefulDeployment Equivalent | Stateless | Stateful | Description |
---|---|---|---|---|---|
|
|
This parameter specifies the maximum time to wait for any resource to make a business/life cycle method invocation. This is not a timeout for how long a business method invocation can take. If the timeout is reached, a The default value is 90000 milliseconds. Set to |
|||
|
|
Whether or not to copy (clone) all the incoming and outgoing parameters in EJB calls. Set to |
|||
|
|
You can set an idle timeout for each bean. When this timeout expires, passivation occurs. Set this attribute to the appropriate number of seconds. Default: 300 seconds. (5 minutes). To disable, specify any negative number. |
|||
|
|
How OC4J should handle interceptor class life cycle. One of When set to the default, OC4J creates a separate interceptor class instance for each session bean instance that you associate with that interceptor class. This is in accordance with the EJB 3.0 specification. When set to For more information, see "Singleton Interceptors". |
|||
|
|
The local JNDI name, to which this enterprise bean will be bound. |
|||
Name of the OC4J local home wrapper class for this bean. This is an internal server value and should not be edited. |
|||||
|
|
The JNDI-name to which this bean will be bound. |
|||
|
|
The number of bean instances allowed in memory: either instantiated or pooled. When this value is reached, OC4J attempts to passivate beans using the least recently used (LRU) algorithm. To allow an infinite number of bean instances, the To disable instance pooling, set For more information, see the following: |
|||
|
|
Percentage of Specify an integer that is translated as a percentage. If you define that the To disable, specify any negative number. |
|||
|
|
This parameter specifies the number of times to retry a transaction that was rolled back due to system-level failures. The default is For a stateful session bean, if a Generally, Oracle recommend that you add retries only where errors are seen that could be resolved through retries. For example, if you are using serializable isolation and you want to retry the transaction automatically if there is a conflict, you might want to use retries. However, if the bean wants to be notified when there is a conflict, then in this case, you should leave m See the EJB section in the Oracle Application Server Performance Guide for more information. |
|||
|
|
This attribute defines a threshold for how much used JVM memory is allowed before passivation should occur. Specify an integer that is translated as a percentage. When reached, beans are passivated, even if their idle timeout has not expired. Default: 80%. To disable, specify any negative number. |
|||
|
The number of minimum bean implementation instances to be kept instantiated or pooled. The default is |
||||
The name of the bean, which matches the name of a bean in the assembly section of the EJB deployment descriptor ( |
|||||
|
|
This attribute is an integer that defines the number of beans to be passivated if any of the resource thresholds have been reached. Passivation of beans is performed using the least recently used algorithm. Default: one-third of the |
|||
|
Path to the file where sessions are stored across restarts. |
||||
|
The For stateless session beans, if you specify a The default value is |
||||
|
|
Configuration of the state replication for stateful session beans. Values can be |
|||
|
|
The container checks all resources at this time interval. At this time, if any of the thresholds have been reached, passivation occurs. Default: 180 sec. (3 min.). To disable, specify any negative number. |
|||
|
|
The maximum number of seconds that a stateful session bean may be inactive before being subject to pool clean-up. If the value is zero or negative, then all timeouts are disabled. Every 30 seconds the pool clean up logic is invoked. Within the pool clean up logic, only the sessions that timed out, by passing the timeout value, are deleted. Adjust the timeout based on your applications use of stateful session beans. For example, if stateful session beans are not removed explicitly by your application, and the application creates many stateful session beans, then you may want to lower the timeout value. If your application requires that a stateful session bean be available for longer than 1800 seconds (equal to 30 minutes), then adjust the timeout value accordingly. The default value is 1800 seconds. |
|||
|
|
The maximum number of seconds that OC4J will wait for a transaction started by this stateless or stateful session bean to commit or rollback. If the value is zero or negative, the timeout is disabled. |
|||
|
|
This parameter specifies the time to wait in seconds between retrying the transaction. The default value is 60 seconds. |
|||
Name of the OC4J wrapper class for this bean. This is an internal server value and should not be edited. |
The <ior-security-config>
element is an interoperability element, which is discussed fully in the Interoperability chapter in the Oracle Containers for J2EE Services Guide.
The <env-entry-mapping>
element maps environment variables to JNDI names and is discussed in "Configuring an Environment Reference to an Environment Variable".
The <ejb-ref-mapping>
element maps any EJB references to JNDI names and is discussed in "EJB Environment References".
The <resource-ref-mapping>
element maps any EJB references to JNDI names and is discussed in "Resource Manager Connection Factory Environment References".
The <resource-env-ref-mapping>
element is used to map an administered object for a resource. For example, to use JMS, the bean must obtain both a JMS factory object and a destination object. These objects are retrieved at the same time from JNDI. The <resource-ref>
element declares the JMS factory and the <resource-env-ref>
element is used to declare the destination. Thus, the <resource-env-ref-mapping>
element maps the destination object. See "Resource Manager Connection Factory Environment References" for more information.
The <message-destination-ref-mapping>
element is only used if you are using JMS 1.1. Use this element to map the message-destination-ref-name
in the client deployment descriptor to another location that is available in the OC4J environment. It provides means of linking message consumers and producers to one or more common logical destinations. For more information, see "Configuring an Environment Reference to a JMS Destination Resource Manager Connection Factory (JMS 1.1)".