[
https://issues.apache.org/jira/browse/IOTA-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16084818#comment-16084818
]
ASF GitHub Bot commented on IOTA-41:
------------------------------------
Github user cristofolini commented on the issue:
https://github.com/apache/incubator-iota/pull/35
@barbaragomes I've added a couple unit tests, one to check that a context
is loaded and one to check that a factory is instatiated. I want to get some
feedback on two things:
- Am I doing this right? I'm completely new to Scala and these are the
first tests I ever coded (in Scala, anyway) and mostly based myself on the
other tests that are implemented;
- Anything else that needs testing? Let me know if there's anything else I
should cover.
@rafaelweingartner I've changed the autowiring method to by_type.
> 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 a path for the XML file containing that actor's Spring context,
> which can be an absolute or relative filesystem path (relative to the current
> VM working directory) or obtained from the classpath (by specifying a
> "classpath:" prefix); other protocols and prefixes may be supported by the
> Spring framework. 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)