dirkv 02/01/06 16:44:54
Modified: src/stores/slidestore/reference JDBCContentStore.java
Log:
performance improvement
patch by Colin Britton
Revision Changes Path
1.14 +16 -8
jakarta-slide/src/stores/slidestore/reference/JDBCContentStore.java
Index: JDBCContentStore.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/stores/slidestore/reference/JDBCContentStore.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- JDBCContentStore.java 2 Jan 2002 21:17:39 -0000 1.13
+++ JDBCContentStore.java 7 Jan 2002 00:44:54 -0000 1.14
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/stores/slidestore/reference/JDBCContentStore.java,v 1.13
2002/01/02 21:17:39 dirkv Exp $
- * $Revision: 1.13 $
- * $Date: 2002/01/02 21:17:39 $
+ * $Header:
/home/cvs/jakarta-slide/src/stores/slidestore/reference/JDBCContentStore.java,v 1.14
2002/01/07 00:44:54 dirkv Exp $
+ * $Revision: 1.14 $
+ * $Date: 2002/01/07 00:44:54 $
*
* ====================================================================
*
@@ -90,7 +90,7 @@
* JDBC 2.0 compliant implementation of ContentStore.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
*/
public class JDBCContentStore extends AbstractSimpleService
implements ContentStore {
@@ -456,8 +456,10 @@
getLogger().log(e,LOG_CHANNEL,Logger.ERROR);
throw new ServiceAccessException(this, e.getMessage());
} catch (RevisionNotFoundException e) {
- // we do NOT want this caught by next clause.
- throw e;
+ getLogger().log("RevisionNotFoundException encountered for " +
+ revisionUri + " revision " + revisionNumber,
+ LOG_CHANNEL,Logger.WARNING);
+ throw e; // we do NOT want this caught by next clause.
} catch (Exception e) {
getLogger().log(e,LOG_CHANNEL,Logger.ERROR);
throw new ServiceAccessException(this, e.getMessage());
@@ -489,7 +491,7 @@
try {
selectStatement = connection.prepareStatement
- ("select * from revisioncontent where uri = ? and "
+ ("select 1 from revisioncontent where uri = ? and "
+ "xnumber = ?");
selectStatement.setString(1, revisionUri);
selectStatement.setString(2, revisionNumber);
@@ -513,6 +515,9 @@
getLogger().log(e,LOG_CHANNEL,Logger.ERROR);
throw new ServiceAccessException(this, e.getMessage());
} catch(RevisionAlreadyExistException e) {
+ getLogger().log("RevisionNotFoundException encountered for " +
+ revisionUri + " revision " + revisionNumber,
+ LOG_CHANNEL,Logger.WARNING);
throw e; // we do NOT want this caught by next clause.
} catch (Exception e) {
getLogger().log(e,LOG_CHANNEL,Logger.ERROR);
@@ -544,7 +549,7 @@
try {
selectStatement = connection.prepareStatement
- ("select * from revisioncontent where uri = ? and "
+ ("select 1 from revisioncontent where uri = ? and "
+ "xnumber = ?");
selectStatement.setString(1, revisionUri);
selectStatement.setString(2, revisionNumber);
@@ -570,6 +575,9 @@
getLogger().log(e,LOG_CHANNEL,Logger.ERROR);
throw new ServiceAccessException(this, e.getMessage());
} catch(RevisionNotFoundException e) {
+ getLogger().log("RevisionNotFoundException encountered for " +
+ revisionUri + " revision " + revisionNumber,
+ LOG_CHANNEL,Logger.WARNING);
throw e; // we do NOT want this caught by next clause.
} catch (Exception e) {
getLogger().log(e,LOG_CHANNEL,Logger.ERROR);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>