You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2010/05/01 10:55:54 UTC
[jira] Closed: (CAY-1424) DI: support for named service injection
and flexible map/list binding
[ https://issues.apache.org/jira/browse/CAY-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrus Adamchik closed CAY-1424.
--------------------------------
Resolution: Fixed
> DI: support for named service injection and flexible map/list binding
> ---------------------------------------------------------------------
>
> Key: CAY-1424
> URL: https://issues.apache.org/jira/browse/CAY-1424
> Project: Cayenne
> Issue Type: Task
> Affects Versions: 3.1M1
> Reporter: Andrus Adamchik
> Assignee: Andrus Adamchik
> Fix For: 3.1M1
>
>
> 1. DI wIll support optional named bindings to allow multiple instances of the same type of DI object. E.g.:
> Binder.bind(Class<T> interfaceType, String bindingName)
> 2. DI map and list bindings will no longer be tied to the type of object they are injected to. Instead such bindings will require a name. E.g.:
> Binder.bindMap(String bindingName) // Map.class will be used implicitly as the type
> ...
> Someclass {
>
> public Someclass(@Inject("xyz") Map<String, String> map) { ... }
> }
> Note that both DI features are intentionally simplified versions of the corresponding Guice features to avoid overcomplicating of Cayenne DI. E.g. #1 in Guice is done with custom annotations, not Strings, and #2 allows distinguishing between the maps by their parameterized key and value types (same for lists).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.