diff --git a/bundleserver/src/main/java/com/ddd/server/bundlerouting/ServerWindow.java b/bundleserver/src/main/java/com/ddd/server/bundlerouting/ServerWindow.java index 3d10c14b6d..913688ad4c 100644 --- a/bundleserver/src/main/java/com/ddd/server/bundlerouting/ServerWindow.java +++ b/bundleserver/src/main/java/com/ddd/server/bundlerouting/ServerWindow.java @@ -37,36 +37,6 @@ public class ServerWindow { @Autowired private Environment env; - // @Autowired - // public ServerWindow(ServerSecurity serverSecurity) throws SQLException - // { - // this.serverSecurity = serverSecurity; - // clientWindowMap = new HashMap<>(); - - // // TODO: Change to config - // String url = "jdbc:mysql://localhost:3306"; - // String uname = "root"; - // String password = "mchougule478"; - // String dbName = "DTN_SERVER_DB"; - - // database = new SNRDatabases(url, uname, password, dbName); - - // try { - // initializeWindow(); - // } catch (SQLException | BufferOverflow | InvalidLength e) { - // System.out.println(e + "\n[WIN] INFO: Failed to initialize window from database"); - - // String dbTableCreateQuery = "CREATE TABLE " + dbTableName + " " + - // "(clientID VARCHAR(256) not NULL," + - // STARTCOUNTER + " VARCHAR(256)," + - // ENDCOUNTER + " VARCHAR(256)," + - // WINDOW_LENGTH + " INTEGER," + - // "PRIMARY KEY (clientID))"; - - // database.createTable(dbTableCreateQuery); - // } - // } - @PostConstruct public void init() throws SQLException { // TODO: Change to config @@ -83,8 +53,8 @@ public void init() throws SQLException { System.out.println(e + "\n[WIN] INFO: Failed to initialize window from database"); String dbTableCreateQuery = - "CREATE TABLE " + dbTableName + " " + "(clientID VARCHAR(256) not NULL," + STARTCOUNTER + - " VARCHAR(256)," + ENDCOUNTER + " VARCHAR(256)," + WINDOW_LENGTH + " INTEGER," + + "CREATE TABLE " + dbTableName + " " + "(clientID VARCHAR(256) not NULL," + STARTCOUNTER + + " VARCHAR(256)," + ENDCOUNTER + " VARCHAR(256)," + WINDOW_LENGTH + " INTEGER," + "PRIMARY KEY (clientID))"; database.createTable(dbTableCreateQuery);