Project

General

Profile

« Previous | Next » 

Revision 2114

Added by Duane Costa over 20 years ago

Rename url property to defaultDB

View differences:

lib/harvester/harvester.properties
1 1
connectToMetacat=true
2 2
dbDriver=oracle.jdbc.driver.OracleDriver
3
defaultDB=jdbc:oracle:thin:@knb.lternet.edu:1521:knblter
3 4
delay=0
4 5
harvesterAdministrator=dcosta@lternet.edu
5 6
logPeriod=90
......
8 9
password=ntre4hrv
9 10
period=24
10 11
smtpServer=lternet.lternet.edu
11
url=jdbc:oracle:thin:@knb.lternet.edu:1521:knblter
12 12
user=harvest
13 13

  
14 14
// Harvester Operation Properties
src/edu/ucsb/nceas/metacat/harvesterClient/Harvester.java
780 780
  private void startup(int nHarvests, int maxHarvests) {
781 781
    Boolean ctm;
782 782
    String dbDriver;
783
		String defaultDB;
783 784
    Integer lp;
784 785
    String metacatURL;
785 786
    Date now;
......
787 788
    Properties properties;
788 789
    //String response;
789 790
    String sessionId;
790
		String url;
791 791
    String user;
792 792
    String userName = System.getProperty("user.name");
793 793
    SQLWarning warn;
......
816 816
      logPeriod = 90;
817 817
    }
818 818

  
819
    defaultDB = properties.getProperty("defaultDB");
819 820
    metacatURL = properties.getProperty("metacatURL");
820 821
    password = properties.getProperty("password");
821 822
    smtpServer = properties.getProperty("smtpServer", "localhost");
822
    url = properties.getProperty("url");
823 823
    user = properties.getProperty("user");
824 824

  
825 825
    // Load the jdbc driver
......
834 834
    // Make the database connection
835 835
    try {
836 836
      System.out.println("Getting connection to Harvester tables");
837
      conn = DriverManager.getConnection(url, user, password);
837
      conn = DriverManager.getConnection(defaultDB, user, password);
838 838

  
839 839
      // If a SQLWarning object is available, print its warning(s).
840 840
      // There may be multiple warnings chained.
src/edu/ucsb/nceas/metacat/harvesterClient/HarvesterRegistration.java
62 62
  /*
63 63
   * Object fields
64 64
   */
65
  private String defaultDB;     // database connection, from properties file
65 66
  final private long millisecondsPerDay = (1000 * 60 * 60 * 24);
66 67
  private String password;      // database password, from properties file
67
  private String url;           // database url, from properties file
68 68
  private String user;          // database user, from properties file
69 69
   
70 70

  
......
551 551
    // Make the database connection
552 552
    try {
553 553
      System.out.println("Getting connection to Harvester tables");
554
      conn = DriverManager.getConnection(url, user, password);
554
      conn = DriverManager.getConnection(defaultDB, user, password);
555 555

  
556 556
      // If a SQLWarning object is available, print its warning(s).
557 557
      // There may be multiple warnings chained.
......
690 690
    Properties properties = loadProperties();
691 691

  
692 692
    dbDriver = properties.getProperty("dbDriver");
693
    defaultDB = properties.getProperty("defaultDB");
693 694
    password = properties.getProperty("password");
694
    url = properties.getProperty("url");
695 695
    user = properties.getProperty("user");
696 696

  
697 697
    // Load the jdbc driver

Also available in: Unified diff