{"id":10376,"date":"2013-03-26T13:00:59","date_gmt":"2013-03-26T11:00:59","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=10376"},"modified":"2013-03-26T05:40:27","modified_gmt":"2013-03-26T03:40:27","slug":"defining-ejb-3-1-views-local-remote-no-interface","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html","title":{"rendered":"Defining EJB 3.1 Views (Local, Remote, No-Interface)"},"content":{"rendered":"<p>This post will talk about possible ways of defining EJB views using annotations (I\u2019ll just mention about using EJB Deployment Descriptor at the end.) I\u2019ll focus on the most current EJB 3.1 views omitting legacy local, remote and home interfaces. Therefore, we can choose between:<\/p>\n<ul>\n<li>remote business interface view,<\/li>\n<li>local business interface view,<\/li>\n<li>no-interface view.<\/li>\n<\/ul>\n<p>I won\u2019t discuss functional differences between those views but rather focus on possible ways of defining them.<\/p>\n<h2>Local Business Interface View<\/h2>\n<ol>\n<li>\n<h3>Interface has <code>@Local<\/code> annotation; EJB is implementing this interface.<\/h3>\n<pre class=\" brush:java\">@Local\r\npublic interface LocalA {\r\n    void localA();\r\n}\r\n<\/pre>\n<pre class=\" brush:java\">@Stateless\r\npublic class MeineEJB implements LocalA {\r\n\r\n    @Override\r\n    public void localA() {}\r\n}\r\n<\/pre>\n<h4>Advantages:<\/h4>\n<ul>\n<li>You don\u2019t have to specify interface type in your EJB. You just \u201cJava implement\u201d it and the container do the rest.<\/li>\n<li>Information about interface type is strongly attached to the interface so it <em>might<\/em> be easier to understand for other developers.<\/li>\n<li>Thanks to the Java <code>implements<\/code> clause you can use javac or your IDE to make sure all EJB business methods are implemented.<\/li>\n<\/ul>\n<h4>Disadvantages:<\/h4>\n<ul>\n<li>Your interface now is tightly coupled with EJB technology (importing <code>javax.ejb.*<\/code> package.) You must now provide your API client with required libraries to use it.<\/li>\n<\/ul>\n<\/li>\n<li>\n<h3>Interface is a plain Java interface without annotation; EJB with <code>@Local<\/code> annotation is implementing it.<\/h3>\n<p>EJB must define what interface is supposed to be exposed as local business interface (there is a default for that \u2013 see point no. 3.)<\/p>\n<pre class=\" brush:java\">public interface LocalA {\r\n    void localA();\r\n}\r\n<\/pre>\n<pre class=\" brush:java\">@Stateless\r\n@Local(LocalA.class)\r\npublic class MeineEJB implements LocalA {\r\n\r\n    @Override\r\n    public void localA() {}\r\n}\r\n<\/pre>\n<h4>Advantages:<\/h4>\n<ul>\n<li>Information about interface type is loosely-coupled. You can ship your API to the client and don\u2019t care about EJB semantics. If you\u2019ll hide it with a facade your end-user (even a developer) doesn\u2019t even have to know it\u2019s using EJB technology under the hood.<\/li>\n<li>Thanks to the Java <code>implements<\/code> clause you can use javac or your IDE to make sure all EJB business methods are implemented.<\/li>\n<\/ul>\n<h4>Disadvantages:<\/h4>\n<ul>\n<li>Your EJB must now define all its business interfaces using <code>@Local<\/code> annotation so it\u2019s additional work for you. Not only you implement an interface but you need to remember to declare that your EJB is <em>exposing<\/em> it. There is nothing (from the javac perspective) preventing you from putting an interface into <code>@Local<\/code> annotation that is not actually implemented by your EJB.<\/li>\n<\/ul>\n<\/li>\n<li>\n<h3>Interface is a plain Java interface without annotation; EJB is implementing it.<\/h3>\n<p>Because it\u2019s the only implemented interface of the EJB, a container assumes that it must be a local business interface. If EJB would implement more than one interface \u2013 the container will not be able to recognize which one is your local business interface.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\" brush:java\">public interface LocalA {\r\n    void localA();\r\n}\r\n<\/pre>\n<pre class=\" brush:java\">@Stateless\r\npublic class MeineEJB implements LocalA {\r\n\r\n    @Override\r\n    public void localA() {}\r\n}\r\n<\/pre>\n<h4>Advantages:<\/h4>\n<ul>\n<li>Has all the advantages of the 1st and 2nd approaches discussed above.<\/li>\n<\/ul>\n<h4>Disadvantages:<\/h4>\n<ul>\n<li>It assumes default behavior of the EJB container and developers knowledge about it. It will <b>not<\/b> work if you\u2019re using more than one EJB view. Moreover, it will <b>not<\/b> work even if your EJB is implementing more than one interface (not necessarily an EJB view.)<\/li>\n<\/ul>\n<\/li>\n<li>\n<h3>Interface is a plain Java interface without annotation; EJB with <code>@Local<\/code> annotation is <em>not<\/em> implementing it.<\/h3>\n<p>What\u2019s interesting in this case is that because you\u2019re not using Java <code>implements<\/code> clause you can actually have different signatures for methods in interface and EJB. Any such mismatch will result in an exception thrown by the container. Also note the lack of <code>@Override<\/code> annotation on the business interface method implementation. This is because we\u2019re not implementing any interface in Java terms.<\/p>\n<pre class=\" brush:java\">public interface LocalA {\r\n    void localA();\r\n}\r\n<\/pre>\n<pre class=\" brush:java\">@Stateless\r\n@Local(LocalA.class)\r\npublic class MeineEJB {\r\n    public void localA() {}\r\n}\r\n<\/pre>\n<h4>Advantages:<\/h4>\n<ul>\n<li>Information about interface type is loosely-coupled. You can ship your API to the client and don\u2019t care about EJB semantics. If you\u2019ll hide it with a facade your end-user (even a developer) doesn\u2019t even have to know it\u2019s using EJB technology under the hood.<\/li>\n<\/ul>\n<h4>Disadvantages:<\/h4>\n<ul>\n<li>Has all the disadvantages of the 2nd approach discussed above.<\/li>\n<li>Knowledge that some method you declared as <code>@Local<\/code> interface is not implemented relies heavly on used IDE. Intellij IDEA will mark this as an error but AFAIR Eclipse won\u2019t.<\/li>\n<li>This is, in my opinion, combination of the most important disadvantages and therefore the worst way of defining EJB view.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2>Remote Business Interface View<\/h2>\n<p>Cases 1, 2 and 4 for Local Business Interface Views are also valid for Remote Business Interface Views. Point no. 3 is an exception. The container will never assume anything about remote interfaces. If an EJB is implementing some interface and it\u2019s not defining what kind of interface it is \u2013 it\u2019ll always assume it\u2019s local.<\/p>\n<h2>No-interface View<\/h2>\n<p>I\u2019m sure that after reading the above sections you\u2019re able to figure out pros and cos of using the following two approaches to define no-interface EJB views. Hence, I will not discuss them here.<\/p>\n<ol>\n<li>\n<h3>EJB is annotated as <code>@LocalBean<\/code>.<\/h3>\n<p>This EJB can \u2014 but doesn\u2019t have to \u2014 implement some interfaces (plain Java or business local\/remote interfaces). The <code>@LocalBean<\/code> is valid only for an EJB class.<\/p>\n<pre class=\" brush:java\">@Stateless\r\n@LocalBean\r\npublic class MeineEJB {\r\n    public void localMethod() {}\r\n}\r\n<\/pre>\n<\/li>\n<li>\n<h3>EJB doesn\u2019t have any special annotations.<\/h3>\n<p>The container assumes that if a class is annotated as EJB but is not implementing any interfaces and doesn\u2019t have any views-related annotations \u2013 it will expose a no-interface view.<\/p>\n<pre class=\" brush:java\">@Stateless\r\npublic class MeineEJB {\r\n    public void localMethod() {}\r\n}\r\n<\/pre>\n<\/li>\n<\/ol>\n<h2>EJB Deployment Descriptor (ejb-jar.xml)<\/h2>\n<p>All previous sections were considering EJB views defined using annotations. You can also define EJB views using deployment descriptor (<code>ejb-jar.xml<\/code>). Example:<\/p>\n<pre class=\" brush:java\">public interface LocalA {\r\n    void localA();\r\n}\r\n<\/pre>\n<pre class=\" brush:java\">public interface RemoteA {\r\n    void remoteA();\r\n}\r\n<\/pre>\n<pre class=\" brush:java\">@Stateless\r\npublic class MeineEJB {\r\n    public void localA() {}\r\n    public void remoteA() {}\r\n}\r\n<\/pre>\n<pre class=\" brush:xml\">&lt;ejb-jar xmlns='http:\/\/java.sun.com\/xml\/ns\/javaee' \r\n  xmlns:xsi='http:\/\/www.w3.org\/2001\/XMLSchema-instance' \r\n  xsi:schemaLocation='http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/ejb-jar_3_1.xsd' \r\n  version='3.1'&gt;\r\n    &lt;enterprise-beans&gt;\r\n        &lt;session&gt;\r\n            &lt;ejb-name&gt;MeineEJB&lt;\/ejb-name&gt;\r\n            &lt;business-local&gt;com.piotrnowicki.remotelocalejb.LocalA&lt;\/business-remote&gt;\r\n            &lt;business-remote&gt;com.piotrnowicki.remotelocalejb.RemoteA&lt;\/business-remote&gt;\r\n            &lt;local-bean\/&gt;\r\n        &lt;\/session&gt;\r\n    &lt;\/enterprise-beans&gt;\r\n&lt;\/ejb-jar&gt;\r\n<\/pre>\n<p>The above code and DD defines an EJB exposing three views (local business, remote business and no-interface). This is semantically identical to:<\/p>\n<pre class=\" brush:java\">@Stateless\r\n @Local(LocalA.class)\r\n @Remote(RemoteA.class)\r\n @LocalBean\r\n public class MeineEJB {\r\n     public void localA() {}\r\n     public void remoteA() {}\r\n }\r\n\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><b><i>Reference: <\/i><\/b><a href=\"http:\/\/piotrnowicki.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface\/\">Defining EJB 3.1 Views (Local, Remote, No-Interface)<\/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>This post will talk about possible ways of defining EJB views using annotations (I\u2019ll just mention about using EJB Deployment Descriptor at the end.) I\u2019ll focus on the most current EJB 3.1 views omitting legacy local, remote and home interfaces. Therefore, we can choose between: remote business interface view, local business interface view, no-interface view. &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-10376","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>Defining EJB 3.1 Views (Local, Remote, No-Interface)<\/title>\n<meta name=\"description\" content=\"This post will talk about possible ways of defining EJB views using annotations (I\u2019ll just mention about using EJB Deployment Descriptor at the end.) I\u2019ll\" \/>\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\/defining-ejb-3-1-views-local-remote-no-interface.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Defining EJB 3.1 Views (Local, Remote, No-Interface)\" \/>\n<meta property=\"og:description\" content=\"This post will talk about possible ways of defining EJB views using annotations (I\u2019ll just mention about using EJB Deployment Descriptor at the end.) I\u2019ll\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.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-26T11:00:59+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=\"5 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\\\/defining-ejb-3-1-views-local-remote-no-interface.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.html\"},\"author\":{\"name\":\"Piotr Nowicki\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/3a59f170e0f91da4c90191637f0fa45e\"},\"headline\":\"Defining EJB 3.1 Views (Local, Remote, No-Interface)\",\"datePublished\":\"2013-03-26T11:00:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.html\"},\"wordCount\":883,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.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\\\/defining-ejb-3-1-views-local-remote-no-interface.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.html\",\"name\":\"Defining EJB 3.1 Views (Local, Remote, No-Interface)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2013-03-26T11:00:59+00:00\",\"description\":\"This post will talk about possible ways of defining EJB views using annotations (I\u2019ll just mention about using EJB Deployment Descriptor at the end.) I\u2019ll\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/03\\\/defining-ejb-3-1-views-local-remote-no-interface.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\\\/defining-ejb-3-1-views-local-remote-no-interface.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\":\"Defining EJB 3.1 Views (Local, Remote, No-Interface)\"}]},{\"@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":"Defining EJB 3.1 Views (Local, Remote, No-Interface)","description":"This post will talk about possible ways of defining EJB views using annotations (I\u2019ll just mention about using EJB Deployment Descriptor at the end.) I\u2019ll","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\/defining-ejb-3-1-views-local-remote-no-interface.html","og_locale":"en_US","og_type":"article","og_title":"Defining EJB 3.1 Views (Local, Remote, No-Interface)","og_description":"This post will talk about possible ways of defining EJB views using annotations (I\u2019ll just mention about using EJB Deployment Descriptor at the end.) I\u2019ll","og_url":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.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-26T11:00:59+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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html"},"author":{"name":"Piotr Nowicki","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/3a59f170e0f91da4c90191637f0fa45e"},"headline":"Defining EJB 3.1 Views (Local, Remote, No-Interface)","datePublished":"2013-03-26T11:00:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html"},"wordCount":883,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.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\/defining-ejb-3-1-views-local-remote-no-interface.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html","url":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html","name":"Defining EJB 3.1 Views (Local, Remote, No-Interface)","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2013-03-26T11:00:59+00:00","description":"This post will talk about possible ways of defining EJB views using annotations (I\u2019ll just mention about using EJB Deployment Descriptor at the end.) I\u2019ll","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/03\/defining-ejb-3-1-views-local-remote-no-interface.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\/defining-ejb-3-1-views-local-remote-no-interface.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":"Defining EJB 3.1 Views (Local, Remote, No-Interface)"}]},{"@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\/10376","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=10376"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/10376\/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=10376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=10376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=10376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}