You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Amit Puri <pu...@gmail.com> on 2009/10/28 07:30:57 UTC

data cache settings in BMP entity bean

Hello All

In EJB spec, "Commit Options" A,B, C are defined. We want to use Commit
option A in the case of BMP entity beans. In openejb, I have found cache
element which can be used in the case of CMP to configure data cache
settings

 <cache>
    <isolation-level></isolation-level>
    <size></size>
  </cache>

where isolation level can be read-uncommitted, read-committed, or
repeatable-read.

Can somebody please tell me how to configure data cache for BMP entity beans
in openejb?

Thanks a lot for your help.

Regards,
Amit

Re: data cache settings in BMP entity bean

Posted by Amit Puri <pu...@gmail.com>.
Hello All

I have seen Commit Option setting in JBoss. They have this setting in
jboss.xml like this
---------------------------------------------------
<container-configurations>
        <container-configuration>
            <container-name>Standard BMP EntityBean</container-name>
            <commit-option>A</commit-option>
          </container-configuration>
</container-configurations>
----------------------------------------------------

In EJB 2.1 specifications, it is defined like this:
----------------------------------------------------
12.1.11 Commit Options

The Entity Bean protocol is designed to give the container the flexibility
to select the disposition of the instance state at transaction commit time.
This flexibility allows the container to optimally manage the caching of
entity object’s state and the association of an entity object identity with
the enterprise bean instances.
The container can select from the following commit-time options:
• Option A: The container caches a “ready” instance between transactions.
The container ensures that the instance has exclusive access to the state of
the object in the persistent storage. Therefore, the container does not have
to synchronize the instance’s state from the persistent storage at the
beginning of the next transaction.
• Option B: The container caches a “ready” instance between transactions. In
contrast to Option A, in this option the container does not ensure that the
instance has exclusive access to the state of the object in the persistent
storage. Therefore, the container must synchronize the instance’s state from
the persistent storage at the beginning of the next transaction.
• Option C: The container does not cache a “ready” instance between
transactions. The container returns the instance to the pool of available
instances after a transaction has completed.
----------------------------------------------------

Thanks for the help.

Regards,
Amit

On Wed, Oct 28, 2009 at 12:00 PM, Amit Puri <pu...@gmail.com> wrote:

> Hello All
>
> In EJB spec, "Commit Options" A,B, C are defined. We want to use Commit
> option A in the case of BMP entity beans. In openejb, I have found cache
> element which can be used in the case of CMP to configure data cache
> settings
>
>  <cache>
>     <isolation-level></isolation-level>
>     <size></size>
>   </cache>
>
> where isolation level can be read-uncommitted, read-committed, or
> repeatable-read.
>
> Can somebody please tell me how to configure data cache for BMP entity
> beans in openejb?
>
> Thanks a lot for your help.
>
> Regards,
> Amit
>