On Mon, 14 Aug 2000 23:39:27 GMT, Tom Jordan <[EMAIL PROTECTED]>
wrote:
>I am okay with not implementing an ejbStore() and I guess I could do the
>same by maintaining an isModified variable right? We are using BMP and want
>these beans to run on several app servers. I am not familiar with Commit
>Option A - is this defined in the spec?
Yes, this is in the spec. Option A is to keep state as valid on tx
commit. This will avoid ejbLoad to be called on next tx start.
>The thing that I am concerned about is that, I am seeing in most servers,
>that when a method is called on an entity bean with which as the TX_REQUIRED
>flag, an ejbstore and ejbload are both called.
>1) Should a different flag be used?
Yes, your server should have a setting for the above.
>2) Is there a way to control the database calls in ejbLoad()? I was thinking
>about using the ismodified flag as away to control when the ejbload() goes
>tot the database.
Yes, you could use a flag to determine if the ejbLoad call is the first
after an ejbActivate. Set it to true in ejbActivate, and then in
ejbLoad:
if (justActivated)
{
doLoad();
justActivated=false;
}
This means that even if the container calls ejbLoad alot of times, you
will only do the load once.
However, your server should be able to support commit option A (if it's
any good I mean ;-)
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".