Posted by: Irfan on: May 5, 2007
Entity Bean
An entity bean is representation of single row in a databases. Entity always be an heavy component. But the connectivity to database will be a transparent to developer. When you create a new entity bean automatically in database new row will be added.
ORM - Object Relational Mapping, row in a table will be one object in memory.
Stateless Session Bean can have pooled creation.
Statefull Session Bean can have cached creation.
But Entity bean can have either cache or pooled creation.
Whenever you need to work with processed or in other words process matters over data you should use session bean. But whenever you want to work with DATA or in other words DATA matters over process you should use entity beans.
Entity beans are heavy object because its a in memory object for database table. Where each instance of entity bean object refer to one record set in table or row in table.
Entity beans are of two types
Bean Managed Persistence
Container Managed Persistence
CMP Bean
Local Client
Remote Client
Favourite topic WSAD entity bean example
without writing a single line of code get the entity bean in place here we go
This how you will be testing tyour entity beans. Just now what we have seen is the Top to Bottom appoch, we have another approach which is Bottom to Top where in we will be having table already existing in and then will be creating the entity bean accordingly.
Facts……….
-EJB can be accessed using servlet
-Entity Bean should not be remote
-Session Bean should not be local
-In entity bean you should not use primitive data-type.
Recent Comments