wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Using JNDI for environment variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Using JNDI for environment variables" Watch "Using JNDI for environment variables" New topic
Author

Using JNDI for environment variables

Richard Robbins
Ranch Hand

Joined: Mar 07, 2001
Posts: 66
I am developing an application for Windows that involves using several processes on different machines communicating via sockets. Each process on each machine needs to know what hosts/ports are available for communication. I don't want to be tied to a database (querying for available host info), I don't want to use a configuration file, and I don't want to be tied to the Windows registry. Is there a possibility using JNDI to (upon install) configure an environment variable that will hold the information concerning what hosts and ports are available for connecting? If so, please explain. I am new to JNDI.
Thanks,
Richard


Richard Robbins is one of the founders of WebsiteTemplateDatabase.com, a resource for free website templates and Photoshop tutorials. He also consults for an online boutique selling baptism dresses and christening gowns.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

How about using JMS?

You can make a topic (available hosts), that each part of your application would subscribe to.

As new hosts come on, they publish their info to this topic, and you can remove this info in a similar manner.
 
jQuery in Action, 2nd edition
 
subject: Using JNDI for environment variables
 
Similar Threads
UDP connections in Java
How to find number of COM Ports available ?
Programming Windows registry with Java
Port scanning Vista
Manipulating Windows registry keys