{"id":10411,"date":"2013-03-26T22:00:23","date_gmt":"2013-03-26T20:00:23","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=10411"},"modified":"2013-03-27T07:04:36","modified_gmt":"2013-03-27T05:04:36","slug":"ejb-inheritance-is-different-from-java-inheritance","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html","title":{"rendered":"EJB Inheritance is Different From Java Inheritance"},"content":{"rendered":"<p>Despite the fact that EJB inheritance sometimes uses Java inheritance \u2014 they\u2019re <b>not<\/b> always the same. Just as you could read in <a href=\"http:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html\">my previous post<\/a>, EJB doesn\u2019t have to implement any interface to <b>expose<\/b> a business interface.<br \/>\nThe other way around is also true \u2014 just because EJB is implementing some interface or <b>extending<\/b> other EJB doesn\u2019t mean it <b>exposes<\/b> all or any of its views.<\/p>\n<p>Let\u2019s say we want to have some basic EJB exposing remote business interface. We then want to extend this EJB and override remote business methods.<br \/>\nNothing fancy, right? But let\u2019s take a look at some examples.<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<h4>Remote business interface:<\/h4>\n<pre class=\" brush:java\">public interface RemoteA {\r\n    void remoteA();\r\n}\r\n<\/pre>\n<h4>Base EJB:<\/h4>\n<pre class=\" brush:java\">@Stateless \r\n@Remote(RemoteA.class) \r\npublic class SuperclassEJB implements RemoteA {   \r\n    public void remoteA() {\r\n        \/\/ Some basic code that can be overriden.\r\n    }\r\n}\r\n<\/pre>\n<p>The above <code>SuperclassEJB<\/code> is our base EJB. It exposes one remote business interface with one method. Now let\u2019s move to subclasses of our EJB:<\/p>\n<h2>Case 1 \u2013 Java Inheritance<\/h2>\n<pre class=\" brush:java\">@Stateless \r\npublic class SubclassEJB1 extends SuperclassEJB {\r\n    \/\/ 'remoteA' is not EJB business method. EJB inheritance is strictly for implementation reusing.\r\n}\r\n<\/pre>\n<p><code>SubclassEJB1<\/code> is an EJB \u2013 that\u2019s for sure. But what interfaces does it expose? Because an EJB component must explicitly define what business interfaces it\u2019s defining \u2013 our EJB doesn\u2019t have any real business methods at all! It\u2019s new, fresh no-interface view EJB.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>This means that if in your code you\u2019ll do:<\/p>\n<ul>\n<li><code>@EJB SubclassEJB1 myEJB<\/code> it\u2019ll inject your no-interface view EJB with no business methods in it.<\/li>\n<li><code>@EJB(name='SubclassEJB1') RemoteA myEJB<\/code> it\u2019ll refuse to make this injection because <code>RemoteA<\/code> is not a business interface of our EJB.<\/li>\n<\/ul>\n<p>What\u2019s interesting \u2013 if instead of container injection using <code>@EJB<\/code> you\u2019d do lookup like this:<\/p>\n<pre class=\" brush:java\">RemoteA subclassEJB1 = (RemoteA) initialContext.lookup('java:module\/SubclassEJB1');\r\nsubclassEJB1.remoteA();\r\n<\/pre>\n<p>it won\u2019t throw any exception and invoke the <code>remoteA()<\/code> method correctly. Why? Because what we really looked up was the no-interface view of our EJB. We then casted it to the <code>RemoteA<\/code> (which is correct from plain Java perspective) and invoked a no-interface view method. I think you\u2019ll agreee it can be quite confusing \u2013 instead of using remote interface we\u2019ve ended up with local bean method being correctly invoked.<\/p>\n<h2>Case 2 \u2013 Java Inheritance With Interface Implementation<\/h2>\n<pre class=\" brush:java\">@Stateless \r\npublic class SubclassEJB2 extends SuperclassEJB implements RemoteA {\r\n    \/\/ 'remoteA' is correctly exposed as EJB business method BUT as an implicit local i-face. \r\n    \/\/ Method implementation is correctly inherited.\r\n}\r\n<\/pre>\n<p>Now this looks really weird. Our EJB is extending other EJB and implements remote business interface, right? Well, not exactly. We\u2019re implementing plain Java <code>RemoteA<\/code> interface. This interface itself doesn\u2019t have <code>@Remote<\/code> annotation and neither does <code>SuperclassEJB<\/code>. This means we\u2019re <b>exposing <code>RemoteA<\/code> as a local business interface<\/b>. This is one of the default behaviors of EJBs that was discussed in my <a href=\"http:\/\/piotrnowicki.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface\/\">previous post<\/a>.<\/p>\n<p>This means that if in your code you\u2019ll do:<\/p>\n<ul>\n<li><code>@EJB(name='SubclassEJB2') RemoteA myEJB<\/code> it\u2019ll use local business interface. Quite messed up, don\u2019t you think?<\/li>\n<\/ul>\n<h2>Case 3 \u2013 Java Inheritance With Interface Implementation and View Declaration<\/h2>\n<pre class=\" brush:java\">@Stateless \r\n@Remote(RemoteA.class) \r\npublic class SubclassEJB3 extends SuperclassEJB {\r\n    \/\/ Method 'remoteA' is correctly exposed as EJB business method (thanks to @Remote on EJB). \r\n    \/\/ Method implementation is correctly inherited.\r\n}\r\n<\/pre>\n<p>This is a correct example of EJBs extension. We\u2019ve correctly reused the implementation with Java inheritance, implemented the EJB remote business interface and exposed it using <code>@Remote<\/code>. The <code>implements<\/code> clause is not even required \u2013 the <code>@Remote<\/code> would be enough. However, the <code>@Remote<\/code> part is crucial.<\/p>\n<p>This means that if in your code you\u2019ll do:<\/p>\n<ul>\n<li><code>@EJB(name='SubclassEJB3') RemoteA myEJB<\/code> it\u2019ll properly use remote business interface.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>As you can see EJB inheritance sometimes might not be as easy as expected. It requires you to know the basics of components and views definition. By default component inheritance is plainly for code reusing \u2013 not for component extension. Without this knowledge you might bump into some quite weird and frustrating problems. All of the examples were tested on JBoss AS 7.1.1.<br \/>\n&nbsp;<\/p>\n<p><b><i>Reference: <\/i><\/b><a href=\"http:\/\/piotrnowicki.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance\/\">EJB Inheritance is Different From Java Inheritance<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Piotr Nowicki at the <a href=\"http:\/\/piotrnowicki.com\/blog\/\">Piotr Nowicki&#8217;s Homepage<\/a> blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Despite the fact that EJB inheritance sometimes uses Java inheritance \u2014 they\u2019re not always the same. Just as you could read in my previous post, EJB doesn\u2019t have to implement any interface to expose a business interface. The other way around is also true \u2014 just because EJB is implementing some interface or extending other &hellip;<\/p>\n","protected":false},"author":380,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[90],"class_list":["post-10411","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-ejb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>EJB Inheritance is Different From Java Inheritance<\/title>\n<meta name=\"description\" content=\"Despite the fact that EJB inheritance sometimes uses Java inheritance \u2014 they\u2019re not always the same. Just as you could read in my previous post, EJB\" \/>\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\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EJB Inheritance is Different From Java Inheritance\" \/>\n<meta property=\"og:description\" content=\"Despite the fact that EJB inheritance sometimes uses Java inheritance \u2014 they\u2019re not always the same. Just as you could read in my previous post, EJB\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.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:author\" content=\"http:\/\/www.facebook.com\/piotr.nowicki\" \/>\n<meta property=\"article:published_time\" content=\"2013-03-26T20:00:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-03-27T05:04:36+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=\"Piotr Nowicki\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/p_nowicki\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Piotr Nowicki\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html\"},\"author\":{\"name\":\"Piotr Nowicki\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/3a59f170e0f91da4c90191637f0fa45e\"},\"headline\":\"EJB Inheritance is Different From Java Inheritance\",\"datePublished\":\"2013-03-26T20:00:23+00:00\",\"dateModified\":\"2013-03-27T05:04:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html\"},\"wordCount\":557,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"EJB\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html\",\"name\":\"EJB Inheritance is Different From Java Inheritance\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2013-03-26T20:00:23+00:00\",\"dateModified\":\"2013-03-27T05:04:36+00:00\",\"description\":\"Despite the fact that EJB inheritance sometimes uses Java inheritance \u2014 they\u2019re not always the same. Just as you could read in my previous post, EJB\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.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\\\/2013\\\/03\\\/ejb-inheritance-is-different-from-java-inheritance.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\":\"EJB Inheritance is Different From Java Inheritance\"}]},{\"@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\\\/3a59f170e0f91da4c90191637f0fa45e\",\"name\":\"Piotr Nowicki\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2912400b087180e77e92900db0df9b1330610bec9bbce89f1eb36914193c8479?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2912400b087180e77e92900db0df9b1330610bec9bbce89f1eb36914193c8479?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2912400b087180e77e92900db0df9b1330610bec9bbce89f1eb36914193c8479?s=96&d=mm&r=g\",\"caption\":\"Piotr Nowicki\"},\"description\":\"Piotr is a Java fascinate since his computer science studies (2007). He's currently working as a senior Java EE developer in utilities and industry sector. He's mostly interested in designing and development of web applications using Java EE technology stack.\",\"sameAs\":[\"http:\\\/\\\/piotrnowicki.com\\\/blog\\\/\",\"http:\\\/\\\/www.facebook.com\\\/piotr.nowicki\",\"http:\\\/\\\/www.linkedin.com\\\/pub\\\/piotr-nowicki\\\/52\\\/951\\\/8b5\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/p_nowicki\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/piotr-nowicki\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"EJB Inheritance is Different From Java Inheritance","description":"Despite the fact that EJB inheritance sometimes uses Java inheritance \u2014 they\u2019re not always the same. Just as you could read in my previous post, EJB","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\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html","og_locale":"en_US","og_type":"article","og_title":"EJB Inheritance is Different From Java Inheritance","og_description":"Despite the fact that EJB inheritance sometimes uses Java inheritance \u2014 they\u2019re not always the same. Just as you could read in my previous post, EJB","og_url":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"http:\/\/www.facebook.com\/piotr.nowicki","article_published_time":"2013-03-26T20:00:23+00:00","article_modified_time":"2013-03-27T05:04:36+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":"Piotr Nowicki","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/p_nowicki","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Piotr Nowicki","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html"},"author":{"name":"Piotr Nowicki","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/3a59f170e0f91da4c90191637f0fa45e"},"headline":"EJB Inheritance is Different From Java Inheritance","datePublished":"2013-03-26T20:00:23+00:00","dateModified":"2013-03-27T05:04:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html"},"wordCount":557,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["EJB"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html","url":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html","name":"EJB Inheritance is Different From Java Inheritance","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2013-03-26T20:00:23+00:00","dateModified":"2013-03-27T05:04:36+00:00","description":"Despite the fact that EJB inheritance sometimes uses Java inheritance \u2014 they\u2019re not always the same. Just as you could read in my previous post, EJB","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.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\/2013\/03\/ejb-inheritance-is-different-from-java-inheritance.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":"EJB Inheritance is Different From Java Inheritance"}]},{"@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\/3a59f170e0f91da4c90191637f0fa45e","name":"Piotr Nowicki","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2912400b087180e77e92900db0df9b1330610bec9bbce89f1eb36914193c8479?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2912400b087180e77e92900db0df9b1330610bec9bbce89f1eb36914193c8479?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2912400b087180e77e92900db0df9b1330610bec9bbce89f1eb36914193c8479?s=96&d=mm&r=g","caption":"Piotr Nowicki"},"description":"Piotr is a Java fascinate since his computer science studies (2007). He's currently working as a senior Java EE developer in utilities and industry sector. He's mostly interested in designing and development of web applications using Java EE technology stack.","sameAs":["http:\/\/piotrnowicki.com\/blog\/","http:\/\/www.facebook.com\/piotr.nowicki","http:\/\/www.linkedin.com\/pub\/piotr-nowicki\/52\/951\/8b5","https:\/\/x.com\/https:\/\/twitter.com\/p_nowicki"],"url":"https:\/\/www.javacodegeeks.com\/author\/piotr-nowicki"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/10411","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\/380"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=10411"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/10411\/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=10411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=10411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=10411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}