[
https://issues.apache.org/jira/browse/IOTA-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16073998#comment-16073998
]
Rafael Weingärtner commented on IOTA-41:
----------------------------------------
I would add that actors continue being instantiated by Fey. Objects managed by
Spring will be autowired in the Actor after its creation. Further, the
autowiring requires that the properties that are managed by Spring have to be
annotated by @Autowired.
> Spring dependency injection for fey performers
> ----------------------------------------------
>
> Key: IOTA-41
> URL: https://issues.apache.org/jira/browse/IOTA-41
> Project: Iota
> Issue Type: Improvement
> Reporter: Lucas Cristofolini
>
> There are many benefits to using the Spring framework (dependency injection,
> object management, etc.).
> Integrating these functionalities into fey performers would be a great
> improvement for the project.
> Our proposed implementation consists of creating a class that extends the
> original FeyGenericActor (named FeyGenericSpringActor), which allows for one
> more argument to be passed within its constructor, which is a String
> containing an absolute filesystem path for the XML file containing that
> actor's Spring context. The new actor class has two attributes: an
> ApplicationContext and its AutowireCapableBeanFactory, which will allow us to
> instantiate the beans specified in the actor's context.
> Other modifications to the fey engine core include the necessary changes
> related to parsing the orchestration JSON: adding an entry for the actor
> context's file path on the JSON validator and parser method, along with a
> conditional check to see if a path to the actor's context was specified in
> the JSON, so that fey will instantiate a FeyGenericSpringActor instead of a
> FeyGenericActor.
> Lastly, we've created a FeySpringContext.xml, which should be the parent
> context to all actor contexts created, and will contain useful universal
> declarations. For now, all it does is enable annotation usage in all Spring
> actors.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)