Pavel Pereslegin created IGNITE-15801:
-----------------------------------------
Summary: Annotation-based injection of ServiceContext in Ignite
services.
Key: IGNITE-15801
URL: https://issues.apache.org/jira/browse/IGNITE-15801
Project: Ignite
Issue Type: Improvement
Reporter: Pavel Pereslegin
Inject ServiceContext using special annotation.
Suggested approach for Java services:
_1. Add init/execute/cancel methods without parameters._
_2. Add default no-op implementations for the new methods (this is required_
_to preserve compatibility)._
_3. For old methods that take ServiceContext as a parameter, add default_
_implementations that delegate to new methods._
_4. Deprecate the old methods on the API._
_5. On the implementation level, still use the old methods (again - for_
_compatibility)._
_6. Finally, add a @ServiceContextResource annotation to inject_
_ServiceContext._
Pros:
1. The annotation-based injection is a user-friendly approach widely used in
Ignite.
2. The user does not need to implement all the lifecycle methods every time.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)