Chapter 8 Creating J2EE Applications for BEA WebLogic
This table lists the component extended attributes:
Name | Description |
---|---|
allow-concurrent-calls | The allow-concurrent-calls specifies whether a stateful session bean instance will allow concurrent method calls. The value of this element may be either "True" or "False". The default value is "False". When a stateful session bean instance is currently in a method call, and another (concurrent) method call arrives on the server, the EJB specification requires that the server throw a RemoteException. By default, allow-concurrent-calls are false, and the EJB container will follow the EJB specification. When this value is set to true, the EJB container will block the concurrent method call and allow it to proceed when the previous call has completed.
Usage: stateful-session-descriptor |
cache-type | The cache-type can be one of "NRU" or "LRU". The default is "NRU".
Usage: stateful-session-cache |
concurrency-strategy | The concurrency-strategy specifies how the container should manage concurrent access to an entity bean.
Usage: entity-cache |
cache-between-transaction | The cache-between-transactions element tells the EJB container whether to cache the persistent data of an entity bean across (between) transactions.
When 'true' is specified, caching between transactions is enabled and long term caching of data is performed. If 'false' is specified, (the default) short term caching is done, which means that data is only cached during an individual transaction. The value 'true' is only allowed if the concurrency-strategy for a bean is either Exclusive, ReadOnly, or Optimistic. A ReadOnly bean simply ignores the value of the cache-between-transactions element since long term caching of readonly data is always performed. When long term caching is enabled for Exclusive concurrency, the EJB container must have exclusive update access to the underlying data, i.e. the data must not be updated by another application outside of the EJB container. If an Exclusive bean is deployed in a cluster, long term caching is disabled automatically because any node in the cluster may update the data, making long term caching impossible. (Note: In releases prior to WLS 7.0, this feature was controlled using the db-is-shared element.) When long term caching is enabled for Optimistic concurrency, the EJB container reuses cached values from previous transactions, but ensures that updates are transactionally consistent by checking for optimistic conflicts at the end of the transaction. In addition, notifications for updates of optimistic data are broadcast to other cluster members to help avoid optimistic conflicts. Usage: entity-cache |
connection-factory-jndi-name | This parameter specifies the JNDI name of the JMS ConnectionFactory that the Message Driven Bean should look up to create its Queues and Topics.
If not specified, it will default to weblogic.jms.MessageDrivenBeanConnectionFactory, which must be declared in config.xml. Usage: message-driven-descriptor |
delay-database-insert-until | The delay-database-insert-until element is used to specify the precise time at which a new bean that uses RDBMS CMP is inserted into the database. By default, the database insert is done after ejbPostCreate.
Delaying the database insert until after ejbPostCreate is required when a cmr-field is mapped to a foreign-key column that doesn't allow null values. In this case, the cmr-field must be set to a non-null value in ejbPostCreate before the bean is inserted into the database. Note that cmr-fields may not be set during ejbCreate, before the primary key of the bean is known. It is also generally advisable to delay the database insert until after ejbPostCreate if the ejbPostCreate method modifies the persistent fields of the bean. This can yield better performance by avoiding an unnecessary store operation. For maximum flexibility, developers should avoid creating related beans in their ejbPostCreate method. This may cause the delay database insert impossible if database constraints prevent related beans from referring to a bean that has not yet been created. Allowed values: ejbCreate - perform database insert immediately after ejbCreate ejbPostCreate - perform insert immediately after ejbPostCreate (default) Usage: weblogic-rdbms-bean |
delay-updates-until-end-of-tx | Applicable to entity beans only (both container- and bean-managed). This optional optimization affects when changes to a bean's state are propagated to the persistent store. If this is set to "True" (which is the default) updates of the persistent store of all beans in the transaction will be performed just before the end of the transaction.
If this is set to "False", the store update of a bean will be performed at the conclusion of each method invoke. Usage: Persistence |
destination-jndi-name | The destination-jndi-name element is used to associate a message-driven bean with a JMS Queue or Topic that has been deployed in the WebLogic JNDI tree.
Usage: message-driven-descriptor |
enable-call-by-reference | Pass by value is always necessary when the EJB is called remotely (not from within the server). By setting enable-call-by-reference to "True", EJB methods called from within the same server will pass arguments by reference. This increases the performance of method invocation since parameters are not copied.
Usage: weblogic-enterprise-bean |
finders-load-bean | Applicable to CMP entity beans only. This optional optimization affects whether the beans returned by a finder (or ejbSelect method) are loaded immediately into the cache before the finder method returns.
If this is set to "True", the beans will immediately be loaded into the cache by the finder. If this is set to "False", the beans will not be loaded into the cache until the first invocation of the bean. The default value is "True", which generally provides the best performance. Usage: Persistence |
generator-name | If this is DBMS Key Generation, then this may be used to specify the Name of the Generator, e.g. for <generator-type>ORACLE
<generator-name> would be the name of the ORACLE SEQUENCE to use. The SEQUENCE is assumed to already exist in the Database. If this is <generator-type>NAMED_SEQUENCE_TABLE Key Generation, Then this would be used to specify the name of the SEQUENCE TABLE to use. The NAMED_SEQUENCE_TABLE is assumed to already exist in the Database with one row. Usage: automatic-key-generation |
generator-type | Specifies the Key Generation Method that will be employed:
'ORACLE': use Oracle's SEQUENCE 'SQL_SERVER': use SQL SERVER's IDENTITY column 'NAMED_SEQUENCE_TABLE': use USER designated SEQUENCE TABLE. User specifies the name of a DBMS Table with the schema (sequence INT) which will be used to hold sequence values Usage: automatic-key-generation |
home-call-router-class-name | The home-call-router-class-name specifies a custom class to be used for routing home method calls. This class must implement weblogic.rmi.cluster.CallRouter. If specified, an instance of this class will be called before each method call and be given the opportunity to choose a server to route to based on the method parameters. It either returns a server name or null indicating that the current load algorithm should be used to pick the server.
Usage: entity-clustering, stateful-session-clustering |
home-is-clusterable | The valid values of the home-is-clusterable parameter are "True" and "False."
If "True," this bean can be deployed from multiple servers in a cluster. Calls to the home stub will be load-balanced between the servers on which this bean is deployed, and if a server hosting the bean is unreachable, the call will automatically failover to another server hosting the bean. Usage: entity-clustering, stateful-session-clustering |
home-load-algorithm | The home-load-algorithm specifies the algorithm to use for load-balancing between replicas of this home. If this property is not specified, the algorithm specified by the server property weblogic.cluster.defaultLoadAlgorithm will be used.
The value of this element must be one of the following: RoundRobin Random Usage: entity-clustering, stateful-session-clustering |
idle-timeout-seconds | The cache (see "max-beans-in-cache" above) is scrubbed of inactive objects after at least this many seconds. Objects scrubbed are passivated.
Usage: entity-cache, stateful-session-cache |
initial-beans-in-free-pool | WebLogic EJB maintains a free pool of beans for every bean class.
This property decides the initial size of the pool Usage: entity-descriptor\pool, stateless-session-descriptor\pool, message-driven-descriptor\pool |
initial-context-factory | This element specifies the initial ContextFactory that the container will use to create its connection factories. If not specified, it will default to weblogic.jndi.WLInitialContextFactory.
Usage: message-driven-descriptor |
invalidation-target | The invalidation-target element specifies a Read-Only Entity EJB that should be invalidated when this Container-Managed Persistence Entity EJB has been modified.
Usage: invalidation-target |
enable-dynamic-queries | This optional element must be present for Dynamic Queries to be enabled for the EJB. Dynamic Queries are only available for EJB 2.0 CMP beans.
Usage: entity-descriptor |
is-modified-method-name | Applies to bean managed persistence or EJB 1.1 container-managed persistence entity EJBs. EJB 2.0 entity beans do not need to implement an is-modified-method. The EJB container can automatically detect which fields were modified in a transaction.
This parameter declares the name of an EJB method that tells the container whether the bean data has been modified. The method is called when the bean managed EJB is stored. If a method is not specified, WebLogic always assumes that the EJB has been modified and saves it. Providing a method and setting it as appropriate will improve performance. Usage: Persistence |
jms-client-id | The JMS specification allows JMS consumers to specify an associated id. This id is necessary for durable subscriptions to JMS topics.
Usage: message-driven-descriptor |
jms-polling-interval-seconds | Each Message-Driven EJB listens on an associated JMS destination. If the JMS destination is located on another WebLogic Server instance or a foreign JMS provider, it is possible that the JMS destination will become unreachable. In this case, the EJB container automatically attempts to reconnect to the JMS Server. Once the JMS Server is up again, the Message-Driven EJB can receive JMS messages.
The jms-polling-interval-seconds determines the number of seconds between each attempt to reconnect to the JMS destination Usage: message-driven-descriptor |
jndi-name | This specifies a jndi-name for a bean, resource or reference.
Usage: resource-description, resource-env-description |
key-cache-size | Optional size of key cache.
For <generator-type>ORACLE , this value MUST match the Oracle SEQUENCE INCREMENT value. If there is a mismatch between this value and the Oracle SEQUENCE INCREMENT value, then there will likely be duplicate key problems. For <generator-type>NAMED_SEQUENCE_TABLE , this tells how many keys the Container will fetch in a single DBMS call For <generator-type>SQL_SERVER, this value is ignored Usage: automatic-key-generation |
max-beans-in-cache | Maximum number of objects of this class that are allowed in memory.
Objects are kept in an LRU chain, and the ones dropped from the end of the chain are passivated. Usage: entity-cache, stateful-session-cache |
max-beans-in-free-pool | WebLogic EJB maintains a free pool of beans for every bean class.
This property decides the maximum size of the pool. Usage: entity-descriptor\pool, stateless-session-descriptor\pool, message-driven-descriptor\pool |
passivation-strategy | The passivation-strategy can be either "default" or "transaction". With the default setting the container will attempt to keep a working set of beans in the cache. With the "transaction" setting, the container will passivate the bean after every transaction (or method call for a non-transactional invocation).
Usage: entity-descriptor |
persistent-store-dir | The persistent-store-dir specifies the directory in the server's file system where the state of passivated stateful session beans is to be stored.
Usage: stateful-session-descriptor |
provider-url | This element specifies the URL provider to be put in the Properties used by the InitialContext. It is typically host:port and used in conjunction with initial-context-factory and connection-factory-jndi-name.
Usage: message-driven-descriptor |
read-timeout-seconds | The read-timeout-seconds is the number of seconds between ejbLoad calls on a Read-Only entity bean. If read-timeout-seconds is 0, ejbLoad will only be called when the bean is brought into the cache
Usage: entity-cache |
replication-type | The replication-type element describes how to replicate stateful session beans in a cluster. The legal values are:
"InMemory": The bean will be replicated in memory across the cluster "None": The bean will not be replicated. Usage: stateful-session-clustering |
res-env-ref-name | The res-env-ref-name element specifies the name of a resource environment reference
Usage: resource-env-description |
res-ref-name | The res-ref-name element specifies the name of a resource factory reference
Usage: resource-description |
run-as-identity-principal | The run-as-identity-principal element specifies which security principal is to be used for the run-as identity. This tag is necessary if the role specified in the run-as element of the ejb-jar.xml descriptor does not map to a single security principal representing a User in the security realm. This could be true in two cases. One case is where the role maps to multiple security principals (see security-role-assignment element). In this case, the run-as-identity-principal element must be used to specify which of the security principals you would like to be used. The other case is where the role maps to a single security principal that represents a Group in the security realm. In this case the run-as-identity-principal element must be used to specify a particular User in the security realm
Usage: weblogic-enterprise-bean |
stateless-bean-call-router-class-name | The stateless-bean-call-router-class-name specifies a custom class to be used for routing bean method calls. This class must implement weblogic.rmi.cluster.CallRouter. If specified, an instance of this class will be called before each method call and be given the opportunity to choose a server to route to based on the method parameters. It either returns a server name or null, indicating that the current load algorithm should be used to pick the server.
Usage: stateless-clustering |
stateless-bean-is-clusterable | The valid values of the stateless-bean-is-clusterable parameter are "True" and "False."The parameter is applicable only to session beans with a session-type value of "Stateless" (see ejb-jar.dtd).If home-is-clusterable is "True" and this parameter is also "true", calls to this bean stub will be load-balanced between all the servers on which this bean is deployed, and if a server hosting the bean becomes unreachable, the call will automatically failover to another server hosting the bean.
Usage: stateless-clustering |
stateless-bean-load-algorithm | The stateless-bean-load-algorithm specifies the algorithm to use for load-balancing between replicas of this bean. If this property is not specified, the algorithm specified by the server property weblogic.cluster.defaultLoadAlgorithm will be used.
The legal values of stateless-bean-load-algorithm are: RoundRobin Random WeightBased Usage: stateless-clustering |
stateless-bean-methods-are-idempotent | The value of the stateless-bean-methods-are-idempotent must be either "True" or "False."
This parameter is applicable only to session beans with a session-type of "Stateless" (see ejb-jar.dtd). The value should be set to "True" only if the bean is written such that repeated calls to the same method with the same arguments has exactly the same effect as a single call. This allows the failover handler to retry a failed call without knowing whether the call actually completed on the failed server. Setting this property to "true" makes it possible for the bean stub to automatically recover from any failure as long as another server hosting the bean can be reached. Usage: stateless-clustering |
trans-timeout-seconds | Sets the default timeout for container-initiated transactions for this bean. If a transaction's duration is longer than this value, it will be rolled back.
Usage: transaction-descriptor |
type-identifier | This stores the identifier of the Persistence Type that this tag describes.
Usage: persistence-type |
type-storage | The type-storage tag contains a file (path relative within the ejb-jar file) which stores data specific to this Persistence Type
Usage: persistence-type |
type-version | The type-version tag contains the version of the Persistence Type to be used for this particular bean. Most useful when a server deployment has multiple compatible versions of the same Persistence Type installed, as the Persistence Type identifier is not unique between versions
Usage: persistence-type |
Copyright (C) 2005. Sybase Inc. All rights reserved. |
![]() |