12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Setting Properties<br />

Table 16.1<br />

ejb.maxBeansInTransactions lava.lang.Integer 500*<br />

(see<br />

Descri<br />

ption)<br />

These properties are for CMP 2.x implementations only:<br />

A transaction can access any/<br />

large number of entities. This<br />

property sets an upper limit on the<br />

number of physical bean<br />

instances that EJB container will<br />

create. Irrespective of the number<br />

of database entities/rows<br />

accessed, the container will<br />

manage to complete the<br />

transaction with a smaller number<br />

of entity objects (dispatchers).<br />

The default for this is calculated<br />

as ejb.maxBeansInCache/2. If the<br />

ejb.maxBeansInCache property is not<br />

set, this translates to 500.<br />

ejb.TransactionCommitMode Enumerated Shared Indicates the disposition of an<br />

entity bean with respect to a<br />

transaction. Acceptable values<br />

are:<br />

■ Exclusive: This entity has<br />

exclusive access to the<br />

particular table in the<br />

database. The state of the<br />

bean at the end of the last<br />

committed transaction can be<br />

assumed to be the state of the<br />

bean at the beginning of the<br />

next transaction.<br />

■ Shared: This entity shares<br />

access to the particular table<br />

in the database. However, for<br />

performance reasons, a<br />

particular bean remains<br />

associated with a particular<br />

primary key between<br />

transactions to avoid<br />

extraneous calls to<br />

ejbActivate() and<br />

ejbPassivate() between<br />

transactions. The bean stays<br />

in the active pool.<br />

■ None: This entity shares<br />

access to the particular table<br />

in the database. A particular<br />

bean does not remain<br />

associated with a particular<br />

primary key between<br />

transactions, but goes back to<br />

the ready pool after every<br />

transaction.<br />

Table 16.2 Entity properties for CMP 2.x<br />

Property Type Default Description<br />

ejb.invalidateFinde<br />

rCollectionAtCommit<br />

Entity properties (continued)<br />

Property Type Default Description<br />

java.lang.Boolean False Whether or not to optimize<br />

transaction commit by invalidating<br />

finder collections. CMP 2.x only.<br />

ejb.cacheCreate java.lang.Boolean True Whether or not to attempt to cache<br />

the insert of the entity bean until the<br />

ejbPostCreate is processed.<br />

148 BES Developer’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!