• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JNDI nameservive as a temporary storage in cluster

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
Is it possible to use JNDI based naming service (J2EE appserver's) as a storage for identifier variables for Singleton objects in J2EE based cluster?
I have a following problem:
- I have a cluster with 4 nodes
- Each node has a it's own singleton instance (per JVM in cluster)
- I need a identifier to give a "identity" to each singleton instance In this way each singleton instance could read data from
database and cache it. Purpose is, that identifier would be also a primary key in database. In this way each singleton could read it's own group of data from database, so I would not need to do any synchronization between singleton instances (each singleton would
contain different data, that accpeted in my case).
The question is:
Is it possible to use JNDI/naming servive as "temporary storage" for those identifiers? Identifiers should be read every time when all the nodes in the cluster are booted. They should also be marked as used so,
that only one singleton would use it's own id.
When the cluster is rebooted those ids should be available again.
If I thing this problem with database technique, the problem is to "mark" ids as free when nodes in the cluster are rebooting...
can JNDI handle this better?
Thanks
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This topic makes more sense in the EJB forum, so I'll move it there.
 
When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic