Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What does exactly a 'stateless' mean?

843830Oct 10 2004 — edited Oct 18 2004
Dear Experts,
I am new to EJB programming.
When going thro a book on EJB, I see the following explanation for stateless session beans.

"Stateless session beans hold no conversational state on behalf of clients.
Although they can contain internal state,their state is not customized.
They cannot retain state between method calls.

Every time requests come in from a client,a different stateless session bean instance can service that request.
This is because stateless sessions hold conversations spanning a single method request and are free of client-specific

state
after each method call.
All stateless session beans think they are in the same state after a mehod call;They are effectively unaware that

previous method calls even happened.
Therefore the container can dynamically reassign beans to client requests at the per-method level.

A different stateless bean can service each method call from a client."

Experts, Though i can barely understand the details, i could not know how can I write a program to test the
logic visually.

Could anybody gimme a code snippet that exactly explains the statelessness of a session bean.
It would be of great help for the beginners to form a firm gound.

Thank you
Unique
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2004
Added on Oct 10 2004
6 comments
473 views