views:

264

answers:

1

Hello, We are using Glassfish v2 (9.1_02) at work. Our servers are not set up in a clustered environment.

We would like to have one main server as a JNDI server that can serve DataSource objects, and possibly other objects in the future, and link other servers to this one server. This way, if we change the location of a database or change a password, we do not have to update multiple servers, but instead just one.

My questions are:

  1. Is this even a good idea to do?
  2. Is it possible to link JNDI trees in Glassfish?
  3. How can I accomplish this?
  4. Has anyone accomplished this?

Thank you

+1  A: 

This is not a good idea, a virtual machine shouldn't use a database connection established on another machine. The overhead would be silly and how could it deal with a failover?

There are much better ways of ensuring all the servers in a cluster start up with the same configuration, it really comes down to what OS you're running on.

You might want to start by looking at an "application fabric" like terracotta. RedHat also has a system (called satellite) used to distribute config files. Other environments have equivalent solutions.

Kevin Wright