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

Andriy Redko commented on CXF-5576:
-----------------------------------

Hi Sergey,

Sorry, my bad, I should have clarified it more. You can inject mostly 
everything. 
Just a small example:
{noformat}
public class AppConfig {
    @Inject private int port;
    @Inject private String hostname;    

     // ....    
}

public class Properties {
    @Produces private String hostname = "myhost";
    
    @Produces
    public int port() {
        // Or read from file ...
        return 8080;
    }
}
{noformat}

I will add  more sophisticated examples to test cases with different scenarios 
and properties.
Thanks.
Andriy

> Initital support for CDI integration
> ------------------------------------
>
>                 Key: CXF-5576
>                 URL: https://issues.apache.org/jira/browse/CXF-5576
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 3.0.0
>            Reporter: Andriy Redko
>            Assignee: Andriy Redko
>              Labels: cdi
>         Attachments: weld-one-jar.zip, weld-one-war.zip
>
>
> A per section 10.2.3 Context and Dependency Injection (CDI) of JAX-RS 2.0 
> specification, in a product that supports CDI, the implementations MUST 
> support the use of CDI-style Beans as root resource classes, providers and 
> Application subclasses. Providers and Application subclasses MUST be 
> singletons or use application scope.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to