-----Original Message-----
From: RAVIKHANDELWAL [SMTP:[EMAIL PROTECTED]]
Sent: Friday, November 12, 1999 11:11 AM
To: [EMAIL PROTECTED]
Subject: Entity Beans in EJB
Greetings!
1. Is it correct to say that entity beans simply represent persitence
support in EJB environment, that is if you have identified any data which
needs to be persistent , you must represent it as an entity bean.
[Parikshit Pol]
Mostly yes.
2. Is it also correct if I say that an entity bean represents a row in a
database. Hence if have a query which should return multiple records , that
query must be put in a session bean. Similarly, if multiple updates and
deletes are required that too must be put in a session bean.
[Parikshit Pol]
Not necessarily. A finder method can return a collection.
3. Sometimes data is directly read by a session bean using JDBC. What will
happen if that data is in an entity bean instance and the entity bean
transaction isolation level has been marked as TX_SERIALIZABLE
[Parikshit Pol]
Actually i tried to access the same record through multiple clients at the same time
and the entity bean had the TX_SERIALIZABLE set ( i mapped entity beans to a record
in a table). and i could actually access the same record in all the clients.
help anyone??
4. If I want to do a batch update , performance wise using JDBC from a
session bean will be faster. instead of calling findByPrimaryKey multiple
times and invoking delete method of entity EJB object.
[Parikshit Pol]
u can get a collection object thru a finder method and then call updates on the beans
(RI) in the collection object.
regards,
[Parikshit Pol]
Regards
Ravi
===========================================================================
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".
�������������������������o 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".