dcsimg
Why entity bean is the best way to persistence instend of session bean
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sankar_subramani
Posted On:   Monday, February 10, 2003 09:32 PM


The entity bean is used to represent data in the database.
We can do this in any one of the way like container-managed persistence (CMP) and bean-managed persistence (BMP).
In the second way bean developer has to write code to read and write class member veriable to the database.
I think developer can write code for database operation in session bean.In session bean user can write code to persistence than what is the use of entity bean's bean-managed persistence.
.

Re: Why entity bean is the best way to persistence instend of session bean

Posted By:   vinay_salehithal  
Posted On:   Tuesday, February 11, 2003 04:30 PM

there is much more to ejb's, read the specs or get a good book.

Re: Why entity bean is the best way to persistence instend of session bean

Posted By:   Bozidar_Dangubic  
Posted On:   Tuesday, February 11, 2003 06:08 AM

well, for one concurrency. ejb container allows access by multiple clients to the same instance of the entity bean allowing concurrent access to data. remember that irregardless whether you are talking about stateless or stateful session beans, they represent a single client session and therefore it would be extremely difficult for you to provide concurrency implementing persistence with session beans.

your question is also not valid because there are always ways in which you can do things differently. sun provided a specification for you and there are certain things that the specification guarantees for you. once you step outside this boundary you are pretty much on your own. you can still use the platform, but you would not be very efficient.
About | Sitemap | Contact