serge 01/12/05 14:14:33
Modified: src/java/org/apache/james/mailrepository
MimeMessageJDBCSource.java
Log:
Renamed getSize to getMessageSize on MailImpl level, and corrected implementation
bugs accordingly. Also added check for MimeMessageWrapper so it just gets the size
without loading the object unnecessarily.
Revision Changes Path
1.3 +4 -6
jakarta-james/src/java/org/apache/james/mailrepository/MimeMessageJDBCSource.java
Index: MimeMessageJDBCSource.java
===================================================================
RCS file:
/home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/MimeMessageJDBCSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MimeMessageJDBCSource.java 2001/09/11 04:33:08 1.2
+++ MimeMessageJDBCSource.java 2001/12/05 22:14:33 1.3
@@ -51,10 +51,10 @@
this.key = key;
this.sr = sr;
- retrieveMessageBodySQL =
+ retrieveMessageBodySQL =
repository.sqlQueries.getSqlString("retrieveMessageBodySQL", true);
// this is optional
- retrieveMessageBodySizeSQL =
+ retrieveMessageBodySizeSQL =
repository.sqlQueries.getSqlString("retrieveMessageBodySizeSQL");
}
@@ -64,8 +64,6 @@
* a repository with the entire message in the database, which is how James 1.2
worked.
*/
public synchronized InputStream getInputStream() throws IOException {
- //System.err.println("loading data for " + key + "/" + repository);
-
try {
Connection conn = repository.getConnection();
@@ -101,10 +99,10 @@
/**
* Runs a custom SQL statement to check the size of the message body
*/
- public synchronized long getSize() throws IOException {
+ public synchronized long getMessageSize() throws IOException {
if (retrieveMessageBodySizeSQL == null) {
//There was no SQL statement for this repository... figure it out the
hard way
- return super.getSize();
+ return super.getMessageSize();
}
try {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>