diff -r 7d0e65712a95 -r 5d7d1adf387f src/org/sonews/storage/impl/JDBCDatabase.java --- a/src/org/sonews/storage/impl/JDBCDatabase.java Tue Jun 07 09:23:34 2011 +0200 +++ b/src/org/sonews/storage/impl/JDBCDatabase.java Tue Jun 07 11:55:22 2011 +0200 @@ -53,49 +53,49 @@ { public static final int MAX_RESTARTS = 2; - private Connection conn = null; - private PreparedStatement pstmtAddArticle1 = null; - private PreparedStatement pstmtAddArticle2 = null; - private PreparedStatement pstmtAddArticle3 = null; - private PreparedStatement pstmtAddArticle4 = null; - private PreparedStatement pstmtAddGroup0 = null; - private PreparedStatement pstmtAddEvent = null; - private PreparedStatement pstmtCountArticles = null; - private PreparedStatement pstmtCountGroups = null; - private PreparedStatement pstmtDeleteArticle0 = null; - private PreparedStatement pstmtDeleteArticle1 = null; - private PreparedStatement pstmtDeleteArticle2 = null; - private PreparedStatement pstmtDeleteArticle3 = null; - private PreparedStatement pstmtGetArticle0 = null; - private PreparedStatement pstmtGetArticle1 = null; - private PreparedStatement pstmtGetArticleHeaders0 = null; - private PreparedStatement pstmtGetArticleHeaders1 = null; - private PreparedStatement pstmtGetArticleHeads = null; - private PreparedStatement pstmtGetArticleIDs = null; - private PreparedStatement pstmtGetArticleIndex = null; - private PreparedStatement pstmtGetConfigValue = null; - private PreparedStatement pstmtGetEventsCount0 = null; - private PreparedStatement pstmtGetEventsCount1 = null; - private PreparedStatement pstmtGetGroupForList = null; - private PreparedStatement pstmtGetGroup0 = null; - private PreparedStatement pstmtGetGroup1 = null; - private PreparedStatement pstmtGetFirstArticleNumber = null; - private PreparedStatement pstmtGetListForGroup = null; - private PreparedStatement pstmtGetLastArticleNumber = null; - private PreparedStatement pstmtGetMaxArticleID = null; - private PreparedStatement pstmtGetMaxArticleIndex = null; - private PreparedStatement pstmtGetOldestArticle = null; - private PreparedStatement pstmtGetPostingsCount = null; - private PreparedStatement pstmtGetSubscriptions = null; - private PreparedStatement pstmtIsArticleExisting = null; - private PreparedStatement pstmtIsGroupExisting = null; - private PreparedStatement pstmtPurgeGroup0 = null; - private PreparedStatement pstmtPurgeGroup1 = null; - private PreparedStatement pstmtSetConfigValue0 = null; - private PreparedStatement pstmtSetConfigValue1 = null; - private PreparedStatement pstmtUpdateGroup = null; + protected Connection conn = null; + protected PreparedStatement pstmtAddArticle1 = null; + protected PreparedStatement pstmtAddArticle2 = null; + protected PreparedStatement pstmtAddArticle3 = null; + protected PreparedStatement pstmtAddArticle4 = null; + protected PreparedStatement pstmtAddGroup0 = null; + protected PreparedStatement pstmtAddEvent = null; + protected PreparedStatement pstmtCountArticles = null; + protected PreparedStatement pstmtCountGroups = null; + protected PreparedStatement pstmtDeleteArticle0 = null; + protected PreparedStatement pstmtDeleteArticle1 = null; + protected PreparedStatement pstmtDeleteArticle2 = null; + protected PreparedStatement pstmtDeleteArticle3 = null; + protected PreparedStatement pstmtGetArticle0 = null; + protected PreparedStatement pstmtGetArticle1 = null; + protected PreparedStatement pstmtGetArticleHeaders0 = null; + protected PreparedStatement pstmtGetArticleHeaders1 = null; + protected PreparedStatement pstmtGetArticleHeads = null; + protected PreparedStatement pstmtGetArticleIDs = null; + protected PreparedStatement pstmtGetArticleIndex = null; + protected PreparedStatement pstmtGetConfigValue = null; + protected PreparedStatement pstmtGetEventsCount0 = null; + protected PreparedStatement pstmtGetEventsCount1 = null; + protected PreparedStatement pstmtGetGroupForList = null; + protected PreparedStatement pstmtGetGroup0 = null; + protected PreparedStatement pstmtGetGroup1 = null; + protected PreparedStatement pstmtGetFirstArticleNumber = null; + protected PreparedStatement pstmtGetListForGroup = null; + protected PreparedStatement pstmtGetLastArticleNumber = null; + protected PreparedStatement pstmtGetMaxArticleID = null; + protected PreparedStatement pstmtGetMaxArticleIndex = null; + protected PreparedStatement pstmtGetOldestArticle = null; + protected PreparedStatement pstmtGetPostingsCount = null; + protected PreparedStatement pstmtGetSubscriptions = null; + protected PreparedStatement pstmtIsArticleExisting = null; + protected PreparedStatement pstmtIsGroupExisting = null; + protected PreparedStatement pstmtPurgeGroup0 = null; + protected PreparedStatement pstmtPurgeGroup1 = null; + protected PreparedStatement pstmtSetConfigValue0 = null; + protected PreparedStatement pstmtSetConfigValue1 = null; + protected PreparedStatement pstmtUpdateGroup = null; /** How many times the database connection was reinitialized */ - private int restarts = 0; + protected int restarts = 0; /** * Rises the database: reconnect and recreate all prepared statements.