tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Li <fancye...@gmail.com>
Subject can tomcat use aio instead of nio in linux?
Date Fri, 04 Jul 2014 04:56:47 GMT
I have a background thread that is using hornetq client to receive jms
topic message from a remote hornetq broker. This thread is started as
ServletContextListener when tomcat starts.

But the tomcat throws strange Exception:

llegal access: this web application instance has been stopped already.
Could not load java.net.SocketTimeoutException.  The eventual
following stack trace is caused by an error thrown for debugging
purposes as well as to attempt to terminate the thread which caused
the illegal access, and has no functional impact.

java.lang.IllegalStateException

        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1588)

        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)

        at org.jboss.netty.channel.socket.oio.AbstractOioWorker.run(AbstractOioWorker.java:75)

        at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:51)

        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)

        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)

        at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:175)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:744)

I suspect that hornetq use linux aio and cause jvm can't use nio which
is used by tomcat.
one solution may modify hornetq to use nio instead of aio. But I don't
know how to do it.
Another solution is letting tomcat using aio instead of nio. it it possilbe?

my os is ubuntu 12.04 with libaio installed. I can send and receive
topic messages in a standalone java application. My java version is :

java version "1.7.0_45"

Java(TM) SE Runtime Environment (build 1.7.0_45-b18)

Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

tomcat version is 7.0.47

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message