Changeset 37674


Ignore:
Timestamp:
2023-04-18T18:27:39+12:00 (12 months ago)
Author:
anupama
Message:

Finally adding in what Dr Bainbridge explained: we should be able to run the Greenstone installer with -Dderby.server.port=xxxx and that's the port number that should be preferred when the installer briefly connects to set the admin pwd to some custom value. This code has not been tested with the installer yet, as it needs to be committed in order to regenerate the installer with this new code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java

    r37610 r37674  
    6363    String port = GlobalProperties.getProperty("derby.server.port");//, "8327"); GS' default derby port.
    6464    if(port.indexOf("@") == -1) { // if there are still @placeholders@ in global.properties, then use fallback values
    65         PORT = port;
    6665        DERBYSERVER = GlobalProperties.getProperty("derby.server");//, "localhost");
    6766    } else {
    68         PORT = "8327"; // This setting is used by installer. 8327 is GS default derby port. Note: Out-of-box derby defaults to port 1527
     67        port = "8327"; // This setting is used by installer. 8327 is GS default derby port. Note: Out-of-box derby defaults to port 1527
    6968        DERBYSERVER = "localhost";
    7069    }
     70   
     71    // Check any -D JVM properties passed to GS3 jarfile and, iff set, use it in preference to any PORT already found
     72    // See https://stackoverflow.com/questions/5045608/proper-usage-of-java-d-command-line-parameters
     73    PORT = System.getProperty("derby.server.port", port);
     74   
    7175    PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:8327"; // by default
    7276    //System.out.println("@@@ PROTOCOL:" + PROTOCOL); //check in installer
Note: See TracChangeset for help on using the changeset viewer.