Hi, Another option could be that the Session Bean instantiates and registers a rmi object if it does not exist, and use this object as the global state. I think it must not be difficult to register a rmi object in the Orion rmi registry. I will try ... Do you find suitable this solution ? Or you find more correct to use an Entity Bean ? Another question: Configurable EJB start-up. Is it possible in any server or is included in the spec any way of configuring EJB start-up ? Let�s say a CheckerEJB that wakes up at ten o�clock in order to update some information. Is it possible to set this in any server ? Jens Stutte wrote: > As far as i know, there is no other way than defining a real entity bean to > store something. One could think to use static variables within a stateless > session bean, but this approach fails if it comes to clustered servers with > multiple JVMs (and nobody can guarantee anything about the lifetime of a > static variable, when the bean is no longer in use in a single JVM model, > too). The spec does not define some sort of "stateful server bean" to store > temporary information within server lifetime, so you have to simulate it by > an entity bean (which means, to ensure transaction safe behaviour and so on > you'll need a database...). BTW, this is not very orion specific ;-). > > Jens Stutte > > -----Urspr�ngliche Nachricht----- > Von: Pedro Garcia Lopez [mailto:[EMAIL PROTECTED]] > Gesendet am: Donnerstag, 25. Mai 2000 13:01 > An: Orion-Interest > Betreff: EJB state question > > Hi all, > > How can I maintain non-persistent state in a component that will be > accesed by multiple clients ? > > For example, I have a component that subscribes to a JMS topic and > listen for events. > I created a Stateless Session Bean with a getLastMesssage() methof that > returns the last message obtained from the topic. > But, due to the stateless nature of the session bean, it always returns > the default value. > If it is statful is only valid for a client, so ... > > Is it possible in the EJB model to create a component that maintain > state and it is accesed for several users ? > > In the Web model (WAR) you can use a bean with application scope, but, > how can I do it with EJBs ? > > Regards,
