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

84 comments:

Chandrika Madapudi said...

I agree with your thoughts!!! As the demand of java programming application keeps on increasing, there is massive demand for java professionals in software development industries. Thus, taking training will assist students to be skilled java developers in leading MNCs. J2EE Training in Chennai | JAVA Training Institutes in Chennai

kovalan Jayamurugan said...

Thanks for your informative article. Android SDK allows you to create stunning mobile application loaded with more features and enhanced priority. With basis on Java coding language, you can create stunning mobile application with ease. Android Training Institutes in Chennai | Android Training in Chennai

murali karthik said...

Thanks for your informative post on selenium automation testing tool. Your article helped me a lot in understanding the future of automation testing tool and its career prospects. Selenium Training | Best Selenium training institute in Chennai

Giri Mani 2 said...

Great... Excellent sharing.. This is very helpful for beginers. Read that provide me more enthusiastic. This helps me get a more knowledge about this topic. Thanks for this.
Android Training in Chennai

for IT the said...

I have read your blog its very attractive and impressive. I like it your blog.

Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

Java Online Training Java Online Training Core Java 8 Training in Chennai Core java 8 online training JavaEE Training in Chennai Java EE Training in Chennai

for IT the said...


Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

for IT the said...

Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training

Hibernate Online Training Hibernate Online Training Spring Online Training Spring Online Training Spring Batch Training Online Spring Batch Training Online

Evelin Harriet said...

Great information. I have got some important suggestions from it. I'm working in ERP Software Company in Chennai. | ERP Providers in Chennai.

Caroline Keerth said...


Amazing blog about the various informative information on the programming languages. PHP is one such programming language which is more easier to learn and has lot of scope in future which is provided by Php Training institute in Chennai

revathi said...

Your article about Web Designing is awesome. It helped me to understand the career prospects.
Web Designing Training Institute in Chennai | Web Designing Training Institute in Velachery.

Shivani Yuvanjalin said...

Really Nice Blog. Thank you for Sharing. We are the best erp software providers in chennai. For more details call +91 9677025199 or email us on info@bravetechnologies.in.
ERP Providers in Chennai

anitha a said...

Great information. I have got some important suggestions from it.
Web D School

Vamshi Krishna said...



very useful info, and Keep updating us...

Krishna Veni said...

Good and nice article, thanks for sharing your valuable information and time.. keep rocks..
Java Training institute in chennai | Java Training in velachery |Best Java Training in chennai

teja said...

Your blog is awesome.You have clearly explained about it. It's very useful for me to know about new things..Keep on blogging..Software Testing Training Institute in Chennai | Software Testing Training Institute in Velachery.

fawaz shaik said...

Great article..keep updating..
Embedded System Training in Chennai | Embedded System Course in Chennai | No.1 Embedded Training Institute in Chennai | Online Embedded Training in Chennai

chandhu said...

Thanks for sharing your informative article..keep updating such a useful Blog..
Linux Training Institute in Chennai | No.1 Linux Training Institute in Chennai | Online Training Institute in Chennai

ALINAAMEL said...


I would like to say thank you for the amazing details and concepts you are sharing in this.
Webseiten Gestaltung Lüdenscheid

annika romy said...


The website is looking bit flashy and it catches the visitors eyes. A design is pretty simple .
windows 7 ultimate download

subash said...
This comment has been removed by the author.
Ankit Kumar said...

It is amazing and wonderful to visit your post.Thanks for sharing this information, this is useful to me...
sap training institute

sanu Singh said...

Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating more.
Sap BW Training

wiztech Automation Solutions said...

Great article..its very useful for us..thanks for sharing in this blog...

Embedded System training in Chennai

deepti said...

Wow. This really made my day. Thanks a lot!
Java Project Center in Chennai | Best Java Projects in Velachery

ALINAAMEL said...

Interesting post! This is really helpful for me. I like it! Thanks for sharing!
WebDesign Lüdenscheid

