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

Ignite TC Bot commented on IGNITE-15801:
----------------------------------------

{panel:title=Branch: [pull/9542/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/9542/head] Base: [master] : New Tests 
(2)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Spring{color} [[tests 
2|https://ci.ignite.apache.org/viewLog.html?buildId=6256386]]
* {color:#013220}IgniteSpringTestSuite: 
GridServiceContextInjectionSelfTest.testInjection - PASSED{color}
* {color:#013220}IgniteSpringTestSuite: 
GridServiceContextInjectionSelfTest.testCompatibility - PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci.ignite.apache.org/viewLog.html?buildId=6256457&buildTypeId=IgniteTests24Java8_RunAll]

> 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
>          Components: managed services
>            Reporter: Pavel Pereslegin
>            Assignee: Pavel Pereslegin
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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.
> Cons:
>  1. Duplication of methods in the Service interface for an indefinite period.
>  2. Someday we need to remove the old methods, and this will break all ignite 
> services that use the old approach.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to