users@glassfish.java.net

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

From: Miroslav Nachev <miro_at_space-comm.com>
Date: Fri, 23 May 2008 01:21:21 +0300
In case that in the future there will be a Singleton bean I can not see why to use Stateful beans? Can you point me some reason when to use Singleton and when Stateful? In my opinion Singleton bean can replace 100% Stateful bean. The opposite is not true.


Miro.

glassfish@javadesktop.org wrote:
OK. The issue 5052 with test case is entered.
      

The code is behaving as required by the spec.  It's not useful to store a stateful session bean
reference within a stateless session bean.  An invocation on a stateless session bean
reference can be processed by *any* bean instance.  There's no guarantee that the same stateless
session bean instance will be used for two successive invocations.  

The EJB spec does not currently define a good way to share transient state between the
components of an EJB application.  We're planning to add a new Singleton component in the next 
version of the spec to address this shortcoming.
[Message sent by forum member 'ksak' (ksak)]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net