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

280 comments:

«Oldest   ‹Older   201 – 280 of 280
ramya said...

Wonderful!! this is really one of the most beneficial blogs

I’ve ever browsed on this subject. I am very glad to read

such a great blog and thank you for sharing this good

info with us.Keep posting stuff like this..no.1 AWS Training institute in

kanchipuram

sandhiya said...

The best thing is that your blog really informative thanks for your great information! I have got some important suggestions from it.
Best Printed Circuit Board (PCB) Course Training Institute in kanchipuram|

mano karan said...

The information you have deliver here is really useful to make my knowledge good. Thanks for your heavenly post.
Best Best Web Designing and Development Course Training Institute in kanchipuram|

karthik said...

Interesting post! This is really helpful for me. I like it! Thanks for sharing!
Best Tally erp9 Course Training Institute in kanchipuram|

rajinikumar said...

Your post explain everything in detail and it was very interesting to read. Thank you sharing.
Best Tally Erp9 Course Training Institute in kanchipuram|

bharathidasan said...

Wow..great job. keep on sharing like this useful blogs.
Best Tally Erp9 Course Training Institute in kanchipuram|

suresh said...

I am read your post was very interesting good valid information
keep sharing more information...
Best Tally Erp9 Course Training Institute in kanchipuram|

karthik said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information, this is useful to me…
Best Tally Erp9 Course Training Institute in kanchipuram|

rajinikumar said...

Really it was an awesome information...very interesting to read..You have provided an nice blog....Thanks for sharing..
Best JAVA / J2EE / J2ME Course Training Institute in kanchipuram|

bharathidasan said...

Excellent post. I have read your blog it's very interesting and informative. Keep sharing.
Best JAVA / J2EE / J2ME Course Training Institute in kanchipuram|

mano karan said...

Nice post.. Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...
Best C & C++ Course Training Institute in kanchipuram|

mano karan said...

Nice post.. Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...
Best C & C++ Course Training Institute in kanchipuram|

sandhiya 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.
Best Tally Erp 9.0 Course Training Institute in kanchipuram|

sandhiya 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.
Best Tally Erp 9.0 Course Training Institute in kanchipuram|

suresh said...

This is really impressive post, I am inspired with your post, do post more blogs like this, I am waiting for your blogs.
Best Tally Erp 9.0 Course Training Institute in kanchipuram|

karthik said...

Interesting post!!! Thanks for posting such a useful information. I wish to read your upcoming post to enhance my skill set and keep blogging.
Best Tally Erp 9.0 Course Training Institute in kanchipuram|

srihariparu said...

Wow...What an excellent informative blog, really helpful. Thank you so much for sharing such a wonderful article with us.keep updating..
Hadoop Training Institute in Chennai | Hadoop Training in Velachery | Hadoop Training Center in Chennai

karthik said...

Interesting post!!! Thanks for posting such a useful information. I wish to read your upcoming post to enhance my skill set and keep blogging.
Best Tally Erp 9.0 Course Training Institute in kanchipuram|

rajinikumar said...

This is excellent information. It is amazing and wonderful to visit your

site.Thanks for sharing this information, this is useful to me.
Best Selenium

Automation Course Training Institute in kanchipuram
|

sophiamarry 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..
No:1 Tally Training Academy in kanchipuram

srihariparu said...

This is really too useful and have more ideas from yours. keep sharing many techniques and thanks for sharing the amazing article.
MatLab Training Institute in Chennai | MatLab Training Center in Velachery

mano karan said...

Very good and informative information. Thanks for sharing such nice blog, keep on updating such good post.
Best Software Testing Course Training Institute in kanchipuram|

bharathidasan said...

I have read your blog. Good and more information useful for me, Thanks for sharing this information keep it up....
Best Dot Net Course Training Institute in kanchipuram|

deepti said...

Really nice post. Thank you for sharing amazing information.
BluePrism Training Institute in Chennai | BluePrism Training in Velachery

deepti said...

Really nice post. Thank you for sharing amazing information.
BluePrism Training Institute in Chennai | BluePrism Training in Velachery

hanshika said...

Excellent post!!! The future of cloud computing is on positive side. With most of the companies integrate Salesforce to power their business; there is massive demand for Salesforce developers and administrators across the world.
No:1 BBA Project Center in kanchipuram

Anu Ram said...

It is really amazing...thanks for sharing....provide more useful information...
Best Project Center in Kanchipuram

sandhiya said...

Really it was an awesome blog...very interesting to read..You have provided an nice information....Thanks for sharing..
Best Hardware & Networking Course Training Institute in kanchipuram|

monika said...

