Announcement Announcement Module
Collapse
No announcement yet.
@Configuration + @Bean --> @Named + @Produces Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Configuration + @Bean --> @Named + @Produces

    Is it possible to use CDI Annotations for @Configuration and @Bean:

    Examle:

    @Configuration
    public final class ArtistFactoryImpl {

    @Bean
    @Scope("session")
    public final artist() {
    return new ArtistImpl("Kylie"); //or what ever
    }

    }

    I've tried to use @Named instaed of @Configuration and @Produces instead of @Bean

    I fear that only the annotations from JSR 330 will be supported and not from JSR299 ?

    The constructs in spring and in "springs plagiarism" (Java EE6 / CDI ) looks identical. Using the standard at this place woudn't be worse, thats the reason for my question.

    Thanks.
Working...
X