[ 
https://issues.apache.org/jira/browse/TOMEE-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17862923#comment-17862923
 ] 

Markus Jung commented on TOMEE-4354:
------------------------------------

[~cpliu338] I think you have to do this in your case:

 
{code:java}
  <Resource id="Mes" type="ManagedExecutorService">
    Core = 5
    Max = 25
    KeepAlive = 5 s
    Queue = 15
    ThreadFactory = org.apache.openejb.threads.impl.ManagedThreadFactoryImpl
    Lazy = true
    Context = Foo
  </Resource> {code}
 

> Fail to create ManagedExecutorService in TomEE 10.0.0-M1
> --------------------------------------------------------
>
>                 Key: TOMEE-4354
>                 URL: https://issues.apache.org/jira/browse/TOMEE-4354
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 10.0.0-M1
>         Environment: Ubuntu 24.04, OpenJDK 17
>            Reporter: cpliu
>            Priority: Major
>              Labels: executor, openejb
>
> In a fresh install of TomEE 10.0.0-M1-plume, I have in tomee.xml this 
> resource:
> {{<Resource id="Foo" type="ManagedExecutorService">
>   Core = 5
>   Max = 25
>   KeepAlive = 5 s
>   Queue = 15
>   ThreadFactory = org.apache.openejb.threads.impl.ManagedThreadFactoryImpl
>   Lazy = true
> </Resource>}}
> TomEE failed to create the resource with error in catalina\{date}.log:
> {{25-Jun-2024 21:07:30.229 SEVERE [main] 
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke Exception processing 
> global JNDI Resources
> org.apache.openejb.core.ivm.naming.LazyObjectReference$LazyNamingException: 
> Error calling instance factory method: public 
> org.apache.openejb.threads.impl.ManagedExecutorServiceImpl 
>  org.apache.openejb.resource.thread.ManagedExecutorServiceImplFactory.create()
>     at 
> org.apache.openejb.core.ivm.naming.LazyObjectReference.getObject(LazyObjectReference.java:39)
>  ...}}
> {{}}
> {{}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to