Great post.Thanks for one marvelous posting! I enjoyed reading it;The information was very useful.Keep the good work going on.
No:1 IT Project Center in Kanchipuram

sandhiya said...

Really it was an awesome blog...very interesting to read..You have provided an nice information....Thanks for sharing..
Best Hardware & Networking Course Training Institute in kanchipuram|

karthik said...

Thanks for sharing in this blog...its very useful for us...keep on going...
Best MS Office Course Training Institute in kanchipuram|

sophiamarry said...

To find out the popular mistakes in essay, have a glimpse at this papers site to read the useful article about it.
No:1 JAVA TRAINING ACADEMY in Kanchipuram

Chris Hemsworth said...

The article is so informative. This is more helpful for our
selenium training in chennai
selenium online courses best selenium online training
selenium testing training
selenium classes
Thanks for sharing.

Raja Rani said...

Thanks for your informative blog. Your post helped me to understand the future and career prospects. Keep on updating your blog with such awesome blog.
No:1 Best Software Testing Training in Kanchipuram

mythili ss said...

I have been tying to get this set up for the past few 2 days. When I came across your article and wanted to know id others have been able to get it to work. Glad to hea from anyone with updated info.
No:1 Selenium Automation Training Academy in kanchipuram

lathamukesh said...

Thanks for your informative blog. Your post helped me to understand the future and career prospects. Keep on updating your blog with such awesome blog.
No:1 Best Software Testing Training in Kanchipuram

karthik said...

Thanks for sharing in this blog...its very useful for us...keep on going...
Best MS Office Course Training Institute in kanchipuram|

zuan said...

Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
Web Designing Training Institute in Chennai | web design training class in chennai | web designing course in chennai with placement
Mobile Application Development Courses in chennai
Data Science Training in Chennai | Data Science courses in Chennai
Professional packers and movers in chennai | PDY Packers | Household Goods Shifting
Web Designing Training Institute in Chennai | Web Designing courses in Chennai
Google ads services | Google Ads Management agency
Web Designing Course in Chennai | Web Designing Training in Chennai

Naveen S said...

This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted.By Learn Digital Marketing Course Training in Chennai it will help to get Digital Marketing Course Training in Chennai.Learn Best Digital Marketing Course Training in Chennai's professional institute to get reputed job.

mano karan said...

Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it.
Best PCB (Printed Circuit Board) Course Training Institute in kanchipuram|

hanshika said...

Thanks for the useful information of software testing courses, give more updates on software testing development, First time I visit your blog really nice, I bookmark your blog here after a daily visit. Learn
No:1
Java J2EE Training Academy in kanchipuram



Blessy john said...

Thanks for sharing this useful and interesting Blog..keep updating.…
Best Final Year Project Center in Kanchipuram

mythili s said...

Thanks for making me this Blog. You have done a great job by sharing this content here. Keep writing blog like this
No:1
Graphic Design Training Academy in kanchipuram

Tony the King said...

What a fantastic information from your blog...Always keep sharing..…
Best Best Dotnet Training Institute in Kanchipuram

uma bharathi said...

Wow Very Nice Information Thanks For Sharing It.keep update...
No:1
EEE Project Centre Training Academy in kanchipuram

rajinikumar said...

Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
Best PCB (Printed Circuit Board) Course Training Institute in kanchipuram|

Tamil Thalaivi said...

Great blog.you put Good stuff.All the topics were explained briefly.so quickly understand for me.I am waiting for your next fantastic blog.Thanks for sharing.…
Best RPA Training Institute in Kanchipuram

bharathidasan said...

I love reading and following your post as I find them extremely informative and interesting.
Best AWS (Advanced Amazon Web Services) Course Training Institute in kanchipuram|

Tony the King said...

Great blog.you put Good stuff.All the topics were explained briefly.so quickly understand for me.I am waiting for your next fantastic blog.Thanks for sharing..…
No:1 VMware Training Institute in Kanchipuram

monika said...

Nice blog. Thank you for sharing. The information you shared is very effective for

learners I have got some important suggestions from it.
No:1Azure Training Academy in

Kanchipuram


sandhiya said...

Awesome post. Really you are shared very informative information... Thank you for sharing. Keep on updating...
Best AWS (Advanced Amazon Web Services) Course Training Institute in kanchipuram|

monika said...

Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it.
No:1Azure Training Academy in Kanchipuram

mythili s said...

Wonderful post. Thanks for taking time to share this information with us.
No:1
RPA Training Academy in kanchipuram

Tamil Thalaivi said...

Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing…
No:1 LINUX Training Institute in Kanchipuram

roshlin said...

Nice..You have clearly explained about the conept..Its very useful for me to undertand..Keep on sharing..

