{"id":701,"date":"2011-11-10T11:54:00","date_gmt":"2011-11-10T11:54:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/what-is-cdi-how-does-it-relate-to-ejb-and-spring.html"},"modified":"2012-10-21T20:42:01","modified_gmt":"2012-10-21T20:42:01","slug":"what-is-cdi-how-does-it-relate-to-ejb","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html","title":{"rendered":"What Is CDI, How Does It Relate to @EJB And Spring?"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">A brief overview of dependency injection in Java EE, the difference between @Resource\/@EJB and @Inject, and how does that all relate to Spring \u2013 mostly in the form of links.<\/p>\n<p>Context Dependency Injection (CDI, <a href=\"http:\/\/jcp.org\/en\/jsr\/detail?id=299\">JSR 299<\/a>) is a part of Java EE 6 Web Profile and itself builds on Dependency Injection for Java (<a href=\"http:\/\/jcp.org\/en\/jsr\/detail?id=330\">JSR 330<\/a>), which introduces @Inject, @Named etc. While JSR 330 is for DI only and is implemented e.g. by Guice and Spring, CDI adds various EE stuff such as @RequestScoped, interceptors\/decorators, producers, eventing and a base for integration with JSF, EJBs etc. Java EE components such as EJBs have been redefined to build on top of CDI (=&gt; @Stateless is now a CDI managed bean with additional services).<\/p>\n<p>A key part of CDI aside of its DI capabilities is its awarness of bean contexts and the management of bean lifecycle and dependencies within those contexts (such as @RequestScoped or @ConversationScoped).<\/p>\n<p>CDI is extensible \u2013 you can define new context scopes, drop-in interceptors and decorators, make other beans (e.g. from Spring) available for CDI.<\/p>\n<p>Resources to check:<\/p>\n<ul style=\"text-align: left\">\n<li><a href=\"http:\/\/www.oracle.com\/technetwork\/articles\/java\/cdi-javaee-bien-225152.html\">Contexts and Dependency Injection in Java EE 6<\/a> by Adam Bien &#8211; a very good explanation of the basics of CDI and how it differs from DI in Java EE 5 (hint: context awarness)<\/li>\n<li>Slideshow with a <a href=\"http:\/\/www.slideshare.net\/Bozho\/contexts-and-dependency-injection-for-the-javaee-platform\">good overview of CDI and all it offers<\/a><\/li>\n<li>About <a href=\"http:\/\/www.theserverside.com\/tip\/Dependency-Injection-in-Java-EE-6-Part-6\">CDI extensibility and SPIs<\/a> (e.g. Seam 3 is basically a set of portable CDI extensions)<\/li>\n<li>Guice and Spring do not implement CDI (3\/2011) &#8211; and Spring <a href=\"http:\/\/stackoverflow.com\/questions\/7238407\/will-spring-support-cdi\">perhaps isn&#8217;t motivated to do so<\/a> (it supports JSR 330, CDI would be too much work)<\/li>\n<li><a href=\"http:\/\/refcardz.dzone.com\/refcardz\/contexts-and-depencency\">DZone CDI Refcard<\/a> may be handy<\/li>\n<li><a href=\"http:\/\/niklasschlimm.blogspot.com\/2011\/06\/cdi-10-vs-spring-31-feature-comparsion.html\">CDI 1.0 vs. Spring 3.1 feature comparsion: bean definition &amp; dependency injection<\/a>: &#8220;in the area that I compared in this article [= DI], there is only little critical difference in the two technologies&#8221; (though Spring more fine-tunable)<\/li>\n<li><a href=\"http:\/\/www.adam-bien.com\/roller\/abien\/entry\/java_ee_6_cdi_ejb\">Java EE 6 (CDI \/ EJB 3.1) XOR Spring Core Reloaded<\/a>: New projects should preferably start with pure Java EE including CDI and add Spring utilities such as JDBC\/JMS when needed<\/li>\n<li><a href=\"http:\/\/www.slideshare.net\/arungupta1\/richwebex2010-cdi?src=related_normal&amp;rel=5664163\">Oracle: CDI in the Java EE 6 Ecosystem<\/a> &#8211; 62 pages slideshow, the stuff is explained more than in the previously mentioned slideshow<\/li>\n<\/ul>\n<p>Note: CDI 1.1 (<a href=\"http:\/\/jcp.org\/en\/jsr\/detail?id=346\">JSR 346<\/a>, Java EE 7) should have a standard way of bootstrapping it in non-EE environment (i.e. SE).<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/theholyjava.wordpress.com\/2011\/11\/09\/what-is-cdi-how-does-it-relate-to-ejb-and-spring\/\">What Is CDI, How Does It Relate to @EJB And Spring?<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a>  at the <a href=\"http:\/\/theholyjava.wordpress.com\/\">Holy Java blog<\/a>.<\/p>\n<div style=\"margin: 0px\"><strong><i>Related Articles :<\/i><\/strong><\/div>\n<ul>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/10\/java-ee6-cdi-named-components-and.html\">Java EE6 CDI, Named Components and Qualifiers<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/10\/java-ee6-decorators-decorating-classes.html\">Java EE6 Decorators: Decorating classes at injection time<\/a> <\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/10\/java-modularity-approaches-modules.html\">Java Modularity Approaches &#8211; Modules, modules, modules<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/09\/on-domain-driven-design-anemic-domain.html\">On domain-driven design, anemic domain models, code generation, dependency injection and more\u2026<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/08\/basic-ejb-references-injection-and.html\">Basic EJB References, Injection and Lookup<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/p\/java-tutorials.html\">Java Tutorials and Android Tutorials list<\/a> <\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A brief overview of dependency injection in Java EE, the difference between @Resource\/@EJB and @Inject, and how does that all relate to Spring \u2013 mostly in the form of links. Context Dependency Injection (CDI, JSR 299) is a part of Java EE 6 Web Profile and itself builds on Dependency Injection for Java (JSR 330), &hellip;<\/p>\n","protected":false},"author":3,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[290],"class_list":["post-701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-cdi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What Is CDI, How Does It Relate to @EJB And Spring? - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"A brief overview of dependency injection in Java EE, the difference between @Resource\/@EJB and @Inject, and how does that all relate to Spring \u2013 mostly in\" \/>\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\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What Is CDI, How Does It Relate to @EJB And Spring? - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"A brief overview of dependency injection in Java EE, the difference between @Resource\/@EJB and @Inject, and how does that all relate to Spring \u2013 mostly in\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html\" \/>\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:published_time\" content=\"2011-11-10T11:54:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T20:42:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ilias Tsagklis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ilias Tsagklis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html\"},\"author\":{\"name\":\"Ilias Tsagklis\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9a83496b285d30c61e8a674625c1350e\"},\"headline\":\"What Is CDI, How Does It Relate to @EJB And Spring?\",\"datePublished\":\"2011-11-10T11:54:00+00:00\",\"dateModified\":\"2012-10-21T20:42:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html\"},\"wordCount\":451,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"CDI\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html\",\"name\":\"What Is CDI, How Does It Relate to @EJB And Spring? - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2011-11-10T11:54:00+00:00\",\"dateModified\":\"2012-10-21T20:42:01+00:00\",\"description\":\"A brief overview of dependency injection in Java EE, the difference between @Resource\\\/@EJB and @Inject, and how does that all relate to Spring \u2013 mostly in\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html#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\\\/2011\\\/11\\\/what-is-cdi-how-does-it-relate-to-ejb.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"What Is CDI, How Does It Relate to @EJB And Spring?\"}]},{\"@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\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9a83496b285d30c61e8a674625c1350e\",\"name\":\"Ilias Tsagklis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g\",\"caption\":\"Ilias Tsagklis\"},\"description\":\"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.\",\"sameAs\":[\"http:\\\/\\\/www.iliastsagklis.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/iliastsagklis\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/ilias-tsagklis\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What Is CDI, How Does It Relate to @EJB And Spring? - Java Code Geeks","description":"A brief overview of dependency injection in Java EE, the difference between @Resource\/@EJB and @Inject, and how does that all relate to Spring \u2013 mostly in","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\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html","og_locale":"en_US","og_type":"article","og_title":"What Is CDI, How Does It Relate to @EJB And Spring? - Java Code Geeks","og_description":"A brief overview of dependency injection in Java EE, the difference between @Resource\/@EJB and @Inject, and how does that all relate to Spring \u2013 mostly in","og_url":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2011-11-10T11:54:00+00:00","article_modified_time":"2012-10-21T20:42:01+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Ilias Tsagklis","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ilias Tsagklis","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html"},"author":{"name":"Ilias Tsagklis","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9a83496b285d30c61e8a674625c1350e"},"headline":"What Is CDI, How Does It Relate to @EJB And Spring?","datePublished":"2011-11-10T11:54:00+00:00","dateModified":"2012-10-21T20:42:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html"},"wordCount":451,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["CDI"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html","url":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html","name":"What Is CDI, How Does It Relate to @EJB And Spring? - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2011-11-10T11:54:00+00:00","dateModified":"2012-10-21T20:42:01+00:00","description":"A brief overview of dependency injection in Java EE, the difference between @Resource\/@EJB and @Inject, and how does that all relate to Spring \u2013 mostly in","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html#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\/2011\/11\/what-is-cdi-how-does-it-relate-to-ejb.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"What Is CDI, How Does It Relate to @EJB And Spring?"}]},{"@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"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9a83496b285d30c61e8a674625c1350e","name":"Ilias Tsagklis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/43505f28bb49f6e290c24be0b209ccc1af350f0f6587025ffd4847ef44bf6b78?s=96&d=mm&r=g","caption":"Ilias Tsagklis"},"description":"Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.","sameAs":["http:\/\/www.iliastsagklis.com\/","https:\/\/www.linkedin.com\/in\/iliastsagklis"],"url":"https:\/\/www.javacodegeeks.com\/author\/ilias-tsagklis"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=701"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/701\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}