Changeset 38856 for main/trunk/greenstone3/src
- Timestamp:
- 2024-03-21T20:02:29+13:00 (8 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java
r38769 r38856 33 33 import org.greenstone.util.GlobalProperties; 34 34 35 import org.apache.log4j.*; 35 36 /** 36 37 * The UserDB stores the groups in the "roles" table in expanded form, i.e. expandedGroups. … … 42 43 static final String PORT; 43 44 static final String DERBYSERVER; 44 static final String PROTOCOL; 45 45 static final String PROTOCOL; 46 static Logger logger = Logger.getLogger(org.greenstone.gsdl3.util.DerbyWrapper.class.getName()); 46 47 static final String DRIVER = "org.apache.derby.jdbc.ClientDriver"; //"org.apache.derby.jdbc.EmbeddedDriver"; 47 48 static final String USERSDB = "usersDB"; … … 104 105 protocol_str = PROTOCOL + USERSDB_DIR; 105 106 File usersDB_file = new File(USERSDB_DIR); 107 108 // to test for file existence, ensure we have full path to it, 109 // as "usersDB" on its own may not exist at the level we're testing this from 110 if(!USERSDB_DIR.startsWith(GlobalProperties.getGSDL3Home())) { 111 usersDB_file = new File(GlobalProperties.getGSDL3Home() + File.separatorChar + "etc" + File.separatorChar + USERSDB_DIR); 112 } 113 106 114 if (!usersDB_file.exists()) 107 115 { … … 118 126 try 119 127 { 128 //Class.forName(DRIVER).getDeclaredConstructor().newInstance(); 120 129 DerbyWrapper.createDatabase(DriverManager.getConnection(protocol_str + ";create=true")); 121 130 }
Note:
See TracChangeset
for help on using the changeset viewer.