[EMAIL PROTECTED] wrote:

Hi all,

I have modifieed my beans as follows in the deployment descriptor (jboss.xml):



[snip]

I also switched to commit option 'A', because the container is the only application modifying the database data:

<container-configurations>
  <container-configuration extends="Standard CMP 2.x EntityBean">
       <container-name>CMP 2.x and Cache</container-name>
       <commit-option>A</commit-option>
  </container-configuration>
</container-configurations>



Look at the pay-for documentation for jboss page 290, or page 264 in the EJB 2.0 spec from sun.
Commit option A means that:
•For commit-option ‘A’, this instance is cached and used between transactions.


•For commit-optoin ‘B’, this instance is cached and used between transactions, but is marked as ‘dirty’ at the end of a transaction. This means that at the start of a new transaction ejbLoad must be called.

•For commit-option ‘C’, this instance is marked as ‘dirty’, released from the cache, and marked for passivation at the end of a transaction.

And the JBoss specific:
•For commit-option ‘D’, a background refresh thread periodically calls ejbLoad on stale beans within the cache. Otherwise, this option works in the same way as ‘A’.


This means that the commit-option a is the one requiring most DB lookups. We switched from A to B and now only the first big lookups take time, the following DB requests are retrieved from the cache.

Option B and C means that the DB can be in inconsisten states, since the updated version are in the JBoss cahce only. This also means that the only DB updates happening should run through your JBoss app.

Hope this helps..

Regards,
Olve



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to