Package org.glassfish.ejb.config
Interface EjbContainer
- All Superinterfaces:
org.jvnet.hk2.config.ConfigBeanProxy,org.glassfish.api.admin.config.ConfigExtension,org.glassfish.api.admin.config.Container,org.jvnet.hk2.config.types.PropertyBag
public interface EjbContainer
extends org.jvnet.hk2.config.ConfigBeanProxy, org.jvnet.hk2.config.types.PropertyBag, org.glassfish.api.admin.config.ConfigExtension
Configuration of EJB Container
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
org.jvnet.hk2.config.ConfigBeanProxy.DuckNested classes/interfaces inherited from interface org.jvnet.hk2.config.types.PropertyBag
org.jvnet.hk2.config.types.PropertyBag.Duck -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final booleanstatic final intstatic final longstatic final intstatic final intstatic final String -
Method Summary
Modifier and TypeMethodDescription@Min(0L) StringGets the value of the cacheIdleTimeoutInSeconds property.@Min(1L) StringGets the value of the cacheResizeQuantity property.@Pattern(regexp="B|C",message="B to enable entity bean caching, C to disable.") StringGets the value of the commitOption property.@NotNull EjbTimerServiceGets the value of the ejbTimerService property.@Min(0L) StringGets the value of the maxCacheSize property.@Min(0L) StringGets the value of the maxPoolSize property.@Min(0L) StringGets the value of the poolIdleTimeoutInSeconds property.@Min(0L) StringGets the value of the poolResizeQuantity property.List<org.jvnet.hk2.config.types.Property>Properties as perPropertyBag@Min(0L) StringGets the value of the removalTimeoutInSeconds property.Gets the value of the sessionStore property.@Min(0L) StringGets the value of the steadyPoolSize property.@Pattern(regexp="(nru|fifo|lru)",message="Pattern: (nru|fifo|lru)") StringGets the value of the victimSelectionPolicy property.voidSets the value of the cacheIdleTimeoutInSeconds property.voidsetCacheResizeQuantity(String value) Sets the value of the cacheResizeQuantity property.voidsetCommitOption(String value) Sets the value of the commitOption property.voidSets the value of the ejbTimerService property.voidsetMaxCacheSize(String value) Sets the value of the maxCacheSize property.voidsetMaxPoolSize(String value) Sets the value of the maxPoolSize property.voidSets the value of the poolIdleTimeoutInSeconds property.voidsetPoolResizeQuantity(String value) Sets the value of the poolResizeQuantity property.voidsetRemovalTimeoutInSeconds(String value) Sets the value of the removalTimeoutInSeconds property.voidsetSessionStore(String value) Sets the value of the sessionStore property.voidsetSteadyPoolSize(String value) Sets the value of the steadyPoolSize propertyvoidsetVictimSelectionPolicy(String value) Sets the value of the victimSelectionPolicy property.Methods inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
createChild, deepCopy, getParent, getParentMethods inherited from interface org.jvnet.hk2.config.types.PropertyBag
addProperty, getProperty, getPropertyValue, getPropertyValue, lookupProperty, removeProperty, removeProperty
-
Field Details
-
PATTERN_VICTIM_SELECTION_POLICY
- See Also:
-
DEFAULT_THREAD_CORE_POOL_SIZE
static final int DEFAULT_THREAD_CORE_POOL_SIZE- See Also:
-
DEFAULT_THREAD_MAX_POOL_SIZE
static final int DEFAULT_THREAD_MAX_POOL_SIZE- See Also:
-
DEFAULT_THREAD_KEEP_ALIVE_SECONDS
static final long DEFAULT_THREAD_KEEP_ALIVE_SECONDS- See Also:
-
DEFAULT_THREAD_QUEUE_CAPACITY
static final int DEFAULT_THREAD_QUEUE_CAPACITY- See Also:
-
DEFAULT_ALLOW_CORE_THREAD_TIMEOUT
static final boolean DEFAULT_ALLOW_CORE_THREAD_TIMEOUT- See Also:
-
DEFAULT_PRESTART_ALL_CORE_THREADS
static final boolean DEFAULT_PRESTART_ALL_CORE_THREADS- See Also:
-
-
Method Details
-
getSteadyPoolSize
Gets the value of the steadyPoolSize property. (slsb,eb) number of bean instances normally maintained in pool. When a pool is first created, it will be populated with size equal to steady-pool-size. When an instance is removed from the pool, it is replenished asynchronously, so that the pool size is at or above the steady-pool-size. This addition will be in multiples of pool-resize-quantity. When a bean is disassociated from a method invocation, it is put back in the pool, subject to max-pool-size limit. If the max pool size is exceeded the bean id destroyed immediately. A pool cleaning thread, executes at an interval defined by pool-idle-timeout-in-seconds. This thread reduces the pool size to steady-pool-size, in steps defined by pool-resize-quantity. If the pool is empty, the required object will be created and returned immediately. This prevents threads from blocking till the pool is replenished by the background thread. steady-pool-size must be greater than 1 and at most equal to the max-pool-size.- Returns:
- possible object is
String
-
setSteadyPoolSize
Sets the value of the steadyPoolSize property- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getPoolResizeQuantity
Gets the value of the poolResizeQuantity property. (slsb,eb) size of bean pool grows (shrinks) in steps specified by pool-resize-quantity, subject to max-pool-size (steady-pool-size) limit.- Returns:
- possible object is
String
-
setPoolResizeQuantity
Sets the value of the poolResizeQuantity property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getMaxPoolSize
Gets the value of the maxPoolSize property. (slsb,eb) maximum size, a pool can grow to. A value of 0 implies an unbounded pool. Unbounded pools eventually shrink to the steady-pool-size, in steps defined by pool-resize-quantity.- Returns:
- possible object is
String
-
setMaxPoolSize
Sets the value of the maxPoolSize property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getCacheResizeQuantity
Gets the value of the cacheResizeQuantity property. (eb,sfsb) Cache elements have identity, hence growth is in unit steps and created on demand. Shrinking of cache happens when cache-idle-timeout-in-seconds timer expires and a cleaner thread passivates beans which have been idle for longer than cache-idle-timeout-in-seconds. All idle instances are passivated at once. cache-resize-quantity does not apply in this case. When max cache size is reached, an asynchronous task is created to bring the size back under the max-cache-size limit. This task removes cache-resize-quantity elements, consulting the victim-selection-policy. Must be greater than 1 and less than max-cache-size.- Returns:
- possible object is
String
-
setCacheResizeQuantity
Sets the value of the cacheResizeQuantity property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getMaxCacheSize
Gets the value of the maxCacheSize property. (sfsb,eb) specifies the maximum number of instances that can be cached. For entity beans, internally two caches are maintained for higher concurrency: (i) Ready (R$) (ii) Active in an Incomplete Transaction(TX$) The TX$ is populated with instances from R$ or from the Pool directly. When an instance in TX$ completes the transaction, it is placed back in R$ (or in pool, in case an instance with same identity already is in R$). max-cache-size only specifies the upper limit for R$. The container computes an appropriate size for TX$. For SFSBs, after the max-cache-size is reached, beans(as determined by victim-selection-policy) get passivated.- Returns:
- possible object is
String
-
setMaxCacheSize
Sets the value of the maxCacheSize property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getPoolIdleTimeoutInSeconds
Gets the value of the poolIdleTimeoutInSeconds property. (slsb,eb) defines the rate at which the pool cleaning thread is executed. This thread checks if current size is greater than steady pool size, it removes pool-resize-quantity elements. If the current size is less than steady-pool-size it is increased by pool-resize-quantity, with a ceiling of min (current-pool-size + pool-resize-quantity, max-pool-size) Only objects that have not been accessed for more than pool-idle-timeout-in-seconds are candidates for removal.- Returns:
- possible object is
String
-
setPoolIdleTimeoutInSeconds
Sets the value of the poolIdleTimeoutInSeconds property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getCacheIdleTimeoutInSeconds
Gets the value of the cacheIdleTimeoutInSeconds property. (eb, sfsb) specifies the rate at which the cache cleaner thread is scheduled. All idle instances are passivated at once.- Returns:
- possible object is
String
-
setCacheIdleTimeoutInSeconds
Sets the value of the cacheIdleTimeoutInSeconds property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getRemovalTimeoutInSeconds
Gets the value of the removalTimeoutInSeconds property. (sfsb) Instance is removed from cache or passivation store, if it is not accesed within this time. All instances that can be removed, will be removed.- Returns:
- possible object is
String
-
setRemovalTimeoutInSeconds
Sets the value of the removalTimeoutInSeconds property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getVictimSelectionPolicy
@Pattern(regexp="(nru|fifo|lru)", message="Pattern: (nru|fifo|lru)") @Pattern(regexp="(nru|fifo|lru)",message="Pattern: (nru|fifo|lru)") String getVictimSelectionPolicy()Gets the value of the victimSelectionPolicy property. (sfsb) Victim selection policy when cache needs to shrink. Victims are passivated. Entity Bean Victims are selected always using fifo discipline Does not apply to slsb because it does not matter, which particular instances are removed. fifo method picks victims, oldest instance first. lru algorithm picks least recently accessed instances. nru policy tries to pick 'not recently used' instances and is a pseudo-random selection process.- Returns:
- possible object is
String
-
setVictimSelectionPolicy
Sets the value of the victimSelectionPolicy property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getCommitOption
@Pattern(regexp="B|C", message="B to enable entity bean caching, C to disable.") @Pattern(regexp="B|C",message="B to enable entity bean caching, C to disable.") String getCommitOption()Gets the value of the commitOption property. (eb) Entity Beans caching is controlled by this setting. Commit Option C implies that no caching is performed in the container.- Returns:
- possible object is
String
-
setCommitOption
Sets the value of the commitOption property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getSessionStore
String getSessionStore()Gets the value of the sessionStore property. specifies the directory where passivated beans & persisted HTTP sessions are stored on the file system. Defaults to $INSTANCE-ROOT/session-store- Returns:
- possible object is
String
-
setSessionStore
Sets the value of the sessionStore property.- Parameters:
value- allowed object isString- Throws:
PropertyVetoException
-
getEjbTimerService
Gets the value of the ejbTimerService property. Contains the configuration for the ejb timer service. There is at most one ejb timer service per server instance.- Returns:
- possible object is
EjbTimerService
-
setEjbTimerService
Sets the value of the ejbTimerService property.- Parameters:
value- allowed object isEjbTimerService- Throws:
PropertyVetoException
-
getProperty
@ToDo(priority=IMPORTANT, details="Provide PropertyDesc for legal props") @PropertyDesc(name="disable-nonportable-jndi-names",defaultValue="false",values={"true","false"}) @PropertyDesc(name="thread-core-pool-size") @PropertyDesc(name="thread-max-pool-size") @PropertyDesc(name="thread-keep-alive-seconds") @PropertyDesc(name="thread-queue-capacity") @PropertyDesc(name="allow-core-thread-timeout") @PropertyDesc(name="prestart-all-core-threads") List<org.jvnet.hk2.config.types.Property> getProperty()Properties as perPropertyBag- Specified by:
getPropertyin interfaceorg.jvnet.hk2.config.types.PropertyBag
-