Class DbTestCommand

java.lang.Object
com.tbg.wms.cli.commands.DbTestCommand
All Implemented Interfaces:
Callable<Integer>

public final class DbTestCommand extends Object implements Callable<Integer>
Validates database connectivity for the active site and WMS environment.

This command is used during initial setup and troubleshooting to verify that:

  • Database host is reachable (DNS, network, firewall)
  • Port is open and listening
  • Service name/SID exists
  • Credentials are valid
  • Connection pool can be created

Exit codes:

  • 0 - DB connectivity verified
  • 2 - Configuration error (missing env vars, invalid settings)
  • 3 - Database connectivity error (DNS, port, service, auth)
  • 10 - Unexpected internal error
  • Constructor Details

    • DbTestCommand

      public DbTestCommand()
  • Method Details

    • call

      public Integer call()
      Runs connectivity diagnostics for the active DB configuration.
      Specified by:
      call in interface Callable<Integer>
      Returns:
      exit code (0 success, 2/3/10 failure categories)