tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Herschke (JIRA)" <>
Subject [jira] [Commented] (TOMEE-2044) threadPool-queue (in ServicePool) from ejbd-Service is never processed
Date Wed, 14 Jun 2017 10:32:00 GMT


Lars Herschke commented on TOMEE-2044:

I have now spent al lot of time, to understand the new code in master and i don't see how
this code should work.

In the ServicePool constructor is the line 
SystemInstance.get().setComponent(Registry.class, registry); 
instead of the old line
SystemInstance.get().setComponent(ServicePool.class, this);.
Nowhere in the whole code getComponent(Registry.class) is called,  so this set is useless.

In KeepAliveServer.getQueue() is the line 
final ServicePool incoming = Unwrappable.class.isInstance(service) ? Unwrappable.class.cast(service).unwrap(ServicePool.class)
: null;
instead of the old line
final ServicePool incoming = SystemInstance.get().getComponent(ServicePool.class);
The ServerService that is saved in the variable service ist EjbServer. EjbServer isn't instance
of Unwrappable, so getQueue always return null.

> threadPool-queue (in ServicePool) from ejbd-Service is never processed 
> -----------------------------------------------------------------------
>                 Key: TOMEE-2044
>                 URL:
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 1.7.4
>         Environment: FreeBSD 10.3-STABLE amd64 
> openjdk8-8.131.11
>            Reporter: Lars Herschke
>             Fix For: 7.0.4
> If you have many requests to your ejbd-service the queue from the threadPool in
is filled. This queue is never processed depending on your server config. If you have only
ejbd-service enabled and the services admin, ejbds and httpejbd are disabled all is fine.
If you have two or more of these services enabled the issue could occur. The reason is the
> has the following line to get the queue.
> final ServicePool incoming = SystemInstance.get().getComponent(ServicePool.class);
> hold components in a HahMap with the class type as key. On server-startup
the above named services are initalized in ServiceManager.manage(...). This method instances
new ServicePool for this services. Each ServicePool-instance calls in his constructor
> SystemInstance.get().setComponent(ServicePool.class, this);.
> Every other call of setComponent replace the old entry in the components HashMap. So
KeepAliveServer gets always the queue of the last initalized service.
> Workaround:
> Use only one of the four above named services
> or
> set threadsCore for your services at least as high, that the queue is never used.

This message was sent by Atlassian JIRA

View raw message