{"id":86569,"date":"2019-01-18T16:11:59","date_gmt":"2019-01-18T14:11:59","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?page_id=86569"},"modified":"2023-03-06T16:32:29","modified_gmt":"2023-03-06T14:32:29","slug":"cdi-tutorials","status":"publish","type":"page","link":"https:\/\/www.javacodegeeks.com\/cdi-tutorials","title":{"rendered":"CDI Tutorials"},"content":{"rendered":"<p><img decoding=\"async\" class=\"aligncenter wp-image-62\" style=\"border: none;\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" alt=\"CDI Tutorials\" width=\"300\" height=\"300\"><\/p>\n<p>In this detailed Resource page, we feature an abundance of <strong>CDI Tutorials<\/strong>!<\/p>\n<p>Contexts and Dependency Injection (<a href=\"https:\/\/docs.oracle.com\/javaee\/6\/tutorial\/doc\/giwhb.html\">CDI<\/a>) for the Java EE platform 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.<\/p>\n<p>CDI is specified by JSR 299, formerly known as Web Beans. Related specifications that CDI uses include the following:<\/p>\n<p>JSR 330, Dependency Injection for Java<\/p>\n<p>The Managed Beans specification, which is an offshoot of the Java EE 6 platform specification (JSR 316)<\/p>\n<div class=\"tip\"><strong>Note<\/strong><br \/>\nIf you wish to build up your CDI knowledge first, check out our&nbsp;<a href=\"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-bean-scopes.html\">Java EE CDI bean scopes<\/a>.<\/div>\n<h2>CDI Tutorials &#8211; Getting Started<\/h2>\n<h3>Simple examples based on CDI for the Java EE platform<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-conversationscoped-example.html\">Java EE CDI ConversationScoped example<\/a><br \/>\nIn this tutorial we shall show you how to create and use a <code>ConversationScoped<\/code> Bean in a web application.<\/li>\n<li><a href=\"https:\/\/www.javacodegeeks.com\/2013\/04\/java-ee-cdi-producer-methods-tutorial.html\">Java EE CDI Producer methods tutorial<\/a><br \/>\nIn this tutorial we will create a simple service with a <code>Producer<\/code> method to produce and inject our two implementations in an application.<\/li>\n<li><a href=\"https:\/\/www.javacodegeeks.com\/2013\/05\/java-ee-cdi-disposer-methods-example.html\">Java EE CDI Disposer methods example<\/a><br \/>\nIn this tutorial we will show you how to make use of a <code>Disposer<\/code> method.<\/li>\n<li><a href=\"https:\/\/www.javacodegeeks.com\/2013\/05\/java-ee-cdi-dependency-injection-inject-tutorial.html\">Java EE CDI Dependency Injection (@Inject) tutorial<\/a><br \/>\nIn this tutorial we shall show you how to achieve Dependency Injection in CDI managed Beans.<\/li>\n<li><a href=\"https:\/\/www.javacodegeeks.com\/2013\/06\/java-ee-cdi-dependency-disambiguation-example.html\">Java EE CDI programmatic dependency disambiguation example<\/a><br \/>\nIn this tutorial we shall show you how to avoid dependency disambiguation in CDI beans.<\/li>\n<li><a href=\"https:\/\/www.javacodegeeks.com\/2013\/06\/java-ee-cdi-programmatic-dependency-disambiguation-example-injection-point-inspection.html\">Java EE CDI programmatic dependency disambiguation example \u2013 Injection Point inspection<\/a><br \/>\nIn this tutorial we shall see how we can avoid programmatic dependency disambiguation when injecting Java EE CDI beans.<\/li>\n<\/ul>\n<p>[undereg]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this detailed Resource page, we feature an abundance of CDI Tutorials! Contexts and Dependency Injection (CDI) for the Java EE platform 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 &hellip;<\/p>\n","protected":false},"author":34987,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-86569","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CDI Tutorials - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn more about Contexts and Dependency Injection (CDI) in Java? Then check out our detailed CDI Tutorials!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/cdi-tutorials\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CDI Tutorials - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn more about Contexts and Dependency Injection (CDI) in Java? Then check out our detailed CDI Tutorials!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/cdi-tutorials\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-06T14:32:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/cdi-tutorials\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/cdi-tutorials\",\"name\":\"CDI Tutorials - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/cdi-tutorials#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/cdi-tutorials#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2019-01-18T14:11:59+00:00\",\"dateModified\":\"2023-03-06T14:32:29+00:00\",\"description\":\"Interested to learn more about Contexts and Dependency Injection (CDI) in Java? Then check out our detailed CDI Tutorials!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/cdi-tutorials#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/cdi-tutorials\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/cdi-tutorials#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/cdi-tutorials#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CDI Tutorials\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CDI Tutorials - Java Code Geeks","description":"Interested to learn more about Contexts and Dependency Injection (CDI) in Java? Then check out our detailed CDI Tutorials!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/cdi-tutorials","og_locale":"en_US","og_type":"article","og_title":"CDI Tutorials - Java Code Geeks","og_description":"Interested to learn more about Contexts and Dependency Injection (CDI) in Java? Then check out our detailed CDI Tutorials!","og_url":"https:\/\/www.javacodegeeks.com\/cdi-tutorials","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_modified_time":"2023-03-06T14:32:29+00:00","og_image":[{"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@javacodegeeks","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/cdi-tutorials","url":"https:\/\/www.javacodegeeks.com\/cdi-tutorials","name":"CDI Tutorials - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/cdi-tutorials#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/cdi-tutorials#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2019-01-18T14:11:59+00:00","dateModified":"2023-03-06T14:32:29+00:00","description":"Interested to learn more about Contexts and Dependency Injection (CDI) in Java? Then check out our detailed CDI Tutorials!","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/cdi-tutorials#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/cdi-tutorials"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/cdi-tutorials#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/cdi-tutorials#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"CDI Tutorials"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/pages\/86569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/34987"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=86569"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/pages\/86569\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=86569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}