tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard W. Smith, Jr." <>
Subject Best way to recover from RuntimeException from ejbTimeout on ..., ConcurrentAccessTimeoutException: Unable to get write lock on ...
Date Tue, 29 Oct 2013 14:47:20 GMT
This morning, one of the endusers of my app contacted me and informed me
about an issue with the software i wrote to use @Singleton + @Lock(WRITE) +
@Schedule to retrieve emails from an email account where schedule = every 2

This code has been running really well ever since I initially developed it
back in December 2012 after discussing this on the user list and getting
some tips from David Blevins, but this morning, the following exception,

Oct 29, 2013 1:30:00 AM
org.apache.openejb.core.timer.EjbTimerServiceImpl ejbTimeout
WARNING: RuntimeException from ejbTimeout on EmailRequestBean
javax.ejb.ConcurrentAccessTimeoutException: Unable to get write lock
on 'downloadEmailRequests' method for: utils.mail.EmailRequestBean
	at org.apache.openejb.core.singleton.SingletonContainer.aquireLock(
	at org.apache.openejb.core.singleton.SingletonContainer._invoke(
	at org.apache.openejb.core.singleton.SingletonContainer.invoke(
	at org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(
	at org.apache.openejb.core.timer.EjbTimeoutJob.execute(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$ Source)
	at Source)

was caused by one gmail-connection-timeout a little before 1:30am,

Oct 29, 2013 1:22:21 AM utils.mail.EmailHandler initialize
INFO: Exception caught:Connection timed out: connect
Oct 29, 2013 1:22:21 AM utils.mail.EmailRequestBean downloadEmailRequests
INFO: Error loading emails from Inbox; Connection timed out: connect

and then the ConcurrentAccessTimeoutException continued to occur until I
stopped tomee and (re)started tomee; please see log file[1]. I have already
made some tweaks to the software to 'prevent' or limit exceptions written
to the error log, when internet disconnection occurs. My app initiates
gmail IMAP and google-calendar API connections quite often via multiple
@Singleton + @Lock(WRITE) + @Schedule bean/methods.

Can someone advise on how best to recover from this 'domino-effect' type of
bug/issue? I know this is not a tomee bug, and i'm sure my app can recover
from this, just need a hint...please. thanks. :)


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message