No:1 CCNP Training Academy in Kanchipuram



karthik said...

Great post..Its very useful for me to understand the information..Keep on blogging..
Best Software Testing Course Training Institute in kanchipuram|

srihariparu said...

Really nice post. Thank you for sharing your amazing information and informative article,its really useful for us.keep updating such a wonderful blog..
Embedded Training Institute in Chennai | Embedded Training Center in Velachery

srihariparu said...

Really nice post. Thank you for sharing your amazing information and informative article,its really useful for us.keep updating such a wonderful blog..
Embedded Training Institute in Chennai | Embedded Training Center in Velachery

hanshika said...

Wow! I've been searching for this for a while. Glad that you posted it. This will be really helpful. I'm taking reference from here. Keep us updated with more such posts.
No:1
IOS Training Academy in kanchipuram

deepti said...

Very informative and interesting blog, it was so good to read and useful to improve my knowledge as updated one,keep updating..This Concepts is very nice Thanks for sharing..
Selenium Training Institute in Chennai | Selenium Training Center in Velachery | Selenium Courses in T.Nagar

deepti said...

Very informative and interesting blog, it was so good to read and useful to improve my knowledge as updated one,keep updating..This Concepts is very nice Thanks for sharing..
Selenium Training Institute in Chennai | Selenium Training Center in Velachery | Selenium Courses in T.Nagar

Ragavi ramesh said...

nice and interesting blog to read.... keep updating !!!! Thanks for sharingNo:1 Hardware and Networking Training Institute in Kanchipuram

bharathidasan said...

I found some useful information in your blog, it was awesome to read, thanks for sharing this great information to my vision, keep sharing.
Best Graphic Designing Course Training Institute in kanchipuram|

srihariparu said...

Thanks for sharing your great information..Its really very impressive and informative content.keep updating...
Linux Certification Training Institute in Chennai | Linux Training in Velachery | Online Linux Training in Madipakkam

srihariparu said...

Thanks for sharing your great information..Its really very impressive and informative content.keep updating...
Linux Certification Training Institute in Chennai | Linux Training in Velachery | Online Linux Training in Madipakkam

Tony the King said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…No:1 Linux Training Institute in Kanchipuram

sandhiya said...

Marvelous and fascinating information.Thanks for this greatful blog. keep your blog updated.
Best Hardware & Networking Course Training Institute in kanchipuram|

suresh said...

Thanks a lot for offering this unique post with us. I really enjoyed by reading your blog post.keep sharing.
Best Python Course Training Institute in kanchipuram|

srihariparu said...

Amazing blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it..
Blue Prism Training Institute in Chennai | Blue prism Certification Training in Velachery | Blue Prism Training Center in Adyar

monika said...

Nice..You have clearly explained about the conept..Its very useful for me to
undertand..Keep on sharing..

No:1 Embedded system Training Academy in Kanchipuram







Tamil Thalaivi 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…No:1 RPA Training Institute in Kanchipuram

srihariparu said...

Amazing blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it..
Blue Prism Training Institute in Chennai | Blue prism Certification Training in Velachery | Blue Prism Training Center in Adyar

monika said...

Nice..You have clearly explained about the concept..Its very useful for me to
understand..Keep on sharing..

No:1 Embedded system Training Academy in Kanchipuram







suresh said...

I’m sincerely suggesting your blog.nice and really helpful information to everyone... thanks for sharing
Best Python Course Training Institute in kanchipuram|

Ragavi ramesh said...

Wow!! What a interesting blog..Thanks The information which you provided is very much useful and easy to learn as well...keep rocking and updating... looking further....No:1 Software Testing Training Institute in Kanchipuram

deepti said...

Pretty article! I found some useful information in your blog, it was amazing to read, thanks for sharing this great content to my vision...
Embedded Training Institute in Chennai | Embedded Training in Velachery | Embedded Certification Training in Velachery

deepti said...

Pretty article! I found some useful information in your blog, it was amazing to read, thanks for sharing this great content to my vision...
Embedded Training Institute in Chennai | Embedded Training in Velachery | Embedded Certification Training in Velachery

Malar said...

This is really awesome. Full of knowledge and latest information.Thanks for sharing.
Best JAVA / J2EE / J2ME Course Training Institute in kanchipuram|

srihariparu said...

Thank you so much for posting your amazing article...I really appreciate your work. Keep it up. Great work!...keep updating...
Cloud Computing Training Institute in Chennai | Cloud Computing Training in Velachery

suresh said...

great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
No:1 Best EEE Project Center in kanchipuram|

«Oldest ‹Older   201 – 280 of 280   Newer› Newest»