Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Include Page
spaceKeyGrouper
pageTitleNavigation

The Grouper Failover Client API This is included in the Grouper client v2.1+

This is an API where you can send in specify a list of endpoints and some logic and it will run against them until it finds one that returns a successful response before a timeout has occurred.

...

If the failover is used in command-line mode, the state can be saved periodically to disk so each invocation remembers the state of the previous.

This API is used in the Grouper client optionally for the discovery service and always available web services and ldap.

Usage

Include the grouperClient jar, and call the failover client:

...

Code Block
########################################
## Misc settings
########################################

# path of a writable directory where files can be created or stored
# for example, cache of discovery configuration, or failover state
# dot is the current directory...  note, this directory must exist
# or it will be created (attempted)
# if this is blank, none of these features will be used, and
# no files will be saved
grouperClient.cacheDirectory = .

# this will save the failover state to a file so if the JVM is stopped, it
# will be there when it starts again.  
# Set to 0 to store on every use (recommended if used command line)
# or set to -1 to not store or read ever
# grouperClient.cacheDirectory must be set
grouperClient.saveFailoverStateEverySeconds = 60
# if the failover client should use threads.  If it doesnt then you cant detect timeouts
grouperClient.failoverClientUseThreads = true


To do

  • Could provide retry after sleeping if not success...
  • Could have error count where below error count does not change connection affinity

See Also

Grouper Client

Discovery Client