Agreed. 

Am 4. Juli 2024 11:07:21 MESZ schrieb Markus Jung <ju...@apache.org>:
>Hey all,
>
>
>took a look at the Concurrency 3.0 spec - it states:
>
>The Jakarta EE Product Provider must provide a preconfigured, default 
>ContextService for use by application components under the JNDI name 
>java:comp/DefaultContextService
>
>
>IMO considering this it makes sense to automatically resolve a ContextService 
>if a user does not explicitly overwrite it. Also makes moving from TomEE 9 to 
>TomEE 10 easier. Any more thoughts on this?
>
>
>Thanks
>
>Markus
>
>On 03.07.24 20:48, Richard Zowalla wrote:
>> Hi all,
>> 
>> I want to add some additional thoughts here:
>> 
>> The question is more or less a question related to the original design of 
>> the auto configuration of TomEE, so basically boils down to:
>> 
>> Should a default context service be created if implicitly referenced by a 
>> user-defined custom managed (or scheduled) executor service or not.
>> Nevertheless, the current behavior is odd, so the end user doesn’t actually 
>> know what is going on.
>> 
>> Regardless of which path we choose, we need to update the related 
>> documentation to state, that a context service is (now) needed. For people 
>> migrating from older version of TomEE, it would be more than neat to 
>> automatically create and configure the default context service to smooth 
>> transitions to TomEE 10. Wdyt?
>> 
>> Gruß
>> Richard
>> 
>>> Am 03.07.2024 um 12:57 schrieb Markus Jung<ju...@apache.org>:
>>> 
>>> Hey all,
>>> 
>>> 
>>> I've been investigating an issue a user reported with 10.0.0-M1 [1] with 
>>> Richard yesterday. The user configured a ManagedExecutorService Resource 
>>> but omitted configuring a ContextService (which is required in TomEE 10). 
>>> This causes the ManagedExecutorService to default to the "Default Context 
>>> Service" ContextService, which doesn't get configured automatically because 
>>> it is not injected anywhere. This leads to an ambiguous exception that 
>>> "Default Context Service" is unknown.
>>> 
>>> 
>>> If everything is configured (ManagedExecutorService + ContextService) and 
>>> linked together it works. If nothing is configured it works as well 
>>> (ContextService gets auto configured when ManagedExecutorService is auto 
>>> configured). However Configurations that were valid in TomEE 9 as the one 
>>> reported in [1] are now invalid.
>>> 
>>> 
>>> I'm not sure how this is actually intended to be used, documentation for 
>>> ManagedExecutorService is outdated as it doesn't mention the requirement of 
>>> a ContextService yet.
>>> 
>>> Should it work and the ContextService gets auto configured if not 
>>> explicitly configured? Or fail and tell the user in a more understandable 
>>> way that requirements have not been met?
>>> 
>>> 
>>> Thanks
>>> 
>>> Markus
>>> 
>>> 
>>> [1]https://issues.apache.org/jira/browse/TOMEE-4354
>>> 

Reply via email to