示例#1
0
 @Override
 public void init() throws Exception {
   super.init();
   verifyconfigurationParameters();
   if (stringIsEmpty(datasource_jndi_name)) {
     loadDriver();
   } else {
     dataSourceFromJNDI = getDataSourceFromJNDI(datasource_jndi_name.trim());
   }
   attemptSchemaInitialization();
 }
示例#2
0
 @Override
 public void stop() {
   try {
     deleteSelf();
   } catch (SQLException e) {
     log.error(
         "Error while unregistering of our own Address from JDBC_PING database during shutdown",
         e);
   }
   super.stop();
 }
示例#3
0
  @Override
  public void init() throws Exception {
    if (username == null) {
      throw new IllegalArgumentException("Rackspace 'username' must not be null");
    }
    if (apiKey == null) {
      throw new IllegalArgumentException("Rackspace 'apiKey' must not be null");
    }
    if (region == null || (!region.equals("UK") && !region.equals("US"))) {
      throw new IllegalArgumentException("Invalid 'region', must be UK or US");
    }

    URL authURL = new URL(region.equals("UK") ? UKService : USService);
    rackspaceClient = new RackspaceClient(authURL, username, apiKey);

    super.init();
  }
示例#4
0
  @Override
  public void init() throws Exception {
    Utils.validateNotEmpty(auth_url, "auth_url");
    Utils.validateNotEmpty(auth_type, "auth_type");
    Utils.validateNotEmpty(username, "username");
    Utils.validateNotEmpty(password, "password");
    Utils.validateNotEmpty(container, "container");

    Authenticator authenticator = createAuthenticator();
    authenticator.validateParams();

    swiftClient = new SwiftClient(authenticator);
    // Authenticate now to record credential
    swiftClient.authenticate();

    super.init();
  }