Hello
i am new to EJB. i have knowledge about how to deploy Session Beans and Entity Beans.
But i do not know when I choose Session Beans or Entity Beans
If it is Entity Bean, when we use BMP or CMP.
If you have any links for the above, please provide.
Please advice.
Advance Thank you.
Ranjitha
-
Which Bean we choose? (4 messages)
- Posted by: Ranjitha Rajan
- Posted on: April 27 2005 00:25 EDT
Threaded Messages (4)
- Reply : Which Bean we choose? by Nischal Tanna on April 27 2005 07:51 EDT
- Which Bean we choose? by Amit Kumar on May 03 2005 16:36 EDT
- Which Bean we choose? by Ranjitha Rajan on May 05 2005 11:36 EDT
- Which Bean we choose? by Jyothish John on July 15 2005 07:39 EDT
-
Reply : Which Bean we choose?[ Go to top ]
- Posted by: Nischal Tanna
- Posted on: April 27 2005 07:51 EDT
- in response to Ranjitha Rajan
It depends on your requirement
Entity Beans - Use
1. when you want a tight coupling between the database and the application
2. when you have proper expertise/infrastructure/cluster environments,etc.
CMP - use when you dont want to write the sql queries for CRUD (create,read,update,delete) operations. Also, if using Entity Bean, CMP is the best choice in current scenario as CMP 2.0(as per my info) is more efficient as compared to previous version.
BMP - use when you want to write sql queries urself (executing procedures,etc. which are not possible in CMP). Also, in BMP there is less worry if any time there's an environment change in the form of Application Server i.e., it is a less pain in BMP and more pain in CMP.
Going by the current practices, Session Beans are the most used, however after the recent evolution of CMP, peopl have started using CMP as well.. -
Which Bean we choose?[ Go to top ]
- Posted by: Amit Kumar
- Posted on: May 03 2005 16:36 EDT
- in response to Ranjitha Rajan
Use Session Bean to represent a task/processing like User Registration etc.
Entity Beans for object like User, Student etc. which has to persist somewhere.
Use BMP:
If and only if,
- You need to retrieve data from some kind of source which is not supported by CMP.
- You have to do major data manipulate before/after saving/retrieving from/to source.
- Have to get the consolidated data from different sources.
..and so on...
Otherwise, keep your life easy with CMP or best with Hibernate or JDO.
Regards
Amit -
Which Bean we choose?[ Go to top ]
- Posted by: Ranjitha Rajan
- Posted on: May 05 2005 11:36 EDT
- in response to Ranjitha Rajan
Thank you for your information.
i got more knowledge about subject.
Could you have any particular site about this, please let me know.
Thanks once again -
Which Bean we choose?[ Go to top ]
- Posted by: Jyothish John
- Posted on: July 15 2005 07:39 EDT
- in response to Ranjitha Rajan
Go to the free books section in this site and download mastering ejb3 free pdf;)
That explains this stuff than anything else;)
Regards