For entity beans that use bean-managed persistence, you can configure when EAServer calls the ejbStore method by setting the com.sybase.jaguar.component.store property for the component, using jagtool or the Advanced tab in the EAServer Manager Component Properties dialog box.
This property specifies when ejbStore must
be called. The default value of afterCreate,afterInvoke
is
required for EJB 2.0 compliance and is safe for all compliant entity
bean implementations.
If you insert values in the ejbCreate method,
and do not modify any field values in the ejbPostCreate method,
you can safely remove afterCreate
from
the setting. Doing so improves performance by eliminating redundant
updates to the database.
You can use the beforeCompletion
setting
rather than afterInvoke
if
all updates to one table come from one entity bean, and you do not
mind if finder methods return stale values because updates are deferred
during a transaction. While this setting yields the best performance,
you may get the wrong result in architectures where more than one
component can update a table, for example, if two entity beans in
one transaction update the same table, or if updates from session
and entity beans are mixed in one transaction.
Copyright © 2005. Sybase Inc. All rights reserved. |