Forums Register Login

why we implement session bean or entity bean

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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


If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 694 times.
Similar Threads
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..
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:36:17.