tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clemensx <>
Subject cannot use ManagedExecutorService resource
Date Mon, 16 Jul 2018 10:31:13 GMT

we have problems using ManagedExecutorService resources in tomee 7.0.4
Using default ManagedExecutorService works fine, but if we try to define a
new pool with more threads we cannot access the service

In resource.xml we do this:
<Resource id="FooManagedExecutorService" type="ManagedExecutorService">
    Core = 40
    Max = 50
    KeepAlive = 5 s
    Queue = 150
    ThreadFactory = org.apache.openejb.threads.impl.ManagedThreadFactoryImpl
    Lazy = true

But then we cannot even get the default service injected in our stateful
session bean:
                private ManagedExecutorService execService;
will yield a null execService.

                private ManagedExecutorService execService;
same with trying to access our own resource.

Getting the reference programmatically via
                execService = (ManagedExecutorService)
also gives null.

In the server startup logs we see several mentions of our service:

for all beans:
[CONTAINER] OpenEJB.startup.config INFO Auto-linking resource-ref
'openejb/Resource/ROOT/FooManagedExecutorService' in bean ProductDao to

3 times this info (no idea why the container is creating the resource 3
[CONTAINER] OpenEJB.startup.service INFO Creating

[CONTAINER] OpenEJB.startup.config INFO Configuring
Service(id=ROOT/FooManagedExecutorService, type=Resource,
provider-id=Default Executor Service)

Thanks for any ideas/workarounds

Sent from:

View raw message