You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Friederich Christophe (JIRA)" <ji...@apache.org> on 2014/09/12 12:23:34 UTC

[jira] [Comment Edited] (CAY-1955) add support jsr-250 and jsr330 to DI

    [ https://issues.apache.org/jira/browse/CAY-1955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14131327#comment-14131327 ] 

Friederich Christophe edited comment on CAY-1955 at 9/12/14 10:23 AM:
----------------------------------------------------------------------

Of course. What do you use to explain a feature and benefits ?
Personally, I'm using Confluence "Product Requirement Template" or github wiki and links it to Jira issue , but I believe you don't work like this, because you no longer use.


was (Author: devacfr):
Of course. What do you use to explain a feature and benefits ?
Personally, I'm using Confluence "Product Requirement Template" or github wiki and links it to Jira issue , but I believe we don't work like this, because you do use it anymore.

> add support jsr-250 and jsr330 to DI
> ------------------------------------
>
>                 Key: CAY-1955
>                 URL: https://issues.apache.org/jira/browse/CAY-1955
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>            Reporter: Friederich Christophe
>            Priority: Minor
>              Labels: patch
>
> h4. Add partial *JSR-250* lifecycle annotations support:
> * {{@PostConstruct}} is used on methods that need to get executed after dependency injection is done to perform any initialization.
> * {{@PreDestroy}} is used on methods that are called before the instance is removed from the container
> h4. Add partial *JSR-330* dependency injector annotations support
> * {{@Inject}} identifies injectable constructors, methods, and fields.
> * {{@Named}} type named.
> * {{Provider<T>}} interface Provides instances of T.
> * {{@Scope}} Identifies scope annotations.
> * {{@Singleton}} Identifies a type that the injector only instantiates once.
> * {{-@Qualifier-}} not implemented.
> h4. Deprecate _org.apache.cayenne.di.Inject_ annotion and _org.apache.cayenne.di.Provider_ interface
> h4. Add {{lazy}}/{{eager}} singleton instantiation
> - {{lazy}} is default implementation.
> - {{earger}} allows initializing singleton upon cayenne run-time started, exceptions will occur at start-up time vs first be used and avoids any delay when the service provided is requested the first time.
> h4. Add constant binding injection
> {code}
> public class ClientModule implements Module {
>     private String ROPServiceUrl;
>  
>     public void configure(Binder binder) {
>         Assert.notNull(ROPServiceUrl, "ROP  service url is required");
>         ...
>         binder.bindConstant(String.class, "rop-service-url").to(ROPServiceUrl);
>         ...
>     }
> }
> public class HessianConnectionProvider implements Provider<ClientConnection> {
>     private String url;
>     public HessianConnectionProvider(@Inject @Named("rop-service-url") String url) {
>         this.url = url;
>     }
>     ...
> }
> {code}
> h4. Add possibility  to inject a specific provider (_optional_)
> {code}
> public interface ProviderResource extends Provider<Resource> {
>     public Resource get() {...}
>     public void close() {...}
> }
> ...
> public class Manager {
>     @Inject
>     @Named("domainFile")
>     private ProviderResource resource;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)