简体   繁体   中英

Glassfish JNDI Tree Linking

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM