views:

40

answers:

1

Hi all; First I have a JSF application that make some sort of searches from database, but on the other hand I have been listening port for this purpose also, I start a thread that listens that port in my application bean. From the port I listen for incoming request of these searches and send responses from this port. The situation is that my response time varies unexpectedly which I send/get from port, but from my web page my performance stay stable although they use same objects.

My question is that can my web server obstruct my process which independently run from my web application ?

+1  A: 

The web container will probably have a thread pool, and the app server probably has its own background threads too, so your thread is contentending with those threads for resources (not least CPU) so at that level interference is possible. The actual thread scheduling will be done by the JVM and that may depend upon whatever priorities are set. JEE app servers don't encourage you start your own worker threads, and some provide architected ways of doing so, I would favour doing that.

Of course the Web App threads and your thread in using the same business objects may also contend, but there at least you should be an equal citizen.

djna