• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CDI managed beans and stereotypes for Part 2

 
Andres Olarte
Ranch Hand
Posts: 46
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my solution for part 2 I have few classes that will be wired as CDI managed beans. Any suggestions on what stereotype to use?
I'm already using <<ManagedBean>> for JSF backing beans, so I'm a bit unsure and would welcome suggestions.

Also, should I define what my stereotypes mean in a kind of glossary? Or should I assume that they have to be evident on their own?
 
Mike Degteariov
Ranch Hand
Posts: 145
8
Java Mac MySQL Database Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amritendu De's book suggests using <<@managedBean>>
 
Andres Olarte
Ranch Hand
Posts: 46
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you suggestion, Mike.
I was somewhat confused, and after some reading around it seems that javax.faces.bean.ManagedBean is not recommended if using CDI, the best way is using @Named("myBeanName"). I guess you learn something new everyday.

So I'll just use <<ManagedBean>> for all CDI beans, and mark JSF beans with something like <<JSF BackingBean>> to be extra clear.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic