Configures the EJB container. Stateless session beans are maintained in pools. Stateful session beans have session affinity and are cached. Entity beans associated with a database primary key are also cached. Entity beans not yet associated with a primary key are maintained in pools. Pooled entity beans are used to run ejbCreate() and finder methods.
The following table describes subelements for the ejb-container element.
Table 1–40 ejb-container Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Configures the EJB timer service. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the ejb-container element.
Table 1–41 ejb-container Attributes
Attribute |
Default |
Description |
---|---|---|
32 |
(optional) Specifies the initial and minimum number of beans maintained in the pool. Must be 0 or greater and less than max-pool-size . Bean instances are removed from the pool and returned after use. The pool is replenished or cleaned up periodically to maintain this size. Applies to stateless session beans and entity beans. |
|
16 |
(optional) Specifies the number of beans to be removed when the pool-idle-timeout-in-seconds timer expires. A cleaner thread removes any unused instances. Must be 0 or greater and less than max-pool-size . The pool is not resized below the steady-pool-size. Applies to stateless session beans and entity beans. |
|
64 |
(optional) Specifies the maximum number of beans that can be created to satisfy client requests. A value of 0 indicates an unbounded pool. Applies to stateless session beans and entity beans. |
|
32 |
(optional) Specifies the number of beans to be:
|
|
512 |
(optional) Specifies the maximum number of beans in the cache. A value of 0 indicates an unbounded cache. Applies to stateful session beans and entity beans. |
|
600 |
(optional) Specifies the maximum time that a bean can remain idle in the pool. After this amount of time, the pool can remove this bean. A value of 0 specifies that idle beans can remain in the pool indefinitely. Applies to stateless session beans and entity beans. |
|
600 |
(optional) 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. Applies to stateful session beans and entity beans. |
|
5400 |
(optional) Specifies the amount of time that a bean can remain passivated before it is removed from the session store. A value of 0 specifies that the container does not remove inactive beans automatically. If removal-timeout-in-seconds is less than or equal to cache-idle-timeout-in-seconds, beans are removed immediately without being passivated. The session-store attribute of the server element determines the location of the session store. Applies to stateful session beans. |
|
nru |
(optional) Specifies how stateful session beans are selected for passivation. Allowed values are fifo, lru, and nru :
|
|
B |
(optional) Determines which commit option is used for entity beans. Legal values are B or C. |
|
domain-dir/session-store |
(optional) Specifies the directory where passivated stateful session beans and persisted HTTP sessions are stored in the file system. |
Specifies a deployed EJB module.
The following table describes subelements for the ejb-module element.
Table 1–42 ejb-module Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Configures a web service endpoint. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the ejb-module element.
Table 1–43 ejb-module Attributes
Configures the EJB timer service.
The following table describes subelements for the ejb-timer-service element.
Table 1–44 ejb-timer-service Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the ejb-timer-service element.
Table 1–45 ejb-timer-service Attributes
Attribute |
Default |
Description |
---|---|---|
7000 |
(optional) Specifies the minimum time before an expiration for a particular timer can occur. This guards against extremely small timer increments that can overload the server. |
|
1 |
(optional) Specifies the maximum number of times the EJB timer service attempts to redeliver a timer expiration due for exception or rollback. |
|
jdbc/__TimerPool |
(optional) Overrides the cmp-resource value specified in sun-ejb-jar.xml for the timer service system application (__ejb_container_timer_app ). |
|
5000 |
(optional) Specifies how long the EJB timer service waits after a failed ejbTimeout delivery before attempting a redelivery. |
Defines the event that triggers the action associated with a management rule.
Predefined events are provided with the Application Server. You can configure these events by changing event element attributes and properties.
You can create custom events by creating custom MBeans that implement the JMX NotificationEmitter interface. For more information about MBeans, see the Sun Java System Application Server Platform Edition 9 Developer’s Guide and http://java.sun.com/j2se/1.5.0/docs/api/javax/management/package-summary.html. For information about monitor MBeans, see http://java.sun.com/j2se/1.5.0/docs/api/javax/management/monitor/package-summary.html.
If multiple rules are associated with the same event, ordering of action execution is not guaranteed.
The following table describes subelements for the event element.
Table 1–46 event Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the event element.
Table 1–47 event Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the type of event that triggers the management rule's action. Allowed values are as follows. The lifecycle, log, monitor, timer, and trace types are predefined events provided by the Application Server.
For descriptions of required and optional properties corresponding to each of these types, see the following table. |
|
INFO |
(optional) Specifies the level at which to log the event occurrence. For information about log levels, see module-log-levels. Applicable only if record-event is set to true. |
|
true |
(optional) Specifies whether the occurrence of the event is logged. If no action is specified for the parent management-rule, the event is logged regardless of this setting. Note – Setting the type to log is different from setting record-event to true. The former specifies what the event is. The latter specifies what happens after the event occurs. |
The following table describes properties for the event element. Property names are case insensitive.
Table 1–48 event Properties
Event Type |
Property |
Values |
Description |
---|---|---|---|
lifecycle |
ready, shutdown, termination |
Specifies a server life cycle event. Values correspond to events defined in the com.sun.appserv.server.LifecycleEvent interface. |
|
log |
A comma-separated list of logger names, or * for all loggers, which is the default |
(optional) Notifies when the specified loggers write messages to the server log. For a list of logger names, see module-log-levels. |
|
log |
A comma-separated list of log levels |
(optional) Notifies when messages of the specified level are written to the server log. For information about log levels, see module-log-levels. |
|
monitor |
A name attribute of a user-defined mbean, or a JMX ObjectName for a system mbean |
Specifies the name of the monitored MBean. Either this property or observedObject must be specified. |
|
monitor |
An object-name attribute of a user-defined mbean, or a JMX ObjectName for a system mbean |
Specifies the name of the monitored MBean. Either this property or observedMbean must be specified. |
|
monitor |
An mbean Attribute name |
Specifies the monitored attribute of the monitored MBean. |
|
monitor |
CounterMonitor, GaugeMonitor, StringMonitor |
The type of monitoring of the attribute. |
|
monitor |
Time interval in seconds (long int) |
(optional) Specifies the granularity at which the monitoring data should be collected. |
|
monitor |
true or false |
Specifies that the attribute value must match the stringToCompare value. Either this property or notifyDiffer is required if the monitor type is StringMonitor. |
|
monitor |
true or false |
Specifies that the attribute value must not match the stringToCompare value. Either this property or notifyMatch is required if the monitor type is StringMonitor. |
|
monitor |
A String |
Specifies the value to which the attribute value is compared. Required if the monitor type is StringMonitor. |
|
monitor |
byte, double, float, int, long, short |
Specifies the type of the numeric value being monitored. Required if the monitor is of type CounterMonitor or GaugeMonitor. |
|
monitor |
true or false |
Specifies the difference mode flag value common to all observed MBeans. Required if the monitor is of type CounterMonitor or GaugeMonitor. |
|
monitor |
A positive number of the type specified by numberType |
Specifies a value above which notification occurs. Required if the monitor is of type CounterMonitor. |
|
monitor |
A positive number of the type specified by numberType |
(optional) Specifies that the event should be re-triggered when the initThreshold value plus this offset value is reached. Applicable if the monitor is of type CounterMonitor. |
|
monitor |
A positive number of the type specified by numberType |
(optional) Specifies the modulus value common to all observed MBeans. Applicable if the monitor is of type CounterMonitor. |
|
monitor |
A positive number of the type specified by numberType |
Specifies the upper limit of the range within which notification occurs. Required if the monitor is of type GaugeMonitor. |
|
monitor |
A positive number of the type specified by numberType |
Specifies the lower limit of the range within which notification occurs. Required if the monitor is of type GaugeMonitor. |
|
notification |
name of mbean |
Specifies a custom MBean that implements the JMX NotificationEmitter interface. Either this property or sourceObjectName must be specified. |
|
notification |
object-name of mbean |
Specifies a custom MBean that implements the JMX NotificationEmitter interface. Either this property or sourceMBean must be specified. |
|
notification |
The notification type |
(optional) Specifies the notification type. If this property is specified, the action of the parent management-rule is performed only if the notification type emitted is same as this property's value. |
|
timer |
Input format determined by pattern property |
Begins notification at the specified date and time. |
|
timer |
SimpleDateFormat pattern |
(optional) Specifies the date and time input format. The default is mm/dd/yyyy hh:mm:ss. |
|
timer |
Time interval in milliseconds (long int) |
(optional) Notification repeats at the specified time interval. |
|
timer |
A positive number (long int) |
(optional) Specifies the number of times notification occurs. |
|
timer |
A String |
(optional) Specifies a message that is delivered as part of timer notification. |
|
trace |
web_component_method_entry, web_component_method_exit, ejb_component_method_entry, ejb_component_method_exit, request_start, request_end |
Notifies at the specified trace point. |
|
trace |
An IP address |
Specifies the IP address for which trace notifications are sent. |
|
trace |
A String |
Specifies the caller principal for which trace notifications are sent. |
|
trace |
A String |
Specifies the component name for which trace notifications are sent. |
Defines a resource that resides in an external JNDI repository. For example, a generic Java object could be stored in an LDAP server. An external JNDI factory must implement the javax.naming.spi.InitialContextFactory interface.
The following table describes subelements for the external-jndi-resource element.
Table 1–49 external-jndi-resource Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Contains a text description of this element. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the external-jndi-resource element.
Table 1–50 external-jndi-resource Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the JNDI name for the resource. |
|
none |
Specifies the JNDI lookup name for the resource. |
|
none |
Specifies the fully qualified type of the resource. |
|
none |
Specifies the fully qualified name of the factory class, which implements javax.naming.spi.InitialContextFactory. For more information about JNDI, see the Sun Java System Application Server Platform Edition 9 Developer’s Guide. |
|
user |
(optional) Defines the type of the resource. Allowed values are:
|
|
enabled |
true |
(optional) Determines whether this resource is enabled at runtime. |