Richard Swayar said...

Australia best tutor is well known academic portal. Here students can get different kind of Online Assignment help services like that

1.Online Assignment Help
2.Instant Assignment Help
3.Assignment Help
4.Help with Assignment
5.my assignment Help

And also access that services at any time and any where.

Anna malaiyar said...

Interesting post..thanks for sharing..
Linux Certification Training in Chennai | Microsoft Certification Training in Chennai | MCSA Training in Chennai

deepti said...

Thanks for this information; I hope it will use much reader who looking you regularly likes me
Power System Project Center in Chennai | Power System Project Center in Velachery

ALINAAMEL said...


Informative and impressive. Keep Updating
Programmierung in Lüdenscheid

Riya karakoti said...

Air conditioning maintenance birmingham- onlyrepaircenter has the 30 Years Experience in Air conditioning maintenance service in birmingham. If you are facing the problem in your air conditioning of any company such as Daikin, Mitsubishi, Carrier, Fujitsu, Toshiba, Airedale, Sanyo, Trane and LG then you can contact to us.

Air Conditioning Installation birmingham
Commercial air conditioning repair Birmingham
residential air conditioning repair birmingham
Air Conditioning Maintenance birmingham
window ac repair birmingham

lotus said...

By reading your blog post i gained more information.Thanks for sharing.
Android Project Center in Chennai | Android Project Center in Velachery

Nisha Premrahul said...

You made some good points there. I did a search on the topic and found most people will agree with your blog.
MSC Project Center in Chennai | MSC Project Center in Velachery

anudeep bichal said...

useful post and please keep on posting

java training in bangalore

Riya karakoti said...

Best Digital Marketing Training Institutes in Noida - As the virtual marketing field maintains to develop at a fast pace, entrepreneurs are springing with new possibilities.

Best Php Training Institutes in Noida

Best Digital Marketing Training Institutes in Noida

Best Hadoop Training Institutes In Noida

Best Sas Training Institutes in Noida

Best Sap Training Institutes in Noida

Best Linux Training Institutes in Noida

Best Salesforce Training Institutes in Noida

Best Software Testing Training Institutes In Noida

Best Python Training Institutes in Noida

Riya karakoti said...

Best Oracle Training Institutes in Noida

Best Android Training Institutes in Noida

Best Web Design Training Institutes in Noida

best java training institutes in noida

best sap mm training institutes in noida

best sap sd training institutes in noida

best sap hr training institutes in noida

best tableau training institutes in noida

best automation anywhere training institutes in noida

best rpa training institutes in noida

Riya karakoti said...

best blue prism training institutes in noida

best angularjs 5 training institutes in noida

best net training institutes in noida

best aws training institutes in noida

best cloud computing training institutes in noida

srihariparu said...

Thanks for giving such a colorful information about that post..Keep update your colorful blog..
Robotics Project Center in Chennai | Best Robotics Projects in Chennai | IEEE Robotics Project Center in Chennai | No.1 Robotics Project Center in Velachery

Gowri S said...

I wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.
Big Data Training in Marathahalli

ram chinna said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Digital Transformation OverviewServices

sam said...

Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

Austere Technologies | Best Cloud Solution services

sam said...

Nice blog.

NO.1 APP DEVELOPMENT SERVICES | MASSIL TECHNOLOGIES

AUSTERO said...


REALLY VERY EXCELLENT INFORMATION. I AM VERY GLAD TO SEE YOUR BLOG FOR THIS INFORMATION. THANKS FOR SHARING. KEEP UPDATING.

NO.1 AQM Services | Application Quality Managment Services

Jahan Murugassan said...

Great... Excellent sharing.. This is very helpful for beginers. Read that provide me more enthusiastic. This helps me get a more knowledge about this topic. Thanks for this.

white label website builder

krish said...

