james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oki DZ <ok...@pindad.com>
Subject Re: Input for JDB Mail Repository
Date Thu, 02 Aug 2001 04:01:30 GMT
On Tue, 31 Jul 2001, Serge Knystautas wrote:
> I don't know if putting the message body into another table (put still in
> the DB) is going to help vs just putting it in a DB.  

It won't make retrieval any faster, IMO.
And on databases that don't support trigger, there would be some
unnecessary additional complexities in the SQL statements; you'd have to
deal with more than one table for each PreparedStatement.ExecuteQuery().

>I guess I'm used to a
> DB that does the indexing well enough that the size of the record doesn't
> matter so much, although I do recognize sticking the entire message in the
> same table as everything else somewhat violates traditional DB design.

I'm wondering whether having varchar columns would slow down db retrieval.
AFAIK, fixed-width columns would be much better for indexes;  but thing
is, ResultSet.getString() would get the whole length when retrieving such
columns; then you'd have to have .trim() for the returned strings. (At
least, James didn't work last time I changed the key column to be char
type. I guess, that's where the problem came from.) 

But if code-rewrite permits, I think having fixed-width columns for key
columns would be nicer. In Message table, there is only one key and the
only changes needed is only in JDBCMailRepository.retrieve(), right?.

BTW, I'd like to have a limited POP connection for each user that connects
to the server. Currently, James 1.2 is having problem due to the users
that tries to have more than one connection; the server seems to be hung,
and the only remedy is restarting James. 

I think all you need is to have a Hashtable in POP3Handler, put the
connecting remote IP number into the hashtable, and remove the number when
the user disconnects from the server. But then, the contents of the
hashtable should be timed (removed after a certain time has elapsed), so
that those who inadvertently disconnected from the server (eg: due to
network errors) should be able to connect next time. TurbineGlobalCache
comes into mind... Turbine's CachedObject does time out. This feature of
the POP server would have a nice side effect; limiting the user from
attempting to connect to the server too many times in a period of time. I
think, checking the mailbox every 30 seconds is a bit too much; but people

BTW2, contrary to what I have written in this list, TurbineGlobalCache is
not the only single global cache you can have in Turbine. You can have
more by having more cache service running. Sure, you'd need to write a new
class to get the service available (it could be a subclass of
TurbineGlobalCache, with getService() overriden with the one that "gets" a
different service name; which is newly defined by you in Turbine's
properties file). It might not be relevant to write about Turbine in this
list, but I'd like to clear things up.


To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org

View raw message