File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 33126

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]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, 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!