Why weblogic ejb jar.xml




















Clustering must be enabled for the EJB. To enable clustering, see entity-clustering , stateful-session-clustering , and stateless-clustering. The methods on stateless session bean homes and read-only entity beans are automatically set to be idempotent.

It is not necessary to explicitly specify them as idempotent. Specifies whether the EJB supports or requires identity assertion. Defines the maximum length of time an EJB should remain in the cache. After this time has elapsed, WebLogic Server removes the bean instance if the number of beans in cache approaches the limit of max-beans-in-cache.

The removed bean instances are passivated. Also defines the maximum length of time an EJB should remain idle in the free pool before it is removed.

After this time has elapsed, WebLogic Server removes the bean instance from the free pool so long as doing so will not cause the number of beans in the pool to fall below the number specified in initial-beans-in-free-pool.

The following entry indicates that the stateful session EJB, AccountBean , should become eligible for removal if max-beans-in-cache is reached and the bean has been in cache for 20 minutes:. Specifies security configuration parameters at the bean level. If you specify a value for initial-beans-in-free-pool , you set the initial size of the pool.

WebLogic Server populates the free pool with the specified number of bean instances for every bean class at startup. Populating the free pool in this way improves initial response time for the EJB, because initial requests for the bean can be satisfied without generating a new instance.

See pool. Specifies the initial context factory used by the JMS provider to create initial context. See also message-destination-descriptor.

Specifies the transport integrity requirements for the EJB. Using the integrity element ensures that the data is sent between the client and server in such a way that it cannot be changed in transit. The specified method must return a boolean value. Providing a method and setting it as appropriate can improve performance for EJB 1. Defines method-level transaction isolation settings for an EJB. Allowable values include:.

This isolation level can be used to avoid the error:. This causes the selected rows to be locked for update. Refer to your database documentation for more information on support for different isolation levels. See transaction-isolation. Required for durable subscriptions to JMS topics. Specifies the number of seconds between each attempt to reconnect to the JMS destination.

Each message-driven bean listens on an associated JMS destination. Once the JMS Server is up again, the message-driven bean can again receive messages. See resource-description and ejb-reference-description.

If a bean has both a remote and a local home, then it can be assigned two JNDI names; one for each home. Specifies the maximum number of objects of this class that are allowed in memory. Specifies the maximum number of messages that can be in a transaction for this MDB. WebLogic Server maintains a free pool of EJBs for every entity bean, stateless session bean, and message-driven bean class.

The max-beans-in-free-pool element defines the size of this pool. For information on caching read-only entity queries at the application level, see. Maps a message destination reference in the ejb-jar. Specifies the name of a message destination reference.

This is the reference that the EJB provider places within the ejb-jar. See message-destination-descriptor. Specifies the EJB interface to which WebLogic Server applies isolation level properties, if the method has the same signature in multiple interfaces. If you specify a method-name , the method must be available in the specified ejb-name. Specifies the fully-qualified Java type name of a method parameter. See method-params.

The method-params element contains one or more method-param elements, as shown here:. Assigns a custom network channel that the EJB will use for network communications.

A network channel defines a set of connection attributes. The passivate-as-principal-name element, introduced in WebLogic Server 8. If passivate-as-principal-name is set then use that principal else if a run-as role has been specified for the bean in ejb-jar. The passivate-as-principal-name element only needs to be specified if operations within ejbPassivate require more permissions than the anonymous principal would have.

This element affects the ejbPassivate methods of stateless session beans when passivation occurs due to a cache timeout. See also remove-as-principal-name , create-as-principal-name , and principal-name. Required only for entity EJBs that use container-managed persistence services. The persistence element defines the following options that determine the persistence type, transaction commit behavior, and ejbLoad and ejbStore behavior for entity EJBs in WebLogic Server:.

The persistence-use element stores an identifier of the persistence type to be used for this particular bean. Specifies a file system directory where WebLogic Server stores the state of passivated stateful session bean instances. If you do not specify a persistent store name in this element, WebLogic Server stores timer objects in the default store.

The options are:. Specifies the name of an actual WebLogic Server principal to apply to the specified role-name. At least one principal-name is required in the security-role-assignment element.

You may define more than one principal-name for each role-name. See security-role-assignment. Specifies the number of seconds between ejbLoad calls on a Read-Only entity bean. A value of 0 causes WebLogic Server to call ejbLoad only when the bean is brought into the cache. The following entry causes WebLogic Server to call ejbLoad for instances of the AccountBean class only when the instance is first brought into the cache:.

Specifies the length of time that a remote RMI client will wait before it will time out. The following entry causes a remote RMI client to timeout after waiting 5 seconds. This parameter only needs to be specified if operations within ejbRemove need more permissions than the anonymous principal would have. The remove-as-principal-name element, introduced in WebLogic Server 8.

