• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hosting singleton object as jmx service in distributed environment?

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have three webapps app1, app2 and app3 using tomcat. app1 and app2 are web apps. app3 simply host singleton class which will be accessed by app1 and app2.

I am planning to use to `JNDI` lookup the singleton instance from app1 and app2. but i am not getting how to bind the singleton instance
with initial context on app3 and make it available to lookup from app1 and app2. Do i need to host the singleton instance as jmx service
first and then lookup? Sorry folks i am new to jndi and jmx service.But this is summary i get from lot of sites and blogs on net.
Just wanted to know how to host the singleton object as jmx service on app3?

This was asked at http://stackoverflow.com/posts/12662277/ but no answers . Any pointers will be helpful.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow. Are you a glutton for punishment, using RMI and Singletons?

My suggestion is to stop using RMI and stop using Singletons. See Why singletons are evil
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic