I'm using the
J2EE (1.2.1) tutorial and I'm going to ask a question that has to do with the Account example. On page 48, it says
If a business method is associated with a transaction, the container invokes ejbLoad before the business method executes. Immediately after the business method executes, the container calls ejbStore. Because the container invokes ejbLoad and ejbStore, you do not have to refresh and store the instance variables in your business methods - the container performs these functions for you.
Further, for this particular tutorial, they specify that all methods 'require' transaction.
My question is this: What if a bean's instance variables are changed by a non-transactional method, and then no other transactional methods are called before ejbPassivate is called by the container? Will the changed data be lost? Or will the container call the ejbStore? (This is BMP also)
I'm not sure how to force passivation, so I can't
test this out.
[This message has been edited by Mike Curwen (edited April 17, 2001).]