users@glassfish.java.net

Re: How to take the same Stateful Bean from Remote RMI-IIOP and Local

From: <glassfish_at_javadesktop.org>
Date: Fri, 23 May 2008 07:19:54 PDT

A Singleton is used for shared state between multiple bean instances or bean components. A Stateful session bean is intended to model a conversation with a single client. A shopping cart is the canonical example of a stateful session bean use case. If you went into a grocery store, you wouldn't want many customers using the same shopping cart.

The shared vs. single-client distinction is fundamental to the component semantics. It wouldn't make sense to simply change the stateful session bean model to provide both kinds of behavior.
[Message sent by forum member 'ksak' (ksak)]

http://forums.java.net/jive/thread.jspa?messageID=276312