{"id":1847,"date":"2012-09-10T10:00:00","date_gmt":"2012-09-10T10:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/implementing-entity-services-using-nosql-part-4-java-ee.html"},"modified":"2012-10-22T06:57:15","modified_gmt":"2012-10-22T06:57:15","slug":"implementing-entity-services-using_389","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html","title":{"rendered":"Implementing Entity Services using NoSQL &#8211; Part 4: Java EE"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">Now that I have prepared a skeleton <a href=\"http:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_8619.html\" title=\"Implementing Entity Services using NoSQL \u2013 Part 2: Contract-first\">contract-first web-service<\/a> and created a <a href=\"http:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html\" title=\"Implementing Entity Services using NoSQL \u2013 Part 3: CouchDB\">data access layer using Ektorp and CouchDB<\/a>, it\u2019s time to wire them together into a fully working <a href=\"http:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_10.html\" title=\"Implementing Entity Services using NoSQL \u2013 Part 1: Outline\">entity service<\/a>. To do this I\u2019m going to use Java EE and Glassfish 3.1.<\/p>\n<p>It\u2019s worth noting at this point that it\u2019s not strictly necessary that I use Java EE at all for his kind of R&amp;D work. I don\u2019t need the security or the transaction features that are provided by a JEE server like Glassfish and I could probably use something a little lighter like Tomcat or Jetty. However, I do like the convenience and the features of JEE, and many applications that begin life on an standard Java application server like Tomcat do end up either grafting JEE features into Tomcat (like JAX-WS) or migrating to a full JEE server like Glassfish.         <\/p>\n<p><i>Tomcat\u2019s users do often require JEE features \u2013 this was the main reasoning behind starting up the <a href=\"http:\/\/openejb.apache.org\/apache-tomee.html\" target=\"_blank\">TomEE project<\/a> at Apache. This project adds JEE Web Profile features into the vanilla Tomcat stack so it can handle things like EJB\u2019s and JAX-WS.        <\/i>        <\/p>\n<p><strong>Separating the Business Logic into Beans.<\/strong>        <\/p>\n<p>My application already has 2 distinct layers. The first (from the perspective of the consumer) is the web service layer which is tasked with providing all the web service operations and other service specific tasks like handling the custom SOAP headers and <a href=\"http:\/\/www.soapatterns.org\/messaging_metadata.php\" target=\"_blank\">messaging metadata<\/a> that help with problems like idempotency. The last layer is the <a href=\"http:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html\" title=\"Implementing Entity Services using NoSQL \u2013 Part 3: CouchDB\">database access layer<\/a> which is in charge of communicating with the database and dealing with persistence and retrieval of my Product entities.         <\/p>\n<p>The third and final layer that I\u2019m now adding is the middle tier that bridges the previous two \u2013 the business logic layer. This layer will be responsible for implementing the rules and decisions of the Product Entity Service such as ensuring that any semantically important information is present,  added or validated before a persistence operation is carried out.         <\/p>\n<p>One example of this semantically important information is the Products \u2018state\u2019. In my model, I allow Products to transition through a number of states in order to maintain a strict product lifecycle. The stages are as follows and are roughly linear in nature (each state follows the last)\u2026         <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ul>\n<li>PROVISIONAL<\/li>\n<li>STOCKABLE<\/li>\n<li>SALEABLE<\/li>\n<li>DISCONTINUED<\/li>\n<li>REMOVED<\/li>\n<\/ul>\n<p>In my business logic layer, my Product Manager bean ensures that the state of each entity makes sense for each service operation. For example, if you call the createProduct() operation with a Product, the Product given must have a state of \u2018Provisional\u2019. If it doesn\u2019t, my logic will change it so that it does.         <\/p>\n<p>These kind of rules are unique to each business so it\u2019s not a one size fits all solution. In the real world, a rules engine or something similar would be ideal as it would allow some additional flexibility in the definition and policing of these rules. However, for my basic R&amp;D needs, this hard-coded solution is fine and adequately demonstrates the reason why it\u2019s good to provide a business logic layer \u2013 so that you can <a href=\"http:\/\/en.wikipedia.org\/wiki\/Separation_of_concerns\" target=\"_blank\">separate the business logic \u2018concerns\u2019<\/a> from the message and database handling logic.         <\/p>\n<p><strong>One data model to rule them all.<\/strong>        <\/p>\n<p>There is one thing that all these layers have in common and that\u2019s the data (a.k.a Entity) objects that they manage. Product entities are represented by XML, described by XSD\u2019s and referenced by the WSDL. These definitions are turned into Java objects by JAX-WS and these same Java objects are used natively throughout the code thereby avoiding any <a href=\"http:\/\/www.soapatterns.org\/data_model_transformation.php\" target=\"_blank\">data model transformation<\/a>.         <\/p>\n<p>This technique is know as \u2018transformation avoidance\u2019 is one of the major benefits of this particular style of NoSQL based entity service development technique.         <i>       <\/p>\n<p>Transformation Avoidance is a best practice which improves a service\u2019s reusability and composability &#8211; soapatterns.org.        <\/i>        <\/p>\n<p>In essence, with this service development I\u2019ve managed to use these same Java data objects in every layer and yet maintained a true contract-first development approach. That\u2019s really good news for developers. I\u2019ve also avoided the need for the data model transformation layers that often become necessary when you have incompatible data models between messages and databases (bad news for ESB salespeople).         <\/p>\n<p>Using NoSQL has also allowed me to totally avoid any SQL DDL for tables and data-relations and I don\u2019t need any complex object mappings such as those required to handle traditional ORM. I can even morph my data model over time without stuff breaking quite so regularly (great for service versioning).         <\/p>\n<p><strong>Notes on keeping JEE simple.<\/strong>        <\/p>\n<p>In order to cut down on the deployment and configuration hassle associated with JEE I\u2019ve used the new deployment and packing mechanisms that allow you to locatate EJB\u2019s and web applications within the same application WAR file. This makes using JEE features a breeze and greatly simplifies the Maven build as I only use one project and zero deployment descriptors (even web.xml is missing!).         <\/p>\n<p>JEE with EJB 3.1 couldn\u2019t be simpler as it\u2019s now based on the use of some very simple Java annotations. For example, specifying a Stateless EJB can be as straightforward as adding the <em>@Stateless<\/em> annotation to a class. In doing so, you\u2019re telling the application server to deploy the class into a pool in order to make it highly available and wrap calls to its methods in a transaction. As a stateless bean, it will have no concept of a session and will not maintain any state between calls (ideal for <a href=\"http:\/\/www.soaprinciples.com\/service_statelessness.php\" target=\"_blank\">stateless services<\/a>).         <\/p>\n<pre class=\"brush:java\">@Stateless\r\npublic class ProductsManager<\/pre>\n<p>In order to use this bean from another part of your application (from the <em>@WebService<\/em> class for example), you\u2019d simply add a reference variable of the correct class type, and annotate that variable with the <em>@EJB<\/em> annotation. This tells the application server to \u2018inject\u2019 and instance of the correct type from the pre-populated bean pool at runtime using a mechanism called dependency injection.         <\/p>\n<pre class=\"brush:java\">@WebService(...)\r\npublic class ProductsEntityService implements Products {\r\n  @EJB\r\n  private ProductsManager bean;\r\n  ...<\/pre>\n<p><strong>Other useful JEE features.<\/strong>        <\/p>\n<p>Message driven beans are great for implementing <a href=\"http:\/\/www.soapatterns.org\/event_driven_messaging.php\" target=\"_blank\">event driven messaging<\/a> where persistent and asynchronous communication is required between message producers and consumers. However I probably won\u2019t use them for this particular R&amp;D effort as for my requirements the usecase is too weak to justify the effort (who would I notify about new products?). Besides, the <em>@MessageDriven<\/em> bean annotation has made this capability very easy to use and it\u2019s a well established and highly reliable feature that\u2019s based on <a href=\"http:\/\/en.wikipedia.org\/wiki\/Java_Message_Service\" target=\"_blank\">JMS<\/a>.         <\/p>\n<p>EJB 3.1 also allows for a number of new and useful bean types. Singleton beans are singleton classes that are managed by the server and specified using the <em>@Singleton<\/em> annotation (handy if things like clustered singleton\u2019s are a worry for you). And the <em>@Schedule<\/em> annotation can be used to generate regular events based on a schedule (such as every Friday at Noon) which can be handy for reporting etc.         <\/p>\n<p><strong>Summary<\/strong>        <\/p>\n<p>So I now have a fully working n-tier web-service that is capable of persisting, managing and retrieving Product entities using a NoSQL database. Next time I\u2019ll cover the implementation of some more SOA patterns using these technologies. Subscribe to my blog to get a notification when this happens.         <\/p>\n<p>Continue to <a href=\"http:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using.html\">Part 5<\/a>.<\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/benwilcock.wordpress.com\/2012\/08\/07\/implementing-entity-services-using-nosql-part-4-java-ee\/\">Implementing Entity Services using NoSQL \u2013 Part 4: Java EE<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Ben Wilcock at the <a href=\"http:\/\/benwilcock.wordpress.com\/\">SOA, BPM, Agile &amp; Java<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Now that I have prepared a skeleton contract-first web-service and created a data access layer using Ektorp and CouchDB, it\u2019s time to wire them together into a fully working entity service. To do this I\u2019m going to use Java EE and Glassfish 3.1. It\u2019s worth noting at this point that it\u2019s not strictly necessary that &hellip;<\/p>\n","protected":false},"author":268,"featured_media":57,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[116,113,433],"class_list":["post-1847","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-couchdb","tag-nosql","tag-soa"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Implementing Entity Services using NoSQL - Part 4: Java EE - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Now that I have prepared a skeleton contract-first web-service and created a data access layer using Ektorp and CouchDB, it\u2019s time to wire them together\" \/>\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\/2012\/09\/implementing-entity-services-using_389.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Implementing Entity Services using NoSQL - Part 4: Java EE - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Now that I have prepared a skeleton contract-first web-service and created a data access layer using Ektorp and CouchDB, it\u2019s time to wire them together\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.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=\"2012-09-10T10:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-22T06:57:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"136\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ben Wilcock\" \/>\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=\"Ben Wilcock\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html\"},\"author\":{\"name\":\"Ben Wilcock\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/2d350b077826f7d46a210509a397f080\"},\"headline\":\"Implementing Entity Services using NoSQL &#8211; Part 4: Java EE\",\"datePublished\":\"2012-09-10T10:00:00+00:00\",\"dateModified\":\"2012-10-22T06:57:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html\"},\"wordCount\":1235,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-couchdb-logo.jpg\",\"keywords\":[\"Apache CouchDB\",\"NoSQL\",\"SOA\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html\",\"name\":\"Implementing Entity Services using NoSQL - Part 4: Java EE - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-couchdb-logo.jpg\",\"datePublished\":\"2012-09-10T10:00:00+00:00\",\"dateModified\":\"2012-10-22T06:57:15+00:00\",\"description\":\"Now that I have prepared a skeleton contract-first web-service and created a data access layer using Ektorp and CouchDB, it\u2019s time to wire them together\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-couchdb-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-couchdb-logo.jpg\",\"width\":150,\"height\":136},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_389.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\":\"Implementing Entity Services using NoSQL &#8211; Part 4: Java EE\"}]},{\"@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\\\/2d350b077826f7d46a210509a397f080\",\"name\":\"Ben Wilcock\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g\",\"caption\":\"Ben Wilcock\"},\"sameAs\":[\"http:\\\/\\\/benwilcock.wordpress.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Ben-Wilcock\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Implementing Entity Services using NoSQL - Part 4: Java EE - Java Code Geeks","description":"Now that I have prepared a skeleton contract-first web-service and created a data access layer using Ektorp and CouchDB, it\u2019s time to wire them together","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\/2012\/09\/implementing-entity-services-using_389.html","og_locale":"en_US","og_type":"article","og_title":"Implementing Entity Services using NoSQL - Part 4: Java EE - Java Code Geeks","og_description":"Now that I have prepared a skeleton contract-first web-service and created a data access layer using Ektorp and CouchDB, it\u2019s time to wire them together","og_url":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-09-10T10:00:00+00:00","article_modified_time":"2012-10-22T06:57:15+00:00","og_image":[{"width":150,"height":136,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","type":"image\/jpeg"}],"author":"Ben Wilcock","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ben Wilcock","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html"},"author":{"name":"Ben Wilcock","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/2d350b077826f7d46a210509a397f080"},"headline":"Implementing Entity Services using NoSQL &#8211; Part 4: Java EE","datePublished":"2012-09-10T10:00:00+00:00","dateModified":"2012-10-22T06:57:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html"},"wordCount":1235,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","keywords":["Apache CouchDB","NoSQL","SOA"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html","url":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html","name":"Implementing Entity Services using NoSQL - Part 4: Java EE - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","datePublished":"2012-09-10T10:00:00+00:00","dateModified":"2012-10-22T06:57:15+00:00","description":"Now that I have prepared a skeleton contract-first web-service and created a data access layer using Ektorp and CouchDB, it\u2019s time to wire them together","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","width":150,"height":136},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.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":"Implementing Entity Services using NoSQL &#8211; Part 4: Java EE"}]},{"@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\/2d350b077826f7d46a210509a397f080","name":"Ben Wilcock","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g","caption":"Ben Wilcock"},"sameAs":["http:\/\/benwilcock.wordpress.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Ben-Wilcock"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1847","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\/268"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1847"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1847\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/57"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}