>
> I believe both you and Avi are confusing what
> ejbPassivate/ejbActivate do on
> entity beans with what they do on stateful session beans.
> For stateful session
> beans, after ejbPassivate is called, the bean is serialized
> and stored to
> some persistent storage (typically, to the file system,
> perhaps via a database).
> For entity beans, however, after ejbPassivate is called, the
> entity does not
> have to be serialized, or stored on disk, or anything else.
> It simply moves
> from the "ready" bin to the "pooled" bin, which is probably a
> fairly trivial
> operation. There should not be any memory or disk overhead
> associated with a
> passivated entity bean, and thus it is certainly not
> computationally expensive
> to passivate.
Can you explain why EB passivation is so different? Consider the following:
public class EB implements EntityBean {
public int cmpField;
private int myStuff;
// ...
public void sneaky() {
myStuff = 42;
}
public void doit() {
cmpField = myStuff;
}
}
Now suppose a client calls, in a single transaction, sneaky() and then
doit(). How can the container passivate the instance between those method
calls without losing data? Or is "private int myStuff" illegal?
As a matter of fact, I have many lazy stores (where doit() is actually
ejbStore()). Are they all broken?
- Avi
--
s/\be(\w+)/e-\1/g;
===========================================================================
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".