Title: Сообщение
Hi, I have problem with JBoss' Mail service, it just hangs
after several hours of work.
 
Environment:
RedHat 7.0,
JDK 1.4.1_01-b01
JBoss 3.0.4
Qmail 1.03 with qmail-popup running under tcpserver
(tcpserver -c 100 -H -v -R -D 0 pop3 /var/qmail/bin/qmail-popup)
 
 
Code:
1            session = (Session)(new InitialContext().lookup("java:/Mail"));
2            store = session.getStore("pop3");
3            connecting = true;
4            store.connect(host, user, password);
5            folder = store.getFolder("INBOX");
6            folder.open(Folder.READ_WRITE);
7            int msgCnt = folder.getMessageCount();
8            if (msgCnt >0)
9                log.debug("messages:"+msgCnt);
10           Message[] msgs = folder.getMessages();
11           FetchProfile fp = new FetchProfile();
12           fp.add(FetchProfile.Item.ENVELOPE);
13           fp.add("X-mailer");
14           folder.fetch(msgs, fp);
15           for ( int i = 0; i < msgCnt; i++){
16               processMessage(msgs[i]);
17               msgs[i].setFlag(Flags.Flag.DELETED, true);
18           }
It hangs between 4 and 18,
I'm sure there were not new messages, so processMessage was not invoked.
from logs, after around 5 min there is a warning:
WARN  [TxCapsule] Transaction XidImpl [FormatId=257, GlobalId=localhost.localdomain//7153, BranchQual=] timed out. status=STATUS_ACTIVE
I suspect something wrong in JavaMail implementation, because
I got pop3 check right before this code block that connects to port 110
and reads first line. So this check before goes fine and I can connect
to 110 port from command line after server hangs. Seems store.connect()
just doesn't return control. ( I have to track mail box, so this code runs each 5 seconds)
 
Any idea?
 
Regards,
Igor Semenko.
 

Reply via email to