0 Replies Latest reply on Jan 19, 2006 8:56 AM by Gabriel Nicula

    Common memory area

    Gabriel Nicula Newbie

      I would need to implement a common memory area that all instances of a certain

      stateless EJB could access - in fact a simple hashtable that contains general data -

      and of course with access synchronization.
      If I use only one JVM I can use a Singleton class containing a Hashtable - but I need

      to be able to deploy our app on clusters.
      A few years ago our server was a Java program with socket connections, and implementing

      a common memory area (with access synchronization) was extremely simple.

      What we've done was to use a simple RMI call to a java program running outside the

      beans container (our app has to be able to run on JBoss but also on other containers) -

      this is the method prescribed by Floyd Marinescu for implementing TRUE singletons on

      J2EE with clustering - but it's a little slow for what we need, and it's an inelegant

      solution.

      Are there other options? Could JBoss Cache help me with this? From what I've read it

      seems it is more than a Hashtable for strings (what we need) - and couldn't find any

      example for using JBoss Cache for strings.

      Any help would be highly appreciately.
      Thanks.