# ejb



## mayer (9. Aug 2005)

Wann genau wird die ejbStore-Methode aufgerufen??

mfg manuel


----------



## Bleiglanz (9. Aug 2005)

> If the EJB container needs to synchronize the instance variables of an entity bean with the corresponding values stored in a database, it invokes the ejbLoad and ejbStore methods. The ejbLoad method refreshes the instance variables from the database, and the ejbStore method writes the variables to the database. The client may not call ejbLoad and ejbStore.
> 
> 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.


immer dann wenns nötig ist, das macht der Container für dich...


----------



## Guest (9. Aug 2005)

...und manchmal auch, wenn es gar nicht nötig ist, wodurch EJB's
so langsam sind. Selbst, wenn man es abfängt, die Methodenaufrufe
kosten viel Zeit.


----------

