Hey,

do you close the transport?



Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2012/12/15 Howard W. Smith, Jr. <smithh032...@gmail.com>:
> I 'had' the following in my web app:
>
> @Stateless with @Schedule that will create/instantiate new javamail
> session, store, and get folder and messages; @Schedule was set for every 2
> minutes
>
> When I shutdown TomEE, I see the exception below; look closely, and you
> will see EmailStatelessBean is the cause of the infamous Javamail
> exception, too many simultaneous connections. This is an FYI. I tightened
> up my code a little...to workaround this issue... i keep javamail store
> open/connected and only close and reopen/connect when error occurs.
>
>
>
> Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled
> in the future
> urce)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
> at
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176)
> at
> org.apache.openejb.monitoring.StatsInterceptor.AroundTimeout(StatsInterceptor.java:140)
> at sun.reflect.GeneratedMethodAccessor538.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
> at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
> at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:237)
> at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:189)
> at
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:569)
> at
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> javax.mail.AuthenticationFailedException: [ALERT] Too many simultaneous
> connections. (Failure)
> at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:660)
> at javax.mail.Service.connect(Service.java:295)
> at javax.mail.Service.connect(Service.java:176)
> at utils.mail.EmailHandler.initialize(EmailHandler.java:65)
> at
> utils.mail.EmailStatelessBean.checkEmailsDeleteAndNotify(EmailStatelessBean.java:81)
> at sun.reflect.GeneratedMethodAccessor539.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
> at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:128)
> at org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:43)
> at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:64)
> at
> org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:70)
> at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
> at
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176)
> at
> org.apache.openejb.monitoring.StatsInterceptor.AroundTimeout(StatsInterceptor.java:140)
> at sun.reflect.GeneratedMethodAccessor538.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
> at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
> at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
> at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:237)
> at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:189)
> at
> org.apache.openejb.core.timer.EjbTimerServiceImpl.ejbTimeout(EjbTimerServiceImpl.java:569)
> at
> org.apache.openejb.core.timer.EjbTimeoutJob.execute(EjbTimeoutJob.java:39)
> at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)

Reply via email to