Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

initializing singletones under j2ee

Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have some infrastructural singletons that needs to be initialized and need to be accessed by both ejb's and servlets.the web container and the ejb container dosent have to use the same JVM and also my ejb's dosent have to be on the same VM. because singletones are static(at least the classic pattern) i need to make sure that the initailazion will take place to all jvm's.
to solve this problem i can design it so every singltone will initialize him self but form where?
i cant use files because i'm not allowd to access them when i'm working under the EJB container.
dose any one solved this problem ?
Posts: 3892
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can use files. That part of the EJB spec is not a hard-and-fast rule, but a suggestion. Nothing will stop you from reading a value from a properties file.
It sure was nice of your sister to lend us her car. Let's show our appreciation by sharing this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic