Skip to content

No way to easily figure out where a thread pool configuration is missing #1853

@henri-tremblay

Description

@henri-tremblay

As soon as you have no default thread pool, you need to specify it everywhere. So far, so good.

However, when one is missing, the exception doesn't really obviously say where. Here is an example that will fail. Uncomment event-dispatch to make it work. You will see that the exception is far from being useful.

Also, the documentation on thread pools seems to be missing.

<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
           xmlns='http://www.ehcache.org/v3'
           xsi:schemaLocation="http://www.ehcache.org/v3
  http://www.ehcache.org/schema/ehcache-core-3.0.xsd">
    
    <thread-pools>
        <thread-pool alias="defaultDiskPool" min-size="1" max-size="3"/>
    </thread-pools>

    <!--<event-dispatch thread-pool="defaultDiskPool"/>-->

    <cache-template name="default">
        <key-type>java.lang.String</key-type>
        <value-type>java.lang.String</value-type>
        <heap unit="entries">1</heap>
    </cache-template>

    <cache alias="cache" uses-template="default"/>
</config>

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions