File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and Other Java EE Technologies and the fly likes why we implement session bean or entity bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "why we implement session bean or entity bean" Watch "why we implement session bean or entity bean" New topic
Author

why we implement session bean or entity bean

muthukumaran mohan
Greenhorn

Joined: Oct 09, 2001
Posts: 7
Dear All,
I have a simple doubt. Why we implement session bean or entity bean in Enterprice bean class. Actually we have to implement remote interface know, so that the method present in remote interface will be given definition. please clear my doubt.
with regards
thanx in advance
muthukumaran
Jorge Phillips
Ranch Hand

Joined: Jun 03, 2001
Posts: 43
All EJB's are accessed through interfaces (remote in 1.1, remote or local in 2.0).
Session beans provide functional or stateful process modeling and exist only throughout the client's session. Entity beans, on the other hand, are used for data modeling and provide persistent data and well mapping to persistent storage (relational DB, object DB). Entity bean extent or scope does not depend on the client's session extent.

So, if you are modeling process and don't need bean state (functional) or need only session-lived state, use a session bean (stateless or stateful, respectively). Otherwise if you are modeling data and need persistent state and want it mapped to a data store use an entity bean.
Hope this helps to clarify your issue.
vintu79
Greenhorn

Joined: Oct 30, 2001
Posts: 5
hi,
muthu i think u a bit confused by looking into RMI and EJB
on RMI our implemetation class as to implement the remote interface that we are using.in the case of EJB we are not doing so because the Implementation class are written are by the container automatically. ie during the time of deployment the container will generate you the implementaion class you can open the implementation class code and see you will find your remote interface implemented there.In weblogic during deployment you will get bean class with Impl you can check that for clarifications.while deploying EJB in weblogic you select keep code generated option this will give you the java file for the class that are created.

Originally posted by muthukumaran mohan:
Dear All,
I have a simple doubt. Why we implement session bean or entity bean in Enterprice bean class. Actually we have to implement remote interface know, so that the method present in remote interface will be given definition. please clear my doubt.
with regards
thanx in advance
muthukumaran

 
 
subject: why we implement session bean or entity bean
 
Threads others viewed
Doubt in SessionBean contract(ejb 3.0 core)
bean class doubt
Why do we need Entity Bean Local Component Interface ?
Session bean accessing entity
Architecture Doubt..
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture