Popular Posts

Thursday, June 05, 2014

CDI - Contexts and Dependency Injection tutorial for Java EE

Contexts and Dependency Injection (CDI) is one of several Java EE 6 features that help to knit together the web tier and the transactional tier of the Java EE platform. 
CDI is a set of services that, used together, make it easy for developers to use enterprise beans along with JavaServer Faces technology in web applications. Designed for use with stateful objects, CDI also has many broader uses, allowing developers a great deal of flexibility to integrate various kinds of components in a loosely coupled but typesafe way.


CDI is the Java standard for dependency injection (DI) and interception (AOP).


The most fundamental services provided by CDI are as follows:
  • Contexts: The ability to bind the lifecycle and interactions of stateful components to well-defined but extensible lifecycle contexts
  • Dependency injection: The ability to inject components into an application in a typesafe way, including the ability to choose at deployment time which implementation of a particular interface to inject
In addition, CDI provides the following services:
  • Integration with the Expression Language (EL), which allows any component to be used directly within a JavaServer Faces page or a JavaServer Pages page
  • The ability to decorate injected components
  • The ability to associate interceptors with components using typesafe interceptor bindings
  • An event-notification model
A major theme of CDI is loose coupling. CDI does the following:
  • Decouples the server and the client by means of well-defined types and qualifiers, so that the server implementation may vary
  • Decouples the lifecycles of collaborating components by doing the following:
    • Making components contextual, with automatic lifecycle management
    • Allowing stateful components to interact like services, purely by message passing
  • Completely decouples message producers from consumers, by means of events
  • Decouples orthogonal concerns by means of Java EE interceptors

CDI tutorial

848 comments:

«Oldest   ‹Older   801 – 848 of 848
Usadev said...

Excellent blog with useful concept. Really I feel very happy to see this informative blog, Thanks for sharing such a nice blog.. Tally Training Institute in Chennai|

Atmajakan said...

Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's. Python Training Institute in Chennai |

Natasha said...

Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.Regards, Data Science Training Institute in Chennai |

karlie said...

awesome way to get exert tips from everyone,not only i like that post all peoples like that post,because of all given information was wonderful and it's very helpful for me. CCNA Exam Center in Chennai |

Neil said...

In the beginning, I would like to thank you much about this great post.I like your writing style and I hope you will keep doing this good working AWS Exam Center in Chennai |

Benjamin jan said...

Wow...Excellent informative blog, really helpful. Thank you. Final Year Projects For Phd in Chennai |

isaiah han said...

It is really a great work and the way in which u r sharing the knowledge is excellent.Thanks for helping me to understand basic concepts. Final year projects For Engineering Students in Chennai |

kazanow ski said...

Thank you for sharing the information here. Its much informative and really i got some valid information. You had posted the amazing article. Final year projects For CSE Students in Chennai |

jeffery said...

Excellant post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. Final year projects For CS in Chennai |

gilbertgon said...

I am joyful to read this post, its an attractive one. Thanks for this amazing post.. Final year projects For IT in Chennai |

franklin fie said...

I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.. Final year projects For EEE in Chennai |

Usadev said...

this blog is really useful and it is very interesting thanks for sharing , it is really good and exclusive. PMP Certification Center in Chennai |

advikshan said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for
sharing this information, this is useful to me. Photoshop Training institute in Chennai |

advikshan said...

Really an awesome post. I wondered by reading this blog post. Thanks a lot for posting this unique post which you have shared with us. Keep on posting like this exclusive post with us. Photoshop Training institute in Chennai |

Usadev said...

Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts, have a nice weekend!PCB Design Training in Chennai |

Neil said...

I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Hardware and Networking Training institute in Chennai |

Natasha said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information and it is very useful to me... Microsoft Azure Certification Center in Chennai |

Benjamin jan said...

Really very great information to be provided and the All points discussed were worth reading and i’ll surely work with them all one by one. TOGAF Certification Center in Chennai |

isaiah han said...

There was very wonderful information and that's great one. I really appreciate the kind words, thanks for sharing that valuable information. illustrator Training institute in Chennai |

kazanow ski said...

Your blog was so informative, Really I thanks a lot for sharing such a awesome blog. Tally Erp9 Training Center in Chennai |

jeffery said...

I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly. Graphic Designing Training Center in Chennai |

franklin fie said...

Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated. JAVA Training Institute In Chennai |

franklin fie said...

Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated. JAVA Training Institute In Chennai |

bharathidasan said...

very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing. Final year projects For EEE in Chennai |

rajinikumar said...

Impressive blog with lovely information. really very useful article for us thanks for sharing such a wonderful blog... Final year projects For BCA in Chennai |

karthik said...

Your blog is awesome..You have clearly explained about it ...Its very useful for me to know about new things..Keep on blogging.. Final year projects For MCA in Chennai |

advikshan said...

I learned so many things from your blog, keep sharing.. Final year projects For IT in Chennai |

srihariparu said...

I have read your blog. Your information is really useful for beginner. information provided here are unique and easy to understand.Thanks for this useful information.......
PCB Design Training in Chennai | PCB Training Institute in Velachery | PCB Courses in Velachery | Online Training Institute in Velachery

