This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes stateless session bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "stateless session bean" Watch "stateless session bean" New topic

stateless session bean

Geetu Bahl

Joined: Dec 01, 2004
Posts: 14

My question is , why does a stateless session bean doesn't store state even though it has ejbActivate() and ejbpassivate() methods.

Pleas explain ???

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32312

The main reason is that stateless and stateful session beans share the same interface. Therefore both have to implement the same methods. The only thing that differentiates the two is in the deployment descriptor.

In EJB 3.0 (due out in 2006), we will no longer need to implement these useless methods.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Geetu Bahl

Joined: Dec 01, 2004
Posts: 14
Thanks Jeanne
I agree. Here's the link:
subject: stateless session bean
It's not a secret anymore!