Share data between EJB instances

We want to develop a statefull EJB, but we want that all of its instances have the same data. Can we share information between them? (no with a database)Andeka Puente
[187 byte] By [andeka] at [2007-9-26 1:29:02]
# 1

Just like in case of Stateless Session Beans where we generally use DAO(data access objects) you can use similar concept for your problem. You can write a java program which consists of variables only , you can access the variables of this class wherever needed in stateful session beans.

harpreet_hira at 2007-6-29 1:15:43 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
YOu can also use JNDI to share the data between different stateless beans, but you can not store primitive types using JNDI, they have to converted to classes using Wrapper classes.
harpreet_hira at 2007-6-29 1:15:43 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...