srihariparu said...

I have read your blog. Your information is really useful for beginner. information provided here are unique and easy to understand.Thanks for this useful information.......
PCB Design Training in Chennai | PCB Training Institute in Velachery | PCB Courses in Velachery | Online Training Institute in Velachery

srihariparu said...

I have read your blog. Your information is really useful for beginner. information provided here are unique and easy to understand.Thanks for this useful information.......
PCB Design Training in Chennai | PCB Training Institute in Velachery | PCB Courses in Velachery | Online Training Institute in Velachery

srihariparu said...

I have read your blog. Your information is really useful for beginner. information provided here are unique and easy to understand.Thanks for this useful information.......
PCB Design Training in Chennai | PCB Training Institute in Velachery | PCB Courses in Velachery | Online Training Institute in Velachery

srihariparu said...

Your Post is really wonderful and amazing content.Thanks for sharing such a useful blog and really good...
Java Training Institute in Chennai | Java Training Center in Velachery | Online Training Institute in Velachery

srihariparu said...

Your Post is really wonderful and amazing content.Thanks for sharing such a useful blog and really good...
Java Training Institute in Chennai | Java Training Center in Velachery | Online Training Institute in Velachery

deepti said...

This post is really nice and informative. The explanation given is really comprehensive and informative..
CCNA Training Institute in Chennai | CCNA Training Center in Velachery | CCNA Training Courses in Chennai | CCNA Training in Velachery | CCNA Online Training in Velachery

deepti said...

This post is really nice and informative. The explanation given is really comprehensive and informative..
CCNA Training Institute in Chennai | CCNA Training Center in Velachery | CCNA Training Courses in Chennai | CCNA Training in Velachery | CCNA Online Training in Velachery

deepti said...

This post is really nice and informative. The explanation given is really comprehensive and informative..
CCNA Training Institute in Chennai | CCNA Training Center in Velachery | CCNA Training Courses in Chennai | CCNA Training in Velachery | CCNA Online Training in Velachery

deepti said...

This post is really nice and informative. The explanation given is really comprehensive and informative..
CCNA Training Institute in Chennai | CCNA Training Center in Velachery | CCNA Training Courses in Chennai | CCNA Training in Velachery | CCNA Online Training in Velachery

deepti said...

Thanks for giving nice information from your blog...It's really an amazing post..
AWS Certification Training in Chennai | AWS Training Center in Velachery | AWS Online Training in Velachery | AWS Training Institute in Velachery

srihariparu said...

Thanks for giving nice information from your blog...It's really an amazing post...
Tally Training Institute in Chennai | Tally Training Center in Velachery | Tally Training with GST Training in Velachery | Online Training Center in Velachery

srihariparu said...

Thanks for giving nice information from your blog...It's really an amazing post...
Tally Training Institute in Chennai | Tally Training Center in Velachery | Tally Training with GST Training in Velachery | Online Training Center in Velachery

srihariparu said...

Thanks for giving nice information from your blog...It's really an amazing post...
Tally Training Institute in Chennai | Tally Training Center in Velachery | Tally Training with GST Training in Velachery | Online Training Center in Velachery

srihariparu said...

Thanks for giving nice information from your blog...It's really an amazing post...
Tally Training Institute in Chennai | Tally Training Center in Velachery | Tally Training with GST Training in Velachery | Online Training Center in Velachery

srihariparu said...

Brilliant article. The information I have been searching precisely. It helped me a lot, thanks. Keep coming with more such informative article.
C and C++ Training Institute in Chennai | C and C++ Training Center in Velachery | C & C++ Training in Velachery | Online Training in Velachery

srihariparu said...

Brilliant article. The information I have been searching precisely. It helped me a lot, thanks. Keep coming with more such informative article.
C and C++ Training Institute in Chennai | C and C++ Training Center in Velachery | C & C++ Training in Velachery | Online Training in Velachery

srihariparu said...

I have read your blog, its really very attractive and impressive. I like it your post. Thanks for sharing such a wonderful blog with us...
PCB Training Institute in Chennai | PCB Training Center in Velachery | PCB Online Courses in Velachery | Online Training Center in Velachery

srihariparu said...

I have read your blog, its really very attractive and impressive. I like it your post. Thanks for sharing such a wonderful blog with us...
PCB Training Institute in Chennai | PCB Training Center in Velachery | PCB Online Courses in Velachery | Online Training Center in Velachery

srihariparu said...

I have read your blog, its really very attractive and impressive. I like it your post. Thanks for sharing such a wonderful blog with us...
PCB Training Institute in Chennai | PCB Training Center in Velachery | PCB Online Courses in Velachery | Online Training Center in Velachery

srihariparu said...

I have read your blog, its really very attractive and impressive. I like it your post. Thanks for sharing such a wonderful blog with us...
PCB Training Institute in Chennai | PCB Training Center in Velachery | PCB Online Courses in Velachery | Online Training Center in Velachery

«Oldest ‹Older   801 – 848 of 848   Newer› Newest»