[
https://issues.apache.org/jira/browse/IOTA-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lucas Cristofolini updated IOTA-41:
-----------------------------------
Description:
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.
was:
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.
> 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)