This Article is new and informative ,it's easy to understand to us
Graphics Designing Training Institute in Chennai | CorelDraw Training Institute in Chennai

ajay said...

Your content is good and informative..Thank you for posting..Java Project Center in Chennai | Java Project Center in Velachery

adhi said...

Nice Post. Thank you for sharing...it was really very useful and informative. Keep updating..
Microsoft Azure Training Institute in Chennai|Microsoft Azure Training Institute in Velachery

vamsi vasi said...

Nice post. Great information and really very much useful. Thanks for sharing and keep updating.
Best AWS Training Institute in Chennai | Best AWS Training Institute in Velachery

masi said...

wow...nice blog, very help full information. Thanks for sharing.

NO.1 API DEVELOPMENT SERVICES | MASSIL TECHNOLOGIES

AUSTERO said...

Excellent blog.
Best Mobility Services | Austere Technologies

karuma said...

Blogs are not just for socializing with others but it can also give us useful information like this. Just like me, I’m a new blogger and this article gave me lots of ideas on how to start blogging to a site or posts.
Best Graphics DesigningTraining Institute in Chennai | Photoshop Training Institute in Chennai

shabaz r said...

REALLY VERY EXCELLENT INFORMATION. I AM VERY GLAD TO SEE YOUR BLOG FOR THIS INFORMATION. THANKS FOR SHARING. KEEP UPDATING.
white label website builder

mobile website builder

massil said...

Great informative blog. Keep updating.

NO.1 CLOUD SERVICES | Oracle Cloud PAAS | MASSIL TECHNOLOGIES

AUSTERO said...

Excellent information, very helpful. Keep sharing.

Best IT Security Services | Austere Technologies

brunagari said...

Thanks For Your valuable posting, it was very informative
Schulungsangebote

ciit noida said...

CIITN Noida provides Best Big Data Training Institute in Noida & big Data Hadoop Training Institute in Noida. based on current industry standards that helps attendees to secure placements in their dream jobs at MNCs. CIITN Provides Best Big Data Training in Noida. CIITN is one of the most credible Big Data training institutes in Noida offering hands on practical knowledge and full job assistance with basic as well as advanced level Big Data training courses. At CIITN Big Data training in noida is conducted by subject specialist corporate professionals with 7+ years of experience in managing real-time Big Data projects. CIITN implements a blend of academic learning and practical sessions to give the student optimum exposure that aids in the transformation of naïve students into thorough professionals that are easily recruited within the industry.

Best Big Data Training Institute in Noida

CIITN is the best Hadoop training center in Noida with a very high level infrastructure and laboratory facility. The most attractive thing is that candidates can opt multiple Institute

SachinVarshan said...

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
aws training in Chennai

CIIT Noida said...

CIITN is the best SAP training and placement Institute in noida. Contestant will analyze in keeping with modern-day enterprise trends by way of certified and industry experts & SAP training Institute in Noida. They provide a 100% placement help with the best training of IT cousrses.

If you are looking best sap training in Noida then you can join CIITN. One of the premier training and development institute for SAP Training Program in Noida. The company provides 6 weeks/ 6 Months Training for SAP. They provide training in all SAP Modules like SAP HANA,SAP B1, SAP FICO etc. Just come for free demo class and then join SAP and move up in your career .

SAP Training Institute in Noida
sap training in noida
sap institute in noida
sap course in noida
best sap training institute in noida

raj kumar said...

Those guidelines additionally worked to become a good way to
recognize that other people online have the identical fervor like mine
to grasp great deal more around this condition.

white label website builder

Words Doctorate said...

I read this article. I think You put a lot of effort to create this article. I appreciate your work.
Dissertation Writing Services

ciit noida said...

CIITN provides Best Linux training in noida based on current industry standards that helps attendees to secure placements in their dream jobs at MNCs. CIITN Provides Best Linux Training in Noida. CIITN is one of the most credible offering hands on practical knowledge and full job assistance with basic as well as advanced level.

