cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAY-1424) DI: support for named service injection and flexible map/list binding
Date Wed, 28 Apr 2010 08:11:33 GMT
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.


Mime
View raw message