diff src/main/java/de/mpiwg/gazetteer/utils/DBService.java @ 67:0a9937b06cc3

save full text search table (filtered)
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 04 Aug 2016 14:50:58 +0200
parents f106f2487ac1
children 7e161f2e6660
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/gazetteer/utils/DBService.java	Wed Aug 03 16:19:31 2016 +0200
+++ b/src/main/java/de/mpiwg/gazetteer/utils/DBService.java	Thu Aug 04 14:50:58 2016 +0200
@@ -28,6 +28,8 @@
 import de.mpiwg.gazetteer.db.DBSection;
 import de.mpiwg.gazetteer.db.DBSectionVersion;
 
+
+
 public class DBService {
 
 	private static Logger logger = Logger.getLogger(DBService.class);
@@ -42,6 +44,11 @@
 	
 	private static String SECTIONS_TABLE = "sections_index";
 
+	
+	// TODO: for all connection to mysql, we need to new a connection once (don't close it) and check everytime is the connection is still available. 
+	// It probably will timeout. If that then new a new connection.
+	
+	
 	private static DBService instance = null;
 	
 	public static DBService getInstance(){
@@ -985,10 +992,6 @@
 
 	public static Connection getNewConnection() throws SQLException, IOException{
 		
-		//return LGDataSource.getInstance().getConnection();
-		
-		
-		
 		return DriverManager.getConnection(
 				DB_URL + PropertiesUtils.getPropValue("db_gazetter_name") + "?useUnicode=yes&characterEncoding=UTF-8", 
 				PropertiesUtils.getPropValue("db_gazetter_username"),