LERBSCHER wrote:
> Hi,
> How the container manages it the persistence of beans " Entity CMP ". At
> what moment starts it the accesses to the data base?
> Jean-Pierre
Hi,
Answering your first question would be quite long ! But a summary
could be that "all what you would have written in BMP for data access
is generated in CMP" (e.g. in the eb example, the AccountImplBean.java
is the bean provider class, and GenIC generates the
JOnASAccountImplBean.java, which contains all the data access code,
in ejbCreate, ejbLoad, ejbStore, ejbRemove, ejbFindXXX, ...).
To answer your second question, the database is first accessed the first
time you do one of the following operations
- create an instance (create-> ejbCreate -> datasource.getConnection)
- retrieve an instance (findXXX ->ejbFindXXX-> datasource.getConnection)
- invoke a business method (m1 -> ejbLoad -> datasource.getConnection)
- remove an instance (remove -> ejbRemove -> datasource.getConnection)
These are the main principles, in addition there is connection pooling,
data caching, etc..
Best Regards,
François
--
==================================================================
Francois EXERTIER Evidian (Groupe Bull)
1, rue de Provence, BP 208, 38432 Echirolles cedex, FRANCE
mailto:[EMAIL PROTECTED]
http://www.evidian.com/jonas http://www.objectweb.org/jonas
Tel: +33 (0)4 76 29 71 51 - Fax: +33 (0)4 76 29 77 30
==================================================================
----
This list is cross-posted to two mail lists. To unsubscribe,
follow the instructions below for the list you subscribed to.
For objectweb.org: send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe ejb-container-group".
For enhydra.org: send email to [EMAIL PROTECTED] and include
in the body of the message "unsubscribe ejb-container-group".