If remove-as-principal-name is set then use that principal else if a run-as role has been specified for the bean in ejb-jar. The remove-as-principal-name element only needs to be specified if operations within ejbRemove require more permissions than the anonymous principal would have. This element effects the ejbRemove methods of stateless session beans and message-drive beans. See also passivate-as-principal-name , create-as-principal-name , and principal-name. If you select None , the state is not replicated.

See stateful-session-clustering. See resource-description. Specifies the name of a resourcefactory reference. Required element if the EJB specifies resource references in ejb-jar. Identifies the resource adapter that this MDB receives messages from. Maps a resource reference defined in ejb-jar.

Maps a resource environment reference defined in ejb-jar. Note: While it is possible to set this value to less than or equal to 0, BEA recommends that you do not do so because the EJB container will not retry transactions when this value is not greater than or equal to 1.

Specifies the number of times you want the EJB container to automatically retry a container-managed transaction method that has rolled back. Specifies the methods for which you want the EJB container to automatically retry container-managed transactions that have rolled back. Automatic transaction retry is supported for session and entity beans that use container-managed transaction demarcation.

Additionally, regardless of the methods specified in this element, the EJB container does not retry transactions that fail because of system exception-based errors. Identifies an application role name that the EJB provider placed in the ejb-jar.

Subsequent principal-name elements in the element map WebLogic Server principals to the specified role-name. The run-as-identity-principal element specifies which security principal name is to be used as the run-as principal for a bean that has specified a security identity run-as-role-name its ejb-jar.

For an explanation of how the mapping of run-as role-names to run-as-identity-principals or run-as-principal-names occurs, see the comments for the run-as-role-assignment element. Specifies which security principal name is to be used as the run-as principal for a bean that has specified a security-identity run-as role-name in its ejb-jar. For an explanation of how the mapping of run-as role-names to run-as-principal-names occurs, see the comments for the run-as-role-assignment element.

Maps a given security-identity run-as role-name specified in the ejb-jar. The value of the run-as-principal-name for a given role-name that is specified here is scoped to all beans in the ejb-jar. The run-as-principal-name value specified here can be overridden at the individual bean level by specifying a run-as-principal-name under that bean's weblogic-enterprise-bean element.

Suppose that in the ejb-jar. Consider the following excerpts from the corresponding weblogic-ejb-jar. Each of the beans chooses a different principal name to use as its run-as-principal-name :. Specifies a security permission that is associated with a J2EE Sandbox. For more information, see Sun's implementation of the security permission specification:. Specifies a single security permission based on the Security policy file syntax. PropertyPermission "java.

This is necessary because the EJB stub's classpath is lib. Maps application roles in the ejb-jar. Maps a Web Service destination reference in the ejb-jar. Determines how long the EJB container leaves a passivated stateful session bean on disk.

We'll look at these aspects in detail in later sections of this chapter. For a full definition of the deployment elements in the ejb-jar. Listing In the assembly-descriptor element, we define a method tag that defines the transaction properties of this bean. In this case, all methods have a transaction attribute of Required that was explained earlier in the chapter. This section describes the WebLogic-specific deployment descriptors that contain elements specific to the WebLogic Server and not identified by the EJB 2.

This file contains more properties of the bean's deployment, but only those that are specific to WebLogic Server, including concurrency, caching, and clustering of the beans. The weblogic-ejb-jar. Within this root element, you may have the following element stanzas:.

Optional security role assignments to the roles defined in the ejb-jar. Here, we look into the contents of this stanza for a Stateless Session bean. Each of these properties identifies several parameters to the WebLogic container that further define the deployment properties of the beans. Several other properties can be defined here. This name must match that of one bean that is defined in the ejb-jar. More about this tag in the section that discusses transactions later in this chapter.

More on this tag in the section that discusses bean references later in this chapter. By default, call by reference is disabled. When it's turned on and a client located in the same container as a bean invokes this bean using remote interfaces, WLS automatically optimizes the call, bypassing the RMI communication.

The remote object will in effect perform like a local object. By default, parameters are passed by value. This parameter is set either to True or False. By default, the WebLogic Server container disables call by reference. Enabling call by reference causes any changes that are made to the parameter objects to be visible to the caller. If your bean can handle this, you can explicitly enable call by reference.

The name under which this bean has to be loaded to be looked up remotely. Use this tag only if you're using remote interfaces. The name under which this bean has to be loaded to be looked up locally.

Use this tag only if you are using local interfaces. For a detailed reference on the parameters in the weblogic-ejb-jar.

It's used to define entity relationships managed by CMP as well as parameters such as the data source and the table name for the Entity bean. As mentioned in the previous sections, the deployment descriptors are simply XML files and can be created using any text editor. Home New Browse Search [?

Bug - weblogic-ejb-jar. Note You need to log in before you can comment on or make changes to this bug. Description chase UTC. Status : NEW. WebLogic show other bugs.



0コメント

  • 1000 / 1000