Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable injection in SARL #26

Closed
ngaud opened this issue Mar 17, 2014 · 3 comments
Closed

Enable injection in SARL #26

ngaud opened this issue Mar 17, 2014 · 3 comments
Labels
Milestone

Comments

@ngaud
Copy link
Member

ngaud commented Mar 17, 2014

Do we enable the access to the inject (IoC in general) in SARL. The final goal consist in enabling that agents configuration could be customized in function of the deployment environment. According to the environment the injected class will be customized.

Could have inject dependent from the architecture: linux, windows, android, etc.

@ngaud
Copy link
Member Author

ngaud commented Mar 20, 2014

Clearly necessary. Various way to implement the injection:

  • First one like in Java with annotation, probably too ealry to open the whole management of Annotation
  • Second one, create a new keyword like resource, every thing declared as a resource is considered as injectable. The key point is the access to Janus injector.

resource myDB: DBConnection

generates
@Inject
private final setDBConnection() {
}

So this problem is a problem related to the Janus configuration, how to add new GUICE module to JANUS. It is already managed inside the Janus Boot class.

Possible Janus command line options

  • -m add a new module from its full qualified name
  • -M the complete list of modules to be used

@gallandarakhneorg
Copy link
Member

This issue should be fixed after the issue #34.

@gallandarakhneorg
Copy link
Member

Since the annotations are supported, the injection is supported.

@gallandarakhneorg gallandarakhneorg modified the milestones: 0.3, 1.1.0 Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants