Where a bean can be used ?

Answer Posted / john

An EJB is used to create business applications for any
e-commerce web sites.
But there are different EJBs
1) Statless Session Bean
2) Stateful Session Bean
3) Entity Bean
4) Message Bean

Depending on their functionality of each of the above
mentioned beans different requirements can be satisfied.
Therefore EJBs can be used for a wide variety of business
applications

example
Stateless Session Bean - used to check if a credit card is
valid or not when a credit card is swiped in the machine.
since there is just one trtansaction involved no need
maintain the state of the bean

Stateful Session Bean - used in online shopping websites
like ebay, amazon where the state of the client has to be
maintained. The user can do different operation during a
single logon but the items in the users shopping cart should
never be lost.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When was ejb developed?

570


Explain the architectural relationship between JavaBeans and JTA?

2389


What is passivation and activation in ejb?

534


What is difference between stateless and stateful?

495


What’s the difference between hibernate and ejb 3? Don’t you think ejb 3 is just a clone of hibernate?

547






What are the design principles for ejb?

522


can we stop the execution of a method before completion?

2507


What are the types of enterprise bean?

562


What is the difference between message driven beans and stateless session beans?

519


What optimization could I use if the ejb container is the only point of write access to the database?

566


What is dependency injection in ejb?

534


Should services be stateless?

493


How does ejb invocation take place?

569


Can you be deported if you are stateless?

474


What is singleton session bean?

578