dirkv 02/01/06 16:44:44
Modified: src/stores/slidestore/j2ee J2EEContentStore.java
Log:
performance improvement
patch by Colin Britton
Revision Changes Path
1.3 +16 -8 jakarta-slide/src/stores/slidestore/j2ee/J2EEContentStore.java
Index: J2EEContentStore.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/stores/slidestore/j2ee/J2EEContentStore.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- J2EEContentStore.java 2 Jan 2002 21:18:48 -0000 1.2
+++ J2EEContentStore.java 7 Jan 2002 00:44:44 -0000 1.3
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/stores/slidestore/j2ee/J2EEContentStore.java,v 1.2
2002/01/02 21:18:48 dirkv Exp $
- * $Revision: 1.2 $
- * $Date: 2002/01/02 21:18:48 $
+ * $Header:
/home/cvs/jakarta-slide/src/stores/slidestore/j2ee/J2EEContentStore.java,v 1.3
2002/01/07 00:44:44 dirkv Exp $
+ * $Revision: 1.3 $
+ * $Date: 2002/01/07 00:44:44 $
*
* ====================================================================
*
@@ -97,7 +97,7 @@
*
* @author Ashok Kumar
* @contact <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class J2EEContentStore extends AbstractService
implements ContentStore {
@@ -430,8 +430,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());
@@ -463,7 +465,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);
@@ -487,6 +489,9 @@
getLogger().log(e,LOG_CHANNEL,Logger.ERROR);
throw new ServiceAccessException(this, e.getMessage());
} catch(RevisionAlreadyExistException e) {
+ getLogger().log("RevisionAlreadyExistException 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);
@@ -518,7 +523,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);
@@ -544,6 +549,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]>