tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: can tomcat use aio instead of nio in linux?
Date Fri, 04 Jul 2014 13:36:39 GMT
On 04/07/2014 05:56, Li Li wrote:
> 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.

What is strange about this?

Something in your application continues to run (a thread you started
maybe?) after the web application has stopped. That isn't allowed so you
get an error.


> I suspect that hornetq use linux aio and cause jvm can't use nio which
> is used by tomcat.

And your basis for that conclusion (which is completely wrong in case
that wasn't obvious) is what?

> 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?

Since your assumptions regarding the problem are wrong, so are you
assumptions about the possible solution.

The correct solution is to fix whatever broken code is trying to load
classes after the web application has stopped.

> 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

Thanks for the verison info. Most people don't bother. I'd consider a
Tomcat upgrade.

Mark


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


Mime
View raw message