best linux training institute in noida

linux training in noida

Riya karakoti said...

Webtrackker Technology is offering "Best Web Design Training Institutes in Noida" for all students & learners at a cost effective rates. Here all students are joining for best grades and for better results.

Best Web Design Training Institutes in Noida

Salesforce Training institute in noida

Hadoop Training Institute in Noida

Digital Marketing Training Institute in Noida

Riya karakoti said...

Webtrackker is one only IT company who will provide you best class training with real time working on marketing from last 4 to 8 Years Experience Employee. We make you like a strong technically sound employee with our best class training.

Best Web Design Training Institutes in Noida

Salesforce Training institute in noida

Hadoop Training Institute in Noida

Digital Marketing Training Institute in Noida

Digital Marketing Training in Noida

Digital marketing course in noida

Sap Training Institute in Noida

Aws Training Institute in Noida

Java Training Institute in Noida

Inigo joseph said...

I ‘d mention that most of us visitors are endowed to exist in a fabulous place with very many wonderful individuals with very helpful things.
uipath training in bangalore

preethi Shetty said...

I wanna say one simple word yet thanks for the suggestions that you are contributed here.
Best Online Software Training Institute | Advanced Java Training

ajay ak said...

Pretty blog, so many ideas in a single site, thanks for the informative article, keep updating more article.
PHP course in chennai

brunagari said...

really good
jobbörse südwestfalen

sample said...

Nice blog with excellent information. Thank you, keep sharing.

Join in Avinash College Of Commerce for Best career in commerce

Jahan Murugassan said...

Those guidelines additionally worked to become a good way to
recognize that other people online have the identical fervor like mine
to grasp great deal more around this condition.

digital marketing training in chennai

seo training in chennai

avinash said...

Excellent information you made in this blog, very helpful information. Thanks for sharing.

Software Testing | Austere Technology

satheesh sutharapu said...

Great article, really very helpful content you made. Thank you, keep sharing.

chartered accountant | Avinash college of commerce

avinash said...

Nice blog with excellent information. Thank you, keep sharing.

chartered accountant course in Hyderabad | Avinash college of commerce

avinash said...

This is a really great informative blog. Keep Sharing.

Best Degree Colleges Hyderabad | Avinash College of Commerce

Avinash said...

Very good informative blog, keep sharing.

Best junior college in Hyderabad | Avinash College of commerce

Avinash said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Block Chain Services

deepti said...

Excellent post. I have read your blog it's very interesting and informative.Thanks for sharing such nice article, keep on up dating such good articles.
Android Project Center in Chennai | Android Project Center in Velachery

sandy said...

Thank you for sharing this valuable information. But get out of this busy life and find some peace with a beautiful trip book Andaman family tour packages

Gandhi I said...

Thank you for your sharing of unique information always like this.
Digital Marketing Training Institute in Chennai | SEO Training in Chennai

sofianan said...

Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.hr and payroll software in chennai

svr online Training said...

Thanks for sharing such an informative blog. I have read your blog and I gathered some needful information from your post. Keep updating your blog. Awaiting for your next update.
sap ABAP online training in usa

sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN BUDGET PACKAGES @ 4999/-

Ryder Austin said...

Webtracker is one of the best Institute in Noida. In this Institutes we have offered to a student to get more and more information for your subject with both parts like theory and practise.

Contact Us Information

Webtrackker Technology
C - 67, Sector- 63, Noida - 201301 (Delhi-NCR), INDIA

Our Services

Oracle dba training in Noida
Python Training in Noida
Salesforce training in Noida
SAS Training in Noida
IOT Training in Noida


sandy said...

Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Andaman Tourism

Avinash said...

Good information.

B.com Integrated Courses | Avinash College of commerce

sandy said...

Hi Thanks for the nice information its very useful to read your blog. We provide best Find All Isfs Courses