Thank you Eric,
I think that in James2 I can use connectionLimit on incoming leg and
deliveryThreads on outgoing leg.
from SMTPServer.java:
if (connectionLimit != null) {
theHandlerPool = new
HardResourceLimitingPool(theHandlerFactory, 5,
connectionLimit.intValue());
if (getLogger().isDebugEnabled()) {
getLogger().debug("Using a bounded pool for SMTP
handlers with upper limit " + connectionLimit.intValue());
}
} else {
// NOTE: The maximum here is not a real maximum. The
handler pool will continue to
// provide handlers beyond this value.
theHandlerPool = new DefaultPool(theHandlerFactory, null, 5, 30);
getLogger().debug("Using an unbounded pool for SMTP handlers.");
}
and then maybe add message handler:
from SMTPHandler.java:
//handle messages
if(mode == MESSAGE_RECEIVED_MODE) {
try {
getLogger().debug("executing message handlers");
List messageHandlers = handlerChain.getMessageHandlers();
int count = messageHandlers.size();
for(int i =0; i < count; i++) {
((MessageHandler)messageHandlers.get(i)).onMessage(this);
//if the response is received, stop
processing of command handlers
if(mode == MESSAGE_ABORT_MODE) {
break;
}
}
which will be invoked before SendMailHandler which will do the
incoming email throttling.
Make sense?
Cheers
--
http://music-codex.com/
http://hamsterready.blogspot.com/
http://full-plate.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]