<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-25636372</atom:id><lastBuildDate>Thu, 04 Jun 2026 15:59:15 +0000</lastBuildDate><category>JavaOne</category><title>Josh&#39;s Dev Blog - Java, Jakarta EE, Jython, Oracle, and More...</title><description>I am an application developer, database administrator, technical writer, and Java evangelist.  Frequent this blog to learn from my experiences in Java, JavaEE, PL/SQL, and Python/Jython development.&#xa;&#xa;Follow my tweets @  http://twitter.com/javajuneau</description><link>https://jj-blogger.blogspot.com/</link><managingEditor>noreply@blogger.com (Josh Juneau)</managingEditor><generator>Blogger</generator><openSearch:totalResults>200</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-4964359203617675026</guid><pubDate>Sun, 17 Sep 2023 04:31:00 +0000</pubDate><atom:updated>2023-09-16T21:31:18.712-07:00</atom:updated><title>Azure JBoss EAP On App Service</title><description>&lt;p&gt;Over the past couple of months I have had the opportunity to check out the Microsoft Azure JBoss EAP On App Service, and I wanted to share my thoughts on this service.&amp;nbsp; If you have not previously heard of it, you can think of it as a cloud application service which enables one to deploy Jakarta EE applications in various formats, and host them on Azure.&amp;nbsp; The Azure App Service contains a plethora of options, from allowing one to deploy a single JAR, to providing the ability to deploy containers, to the ability of deploying single WAR files.&amp;nbsp;&lt;/p&gt;&lt;p&gt;To get started with the service, you can go to the &lt;a href=&quot;https://azure.microsoft.com/en-us/free/search/?ef_id=_k_Cj0KCQjwgNanBhDUARIsAAeIcAtWjCbwCITxqb_AXoYAwiadamWZDV38hYkQdkKXP_jfmmYA3fnnlWYaAmSmEALw_wcB_k_&amp;amp;OCID=AIDcmmfq865whp_SEM__k_Cj0KCQjwgNanBhDUARIsAAeIcAtWjCbwCITxqb_AXoYAwiadamWZDV38hYkQdkKXP_jfmmYA3fnnlWYaAmSmEALw_wcB_k_&amp;amp;gad=1&amp;amp;gclid=Cj0KCQjwgNanBhDUARIsAAeIcAtWjCbwCITxqb_AXoYAwiadamWZDV38hYkQdkKXP_jfmmYA3fnnlWYaAmSmEALw_wcB&quot; target=&quot;_blank&quot;&gt;Azure Portal&lt;/a&gt; and create a free account.&amp;nbsp; There are a number of different services that are available for free to get started and take it for a spin.&amp;nbsp; If you are interested in using the platform for development and production, you will need to subscribe to a paid plan.&amp;nbsp; If you wish to get started on a learning path, then there are some &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/developer/java/ee/jboss-on-azure#jboss-eap-on-azure-app-service&quot;&gt;great articles&lt;/a&gt;&amp;nbsp;available to check out, but here I will show you what I did in order to deploy a simple Jakarta EE application to the cloud using this service.&amp;nbsp; There are also some excellent examples on Github, including the &lt;a href=&quot;https://github.com/m-reza-rahman/jakartaee-azure/tree/master/paas&quot; target=&quot;_blank&quot;&gt;Jakarta EE Azure example&lt;/a&gt; by Reza Rahman.&amp;nbsp; Let&#39;s go quickly through some of my experiences while working through the Jakarta EE Azure example.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The database configuration when following through the Jakarta EE Azure example was very easy.&amp;nbsp; I was able to create a hosted PostgreSQL database on Azure almost instantly.&amp;nbsp; Following along with the example, I also configured the database security to enable access to the Azure services.&amp;nbsp; Without the step-by-step of a tutorial, some of this configuration may have been a bit complex, as Azure offers a large variety of options for configuration of the services.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Next, I created a web application using JBoss EAP.&amp;nbsp; This again provided many options, but many are fairly straight forward if you are familiar with Java web applications.&amp;nbsp; I chose Java 11 as my runtime stack and JBoss EAP 7 as the web server.&amp;nbsp; At this point, I was in a position to install an application in WAR file format to the JBoss EAP server.&lt;/p&gt;&lt;p&gt;Following along with the tutorial, one should install the Azure CLI to their machine in order to deploy a local application.&amp;nbsp; However, I did not want to install anything locally to my machine.&amp;nbsp; So instead of performing the local CLI installation,&amp;nbsp; I used the cloud based CLI that is hosted on Azure.&amp;nbsp; Using this cloud CLI, I was able to clone one of my personal Github repositories, modify it, build, and deploy it to JBoss EAP 7.&amp;nbsp; This was very nice...having the ability to perform a complete build and deployment in the web browser.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A very nice feature is the ability to create resource groups that can be used to group application resources together.&amp;nbsp; This feature allows one to group databases, web applications, and other services together in order to better manage all of the resources that are required for an application.&lt;/p&gt;&lt;p&gt;Overall, Azure JBoss EAP on App Service is a useful tool and is fairly easy to use.&amp;nbsp; The downside is that the hosting can be quite costly if not using a free package, but I believe &lt;a href=&quot;https://x.com/reza_rahman/status/1695464107959337339?s=20&quot;&gt;that may change at some point in the near future&lt;/a&gt;.&amp;nbsp; Unfortunately, I was unable to dig much deeper because I left my services running for a couple of weeks and used up my credits.&amp;nbsp; However, I am happy with my experience in the Microsoft Azure Portal with JBoss EAP 7, and I greatly appreciate the opportunity to look at the service.&amp;nbsp; I look forward to the opportunity to continue my journey with these resources, hopefully free as a developer for testing purposes, in the future.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>https://jj-blogger.blogspot.com/2023/09/azure-jboss-eap-on-app-service.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-1215608596423579898</guid><pubDate>Sun, 10 Sep 2023 16:15:00 +0000</pubDate><atom:updated>2023-09-10T09:15:51.522-07:00</atom:updated><title>Review:  OpenJDK Migration for Dummies</title><description>&lt;p&gt;Have you been thinking of moving away from the Oracle JDK to OpenJDK?&amp;nbsp; The book &quot;OpenJDK Migration for Dummies&quot;, written by Simon Ritter of Azul, provides direction for those who are looking to make the move.&amp;nbsp; In many cases, organizations develop Java applications to work on a specific version of the JDK.&amp;nbsp; Oftentimes, as long as the application continues running without issue, organizations wouild not upgrade the JDK.&amp;nbsp; As we well know, with all software, as time goes on, the JDK which is in use can age and become out-of-date, exposing security vulnerabilities.&amp;nbsp; Moreover, if the JDK in use is aging, then there likely have been many enhancements in more recently released JDKs which could provide performance benefits for the deployed application(s).&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We are at a time where older releases of the JDK such as JDK 8 are no longer being supported by Oracle unless commercial support is being paid.&amp;nbsp; If an organization needs to maintain the use of JDK 8, then it may make sense for the organization to purchase a support agreement.&amp;nbsp; In other cases, the organization may be able to move to another JDK that will work with their application.&amp;nbsp; There are many different options available today.&amp;nbsp; One of those options is OpenJDK, which is freely available for use.&amp;nbsp; There are a number of organizations that have taken OpenJDK and added features or enhancements, and typically offer a paid support for enhanced protection or even for access to premium features.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This book nicely covers the arduous process of learning about the different licensing options when using the Oracle JDK, and what the OpenJDK has to offer.&amp;nbsp; The book makes it easy to understand so that readers to not need to delve into long white papers to read about them.&amp;nbsp; The book also covers the different points that need to be reviewed while preparing to make a migration to OpenJDK, including making an inventory of all JDK versions are in use within your organization.&amp;nbsp; There are several key processes outlined in the book that must not be overlooked while performing a migration, such as looking at each of the &quot;optional&quot; features of the JDK that are in-use within your organization to ensure that they are available in the OpenJDK release of your choice.&amp;nbsp; For instance, JavaFX may not be incorporated within all OpenJDK releases and may be an additional package to incorporate into your migration.&lt;/p&gt;&lt;p&gt;Since the book is written by Simon who works with Azul, he does cover some of the benefits of the Azul Platform Core JDK.&amp;nbsp; There are many to cover, and the book offers a high level overview of some of the most important features.&amp;nbsp; It also covers the question of why commercial support may be something of value to your organization.&amp;nbsp; What if you still need to run JDK 8 in order to make your application work?&amp;nbsp; In such a case, it makes sense to pay for commercial support.&amp;nbsp; How about if your organization is looking to have first hand support?&amp;nbsp; That is another solid reason to purchase commercial support.&amp;nbsp; The list goes on.&lt;/p&gt;&lt;p&gt;The book &quot;OpenJDK Migration for Dummies&quot; is a great read for anyone looking to migrate to the OpenJDK.&amp;nbsp; It is a nice and quick read, landing in at under 80 pages, and it covers the process from start to finish.&lt;/p&gt;</description><link>https://jj-blogger.blogspot.com/2023/09/review-openjdk-migration-for-dummies.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-4628424392861301384</guid><pubDate>Mon, 03 Jul 2023 21:58:00 +0000</pubDate><atom:updated>2023-07-03T14:58:04.645-07:00</atom:updated><title>Cocktails and Code: Margaritas and Jakarta EE</title><description>&lt;p&gt;&lt;span style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;It is summer time, and that means warm weather, swimming pools, and ice cold drinks.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;In this post, I will demonstrate how to develop a simple microservices-based application using Jakarta RESTful Web Services to provide the data for the application.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;Did you know that there is an easy way to get started with Jakarta EE using the Jakarta EE Starter project?&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;In this post, I will demonstrate how to utilize the starter.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;First, we need to mix up a drink to enjoy while we code!&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-size: 14px;&quot;&gt;If you&#39;d prefer to skip the cocktail and code without it, then please skip to the &quot;Time to Code&quot; section below.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px; text-align: left;&quot;&gt;Let&#39;s Mix a Cocktail - Classic Margarita Recipe&lt;/h3&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;While you could go to a store and purchase a pre-mixed margarita, those mixes are rarely as good as a classic margarita made from scratch.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;I prefer my margaritas on-the-rocks (ice cubes), although it is also popular to have a frozen margarita, which is more of an icy concoction similar to a slush.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;Whatever your preference, this classic recipe will work.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;Let&#39;s get mixing!&lt;/p&gt;&lt;p class=&quot;p2&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px; min-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;What you&#39;ll need:&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;2 fluid ounces of blanco tequila (higher quality is better)&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;1 1/2 fluid ounces of triple sec (higher quality is better)&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;1 ounce of lime juice (fresh is best)&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;1 1/2 cup of ice cubes&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Coarse salt&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Lime&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Cocktail Shaker (improvise if you do not have one) or blender for frozen margarita&lt;/p&gt;&lt;p class=&quot;p2&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Margarita glass (any glass will do, but a margarita glass adds to the experience)&lt;/p&gt;&lt;p class=&quot;p2&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px; min-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h4 style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px; text-align: left;&quot;&gt;&lt;b&gt;Details:&lt;/b&gt;&lt;/h4&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;Cut lime into wedges, and then take one wedge and moisten the rim of the glass with the wedge.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;Pour coarse salt onto a plate and dip the moistened rim of the glass into the salt.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;Add a 1/2 cup of ice to the glass.&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;Add 1 cup of ice to shaker.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;Pour the tequila, triple sec, and lime juice into a shaker.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;Shake for 20-25 seconds, until the shaker is frosted on the outside.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;Strain the margarita into the glass and garnish with a slice of lime.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;If you prefer a frozen margarita, skip the shaker and instead add 2 cups of ice to a blender and then pour tequila, triple sec, and lime juice into the blender and blend until smooth.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;If you do not have a cocktail shaker, any closable liquid-tight container may do the trick...so long as you can shake vigorously without the beverage getting all over your code.&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;Enjoy the refreshing goodness of a classic margarita!&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgoCmi7rkNl9K3hC0vAIxxteBWoBqS5P7PF_ewl727gzcVCvX3cczo-CZYTk7s5DmPf5KSx5XA6ZClaz32jRj0pL5Ry_4LxPY9NZBYxU_7Gb5u7NO37DmQXb_KgpC2A7dOD-G72Hs_VGHS3ni5TY2mRD5t4zAlFCSDg61L9yfOZ-J9R7K-k3tE8g/s1114/margaritas.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;806&quot; data-original-width=&quot;1114&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgoCmi7rkNl9K3hC0vAIxxteBWoBqS5P7PF_ewl727gzcVCvX3cczo-CZYTk7s5DmPf5KSx5XA6ZClaz32jRj0pL5Ry_4LxPY9NZBYxU_7Gb5u7NO37DmQXb_KgpC2A7dOD-G72Hs_VGHS3ni5TY2mRD5t4zAlFCSDg61L9yfOZ-J9R7K-k3tE8g/s320/margaritas.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px; text-align: left;&quot;&gt;Time to Code - Jakarta EE Starter&lt;/h2&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;Now that we have a cocktail, it is time to code!&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;In this example, we are going to build a simple web service using Jakarta RESTful Web Services, and deploy to a Payara application server.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;While it is easy to deploy to a Docker or Podman container, in this example I will deploy to a standard application server.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;h4 style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px; text-align: left;&quot;&gt;Creating a Simple Web Service&lt;/h4&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;To get started, head over to &lt;a href=&quot;https://start.jakarta.ee&quot;&gt;&lt;span class=&quot;s1&quot; style=&quot;color: #0a529f;&quot;&gt;Eclipse Starter for Jakarta EE&lt;/span&gt;&lt;/a&gt; and choose your project options from the generator.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;In this example, please choose:&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Jakarta EE Version: Jakarta EE 10&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Jakarta EE Profile: Platform&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Java SE Version: Java SE 17&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Runtime: Payara&lt;/p&gt;&lt;p class=&quot;p3&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 3px 0px 0px 30px; text-indent: -22px;&quot;&gt;–&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Docker Support: Yes (this way you can experiment with Docker if you wish)&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;Once the options are selected, click the &quot;Generate&quot; button, and a ZIP file will be downloaded to your device.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;Once downloaded and unzipped to your machine, open the README file to learn how to start the project and run it.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;At a minimum, you need to do the following:&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;1) Ensure your &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;JAVA_HOME&lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt; environment variable is set to the appropriate JDK for the version you selected at the Jakarta EE Starter.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt;In this case, ensure that your &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;JAVA_HOME &lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt;is pointing to JDK 17.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt;On OS X, the following will set the home accordingly:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;export JAVA_HOME=/Library/Java/JavaVirtualMachines/&amp;lt;java-home&amp;gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;2) Unzip the downloaded project.&amp;nbsp; Traverse into the &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;jakartaee-hello-world&lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt; directory within a command prompt or terminal, and execute the following in order to invoke Maven to download dependencies and run the application/service:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;./mvnw clean package cargo:run&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;3) Once the server has been started, navigate to the following page in a web browser:&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;a href=&quot;http://http://localhost:8080/jakartaee-hello-world/&quot;&gt;&lt;span class=&quot;s1&quot; style=&quot;color: #0a529f;&quot;&gt;http//localhost:8080/jakartaee-hello-world/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;This minimialistic application will simply output a Jakarta EE logo and some text onto the screen.&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;To initiate the RESTful web service, visit the following URL:&lt;/p&gt;&lt;p class=&quot;p4&quot; style=&quot;color: #0a529f; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;a href=&quot;http://http://localhost:8080/jakartaee-hello-world/rest/hello&quot;&gt;http//localhost:8080/jakartaee-hello-world/rest/hello&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;This web service will return the JSON &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&quot;hello&quot;:&quot;world&quot;}&lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt; and it does so by invoking a Jakarta REST web service and returning text to the caller.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt;The RESTful service accepts a parameter identified as “&lt;i&gt;name&lt;/i&gt;”, and if any word is passed to this parameter, then the JSON will be modified to &lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;{&quot;hello”:&amp;lt;name&amp;gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Avenir Next;&quot;&gt;To invoke the web service passing the name “Jane”, open a web browser or use a curl command in a terminal open the following URL:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p5&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 60px; text-indent: -30px;&quot;&gt;http://localhost:8080/jakartaee-hello-world/rest/hello?name=Jane&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;span style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;A REST web service endpoint class named &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;HelloWorldResource&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; is where the magic happens.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;Open the &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;jakartaee-hello-world&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; project within your favorite Integrated Development Environment (IDE) or use a text editor to open the &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;org/eclipse/jakarta/HelloWorldResourc.java&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; file.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;The &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;HelloWorldResource&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; class is annotated with&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;color: #439ebf; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: courier;&quot;&gt;@Path&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; to indicate the URI path for invoking the REST web service.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;There is a single method named &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;hello&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; is contained within the class.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;The&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;color: #439ebf; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: courier;&quot;&gt;@GET&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #439ebf; font-family: &amp;quot;Helvetica Neue&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; annotation is placed on the method to indicate that the method is responding to HTTP GET requests, and the&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;color: #439ebf; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: courier;&quot;&gt;@Produces&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; annotation ensures that the application will produce or return the JSON media type.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;The method accepts a &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;QueryParam&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; identified as &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;, which should be noted as&amp;nbsp; the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;?name&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;&amp;nbsp;portion from the above URL.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;In the body of the method, if the &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; parameter is &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt; or empty, then the word “world” will be assigned to it.&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;The method returns an object identified as &lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: courier;&quot;&gt;Hello&lt;/span&gt;&lt;span style=&quot;color: #1d1d1d; font-family: Avenir Next;&quot;&gt;, which is a plain old Java object (POJO). &lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&amp;nbsp;If you wish to compile and deploy this application to a stand alone server, then you can do that as well!&amp;nbsp; Here is a look at the HelloWorldResource REST service class:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p5&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 60px; text-indent: -30px;&quot;&gt;public class HelloWorldResource {&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;@GET&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;@Produces({ MediaType.APPLICATION_JSON })&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;public Hello hello(@QueryParam(&quot;name&quot;) String name) {&lt;/p&gt;&lt;p class=&quot;p7&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 120px; text-indent: -30px;&quot;&gt;if ((name == null) || name.trim().isEmpty())&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &lt;/span&gt;{&lt;/p&gt;&lt;p class=&quot;p8&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 150px; text-indent: -30px;&quot;&gt;name = &quot;world&quot;;&lt;/p&gt;&lt;p class=&quot;p7&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 120px; text-indent: -30px;&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p7&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 120px; text-indent: -30px;&quot;&gt;return new Hello(name);&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: #1d1d1d; font-family: &amp;quot;Avenir Next&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 14px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 10px 0px 0px;&quot;&gt;Code for the Hello object:&lt;/p&gt;&lt;p class=&quot;p5&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 60px; text-indent: -30px;&quot;&gt;public class Hello {&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;private String name;&lt;/p&gt;&lt;p class=&quot;p9&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; min-height: 14px; text-indent: -30px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;public Hello(String name) {&lt;/p&gt;&lt;p class=&quot;p7&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 120px; text-indent: -30px;&quot;&gt;this.name = name;&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;public String getHello(){&lt;/p&gt;&lt;p class=&quot;p7&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 120px; text-indent: -30px;&quot;&gt;return name;&lt;/p&gt;&lt;p class=&quot;p6&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 90px; text-indent: -30px;&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p5&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 60px; text-indent: -30px;&quot;&gt;}&lt;/p&gt;&lt;p class=&quot;p5&quot; style=&quot;color: #1d1d1d; font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 60px; text-indent: -30px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;color: #1d1d1d; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 12px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal; margin: 0px 0px 0px 60px; text-align: left; text-indent: -30px;&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;There you have it!  Now you should be able to get up and running quickly with the Jakarta EE Starter.  Thanks to the team involved with working on the starter project!&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</description><link>https://jj-blogger.blogspot.com/2023/07/cocktails-and-code-margaritas-and.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgoCmi7rkNl9K3hC0vAIxxteBWoBqS5P7PF_ewl727gzcVCvX3cczo-CZYTk7s5DmPf5KSx5XA6ZClaz32jRj0pL5Ry_4LxPY9NZBYxU_7Gb5u7NO37DmQXb_KgpC2A7dOD-G72Hs_VGHS3ni5TY2mRD5t4zAlFCSDg61L9yfOZ-J9R7K-k3tE8g/s72-c/margaritas.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-4673651159853307773</guid><pubDate>Thu, 22 Sep 2022 15:15:00 +0000</pubDate><atom:updated>2022-09-22T08:16:36.840-07:00</atom:updated><title>JakartaOne Livestream 2022</title><description>&lt;p&gt;&amp;nbsp;The &lt;a href=&quot;https://jakartaone.org/&quot; target=&quot;_blank&quot;&gt;JakartaOne Livestream 2022&lt;/a&gt; will be held virtually on December 6th. &amp;nbsp;The Call for Papers is now open! &amp;nbsp;&lt;/p&gt;&lt;p&gt;Please submit your paper to speak at an event that has been very well attended for the last three years!&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.papercall.io/jakartaone-2022?utm_campaign=JakartaOne%20Livestream%202022&amp;amp;utm_content=221791889&amp;amp;utm_medium=social&amp;amp;utm_source=twitter&amp;amp;hss_channel=tw-1135982437362753536&quot; target=&quot;_blank&quot;&gt;Submit a Talk!&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://pbs.twimg.com/media/FdG3MRLXkAMar-z?format=jpg&amp;amp;name=4096x4096&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;450&quot; data-original-width=&quot;800&quot; height=&quot;450&quot; src=&quot;https://pbs.twimg.com/media/FdG3MRLXkAMar-z?format=jpg&amp;amp;name=4096x4096&quot; width=&quot;548&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>https://jj-blogger.blogspot.com/2022/09/jakartaone-livestream-2022.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-1331507374216177093</guid><pubDate>Sun, 15 Aug 2021 16:37:00 +0000</pubDate><atom:updated>2021-08-15T09:37:03.649-07:00</atom:updated><title>Apache NetBeans 12.5</title><description>&lt;p&gt;Apache NetBeans 12.5 - beta 1 is available for testing.&amp;nbsp; Please download it and give it a try at:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release125/lastSuccessfulBuild/artifact/dist/netbeans/&quot;&gt;https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release125/lastSuccessfulBuild/artifact/dist/netbeans/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;New features in this release are listed at the following link:&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+12.5&quot;&gt;https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+12.5&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>https://jj-blogger.blogspot.com/2021/08/apache-netbeans-125.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-2772247871320793815</guid><pubDate>Sat, 24 Oct 2020 15:06:00 +0000</pubDate><atom:updated>2020-10-24T08:06:52.477-07:00</atom:updated><title>Kicking the Tires of Jakarta EE 9 with Payara</title><description>&lt;p&gt;We&#39;ve been hearing all about it.&amp;nbsp; Jakarta EE 9 will be released in November 2020.&amp;nbsp; The Jakarta EE working group and community have been working hard to bring this release to the masses, and it is about ready.&amp;nbsp; Here&#39;s how to take a look at it today, using one of the most popular application server containers.&lt;/p&gt;&lt;p&gt;1.&amp;nbsp; Download the latest Payara Server Community 5.2020.5 release, which includes &quot;Tech Preview&quot; support for Jakarta EE 9.&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://www.payara.fish/downloads/#community&quot;&gt;https://www.payara.fish/downloads/#community&lt;/a&gt;&lt;/p&gt;&lt;p&gt;2.&amp;nbsp; Create a simple service using Jakarta EE APIs, adding the jakarta.platform:jakartaee.jakarta.jakartaee-api:9.0.0-RC3 dependency.&amp;nbsp;&lt;/p&gt;&lt;p&gt;3.&amp;nbsp; Build and deploy the service to Payara Server Community 5.2020.5.&lt;/p&gt;&lt;p&gt;That&#39;s it.&amp;nbsp; The Payara Server Community edition includes an Eclipse Transformer Configuration Option, which will automatically detect jakarta.* package references during the deployment of the application, and transform the class and resource files from the jakarta.* namespace to javax.*.&amp;nbsp; Take a look at this Payara blog post for more info:&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://blog.payara.fish/eclipse-transformer-configuration&quot;&gt;https://blog.payara.fish/eclipse-transformer-configuration&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Example POM including Payara Server Community Support:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
         xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
    &amp;lt;groupId&amp;gt;com.employeeevent&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;AcmeChat&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;
    &amp;lt;packaging&amp;gt;war&amp;lt;/packaging&amp;gt;
    &amp;lt;name&amp;gt;AcmeChat-1.0-SNAPSHOT&amp;lt;/name&amp;gt;
    
    &amp;lt;properties&amp;gt;
        &amp;lt;maven.compiler.source&amp;gt;1.8&amp;lt;/maven.compiler.source&amp;gt;
        &amp;lt;maven.compiler.target&amp;gt;1.8&amp;lt;/maven.compiler.target&amp;gt;
        &amp;lt;endorsed.dir&amp;gt;${project.build.directory}/endorsed&amp;lt;/endorsed.dir&amp;gt;
        &amp;lt;project.build.sourceEncoding&amp;gt;UTF-8&amp;lt;/project.build.sourceEncoding&amp;gt;
        &amp;lt;failOnMissingWebXml&amp;gt;false&amp;lt;/failOnMissingWebXml&amp;gt;
        &amp;lt;jakartaee&amp;gt;9.0.0-RC3&amp;lt;/jakartaee&amp;gt;
    &amp;lt;/properties&amp;gt;
    
    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;jakarta.platform&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;jakarta.jakartaee-api&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;${jakartaee}&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;
    &amp;lt;/dependencies&amp;gt;
    
    &amp;lt;build&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;3.1&amp;lt;/version&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;source&amp;gt;1.8&amp;lt;/source&amp;gt;
                    &amp;lt;target&amp;gt;1.8&amp;lt;/target&amp;gt;
                    &amp;lt;compilerArguments&amp;gt;
                        &amp;lt;endorseddirs&amp;gt;${endorsed.dir}&amp;lt;/endorseddirs&amp;gt;
                    &amp;lt;/compilerArguments&amp;gt;
                &amp;lt;/configuration&amp;gt;
            &amp;lt;/plugin&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;maven-war-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;2.3&amp;lt;/version&amp;gt;
                &amp;lt;configuration&amp;gt;
                    &amp;lt;failOnMissingWebXml&amp;gt;false&amp;lt;/failOnMissingWebXml&amp;gt;
                &amp;lt;/configuration&amp;gt;
            &amp;lt;/plugin&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;maven-dependency-plugin&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;2.6&amp;lt;/version&amp;gt;
                &amp;lt;executions&amp;gt;
                    &amp;lt;execution&amp;gt;
                        &amp;lt;phase&amp;gt;validate&amp;lt;/phase&amp;gt;
                        &amp;lt;goals&amp;gt;
                            &amp;lt;goal&amp;gt;copy&amp;lt;/goal&amp;gt;
                        &amp;lt;/goals&amp;gt;
                        &amp;lt;configuration&amp;gt;
                            &amp;lt;outputDirectory&amp;gt;${endorsed.dir}&amp;lt;/outputDirectory&amp;gt;
                            &amp;lt;silent&amp;gt;true&amp;lt;/silent&amp;gt;
                            &amp;lt;artifactItems&amp;gt;
                                &amp;lt;artifactItem&amp;gt;
                                    &amp;lt;groupId&amp;gt;jakarta.platform&amp;lt;/groupId&amp;gt;
                                    &amp;lt;artifactId&amp;gt;jakarta.jakartaee-api&amp;lt;/artifactId&amp;gt;
                                    &amp;lt;version&amp;gt;${jakartaee}&amp;lt;/version&amp;gt;
                                    &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;
                                &amp;lt;/artifactItem&amp;gt;
                            &amp;lt;/artifactItems&amp;gt;
                        &amp;lt;/configuration&amp;gt;
                    &amp;lt;/execution&amp;gt;
                &amp;lt;/executions&amp;gt;
            &amp;lt;/plugin&amp;gt;
        &amp;lt;/plugins&amp;gt;
    &amp;lt;/build&amp;gt;
&amp;lt;/project&amp;gt;

&lt;/pre&gt;</description><link>https://jj-blogger.blogspot.com/2020/10/kicking-tires-of-jakarta-ee-9-with.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-7521245366027905053</guid><pubDate>Wed, 09 Sep 2020 03:44:00 +0000</pubDate><atom:updated>2020-09-23T04:52:00.445-07:00</atom:updated><title>Developing a Simple Service with Spring Boot</title><description>&lt;p&gt;In this post, I will demonstrate how to create a simple web service using Spring Boot.&amp;nbsp; This framework makes it almost effortless to develop web services, so long as the appropriate dependencies are in-place.&amp;nbsp; In this example, I will create a web service that will read the current temperature from a file and make it available to clients via a RESTful endpoint.
&lt;/p&gt;
&lt;p&gt;
  The Spring Initializr helps one to choose the dependencies that are required for production a particular solution.&amp;nbsp; The Initializr can be found at:&amp;nbsp;&lt;a href=&quot;https://start.spring.io/&quot;&gt;https://start.spring.io/&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The first thing to note when creating a project using the Initializr is that one can develop Spring Boot applications using a number of different JVM languages, including Java, Kotlin, or Groovy.&amp;nbsp; This is one area where Spring Boot differs from Jakarta EE, which is primarily focused on the Java language.&amp;nbsp; One also has the option to choose either Gradle or Maven for their Spring Boot project.&amp;nbsp; Perhaps one of the most tedious parts of using the Initialzr to create a project is choosing the appropriate dependencies for the project.&amp;nbsp; The reason being that there are so many dependency options, it can take a while to learn which are the most useful for a particular solution.&amp;nbsp; This is not a bad thing...it is just something that needs to be learned over time.&lt;/p&gt;&lt;p&gt;To get started, choose the following options within the Initializr:&lt;/p&gt;&lt;p&gt;Project: Maven&lt;/p&gt;&lt;p&gt;Language: Java&lt;/p&gt;&lt;p&gt;Spring Boot: 2.3.3&lt;/p&gt;&lt;p&gt;Dependencies:&amp;nbsp; Spring Web&lt;/p&gt;&lt;p&gt;Project Metadata&lt;/p&gt;&lt;p&gt;- Group:&amp;nbsp; org.demo&lt;/p&gt;&lt;p&gt;- Artifact: poolservice&lt;/p&gt;&lt;p&gt;- Name: poolservice&lt;/p&gt;&lt;p&gt;- Package Name:&amp;nbsp; org.demo.poolservice&lt;/p&gt;&lt;p&gt;- Packaging:&amp;nbsp; WAR&lt;/p&gt;&lt;p&gt;- Java:&amp;nbsp; 11&lt;/p&gt;&lt;p&gt;Once these options are chosen, click &quot;Generate&quot; to download the project files.&amp;nbsp; Once downloaded, open the project in your favorite IDE.&amp;nbsp; In this case, I will be using Apache NetBeans 12.&amp;nbsp; The project can now be built and deployed to a container, such as Payara server.&amp;nbsp; The project comes configured and ready to begin adding RESTful services.&amp;nbsp; The following code shows the generated &lt;span style=&quot;font-family: courier;&quot;&gt;PoolserviceApplication&lt;/span&gt; class, which was created by the Initializr, contains the &lt;span style=&quot;font-family: courier;&quot;&gt;@SpringBootApplication&lt;/span&gt; annotation.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;package org.demo.poolservice;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class PoolserviceApplication {

	public static void main(String[] args) {
		SpringApplication.run(PoolserviceApplication.class, args);
	}

}
&lt;/pre&gt;
&lt;p&gt;The &lt;span style=&quot;font-family: courier;&quot;&gt;@SpringBootApplication&lt;/span&gt; annotation is a shortcut annotation that combines the default functionality of the following three annotations:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;@EnableAutoConfiguration&lt;/span&gt;: enables Spring Boot auto-configuration&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;@ComponentScan&lt;/span&gt;: enables component scanning on the package where application is loaded&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;@Configuration&lt;/span&gt;: allows registration of extra beans in the context or the ability to import additional configuration classes&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Since the application is configured by default, generate a new RESTful service by creating a class named &lt;span style=&quot;font-family: courier;&quot;&gt;HelloController&lt;/span&gt; in the same package and placing the following code into it:&lt;/p&gt;
&lt;pre&gt;package org.demo.poolservice;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;

@RestController
public class HelloController {

	@RequestMapping(&quot;/&quot;)
	public String index() {
		return &quot;Greetings from Spring Boot This is the main service!&quot;;
	}

}&lt;/pre&gt;
&lt;p&gt;The &lt;span style=&quot;font-family: courier;&quot;&gt;@RestController&lt;/span&gt; annotation wires the class up as a RESTful web service controller by combining the traditional &lt;span style=&quot;font-family: courier;&quot;&gt;@Controller&lt;/span&gt; and &lt;span style=&quot;font-family: courier;&quot;&gt;@ResponseBody&lt;/span&gt; annotation functionality.  In this example, I am using the request root to serve the response, as the &lt;span style=&quot;font-family: courier;&quot;&gt;@RequestMapping&lt;/span&gt; annotation indicates.  Once this controller class has been added and the code has been compiled and redeployed, the URL http://localhost:8080/poolservice can be visited to display the message: &quot;Greetings from Spring Boot This is the main service!&quot;.
&lt;/p&gt;
&lt;p&gt;
  It is time to add the functionality for reading the current temperature from a text file (written by a Raspberry Pi) by creating a new class named &lt;span style=&quot;font-family: courier;&quot;&gt;TemperatureReader&lt;/span&gt;.  This class can be made a contextual bean by annotating it with &lt;span style=&quot;font-family: courier;&quot;&gt;@Component&lt;/span&gt; and specifying a name by which the bean will be referenced.&amp;nbsp; In this case, &quot;temperatureReader&quot;.&amp;nbsp; The functionality of the class is very simple, as it reads temperatures from a file that are in the format: (23.5, 78.3), and makes them accessible via &lt;i&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;currentTemperatureC&lt;/span&gt;&lt;/i&gt; and &lt;i&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;currentTemperatureF&lt;/span&gt;&lt;/i&gt;, respectively.
&lt;/p&gt;
&lt;pre&gt;package org.demo.poolservice;

import java.io.BufferedReader;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import org.springframework.stereotype.Component;


@Component(&quot;temperatureReader&quot;)
public class TemperatureReader {
    
    private String currentTemperatureF;
    
    private String currentTemperatureC;
    
    protected String readTemperatureFile() {
        
        
        String temperatureFile = &quot;/&amp;lt;&lt;path-to&gt;&amp;gt;/temperature.txt&quot;;
        System.out.println(&quot;Temperature File: &quot; + temperatureFile);
        java.nio.file.Path path = Paths.get(temperatureFile);
        String currentTemperature = null;
        try (BufferedReader reader = Files.newBufferedReader(path, Charset.forName(&quot;UTF-8&quot;))) {

            String currentLine = null;
            while ((currentLine = reader.readLine()) != null) {//while there is content on the current line
                currentTemperature = currentLine;
            }
        } catch (IOException ex) {
            ex.printStackTrace(); //handle an exception here
        }
        return currentTemperature;
    }

    /**
     * @return the currentTemperatureF
     */
    public String getCurrentTemperatureF() {
        String temp = readTemperatureFile();
        currentTemperatureF = temp.substring(temp.indexOf(&quot;,&quot;) + 1, temp.lastIndexOf(&quot;)&quot;));
        return currentTemperatureF;
    }

    /**
     * @param currentTemperatureF the currentTemperatureF to set
     */
    public void setCurrentTemperatureF(String currentTemperatureF) {
        this.currentTemperatureF = currentTemperatureF;
    }

    /**
     * @return the currentTemperatureC
     */
    public String getCurrentTemperatureC() {
        String temp = readTemperatureFile();
        currentTemperatureC = temp.substring(temp.indexOf(&quot;(&quot;) + 1, temp.lastIndexOf(&quot;,&quot;));
        return currentTemperatureC;
    }

    /**
     * @param currentTemperatureC the currentTemperatureC to set
     */
    public void setCurrentTemperatureC(String currentTemperatureC) {
        this.currentTemperatureC = currentTemperatureC;
    }
    
}
&lt;/path-to&gt;&lt;/pre&gt;
&lt;p&gt;
  Finally, to make the temperature readings available via a RESTFul service, create a controller named &lt;span style=&quot;font-family: courier;&quot;&gt;TemperatureController&lt;/span&gt; and annotate it with &lt;span style=&quot;font-family: courier;&quot;&gt;@RestController&lt;/span&gt;.  Inject the &lt;span style=&quot;font-family: courier;&quot;&gt;TemperatureReader&lt;/span&gt; by annotating a private &lt;span style=&quot;font-family: courier;&quot;&gt;TemperatureReader&lt;/span&gt; field with &lt;span style=&quot;font-family: courier;&quot;&gt;@Autowired&lt;/span&gt;.  The bean can then be used to obtain the temperature via the use of the &lt;span style=&quot;font-family: courier;&quot;&gt;TemperatureReader&lt;/span&gt; field.  The URL mapping for the service is supplied via the &lt;span style=&quot;font-family: courier;&quot;&gt;@RequestMapping(&quot;/temperature&quot;)&lt;/span&gt; annotation on the &lt;span style=&quot;font-family: courier;&quot;&gt;index()&lt;/span&gt; method, which will be used to serve up the temperature at the respective request mapping.  The functionality contained within the &lt;span style=&quot;font-family: courier;&quot;&gt;index() &lt;/span&gt;method is very minimal, as it merely calls upon the &lt;span style=&quot;font-family: courier;&quot;&gt;temperatureReader.getCurrentTemperatureF()&lt;/span&gt; method to return the current temperature in Fahrenheit.
&lt;/p&gt;
&lt;pre&gt;package org.demo.poolservice;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class TemperatureController {
    
    @Autowired
    private TemperatureReader temperatureReader;
    
    @RequestMapping(&quot;/temperature&quot;)
	public String index() {
            return temperatureReader.getCurrentTemperatureF();
	}
    
}
&lt;/pre&gt;
To see the temperature, visit the URL:  http://localhost:8080/poolservice/temperature
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;See the sources at:&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://github.com/juneau001/poolServiceSpringBoot&quot;&gt;https://github.com/juneau001/poolServiceSpringBoot&lt;/a&gt;&lt;/div&gt;</description><link>https://jj-blogger.blogspot.com/2020/09/developing-simple-service-with-spring.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-3943026573203760844</guid><pubDate>Sun, 23 Aug 2020 16:15:00 +0000</pubDate><atom:updated>2020-09-08T20:46:11.758-07:00</atom:updated><title>Developing Web &amp; Enterprise Applications for the JVM - &quot;This and That&quot;</title><description>&lt;p&gt;I am starting a new series of blog posts which will cover the ins and outs, tips and tricks of developing web and enterprise applications with Java.&amp;nbsp; Some people refer to enterprise meaning that an application requires interaction with a database and/or communication with other applications and services. &amp;nbsp;Therefore, this blog series will apply to &quot;Web&quot; or &quot;Enterprise&quot; application development for the Java Virtual Machine (JVM) using a number of different technologies.&lt;/p&gt;&lt;div&gt;&lt;div&gt;In this blog series, I will not focus on any single strategy or API, but rather, I will cover a number of technical strategies and options that can be used for developing applications for deployment on the JVM. &amp;nbsp;The main goal is to provide readers with a broad overview of the ecosystem available for the JVM, ensuring that one knows various paths that can be followed to develop sophisticated applications. &amp;nbsp;I also hope to keep each post short and to the point, to allow one more time to develop and experiment, rather than reading my ramblings. &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is no doubt that the JVM is one of the key technologies of our time, as it is installed on millions of devices worldwide, and tens of thousands of applications have been written for the JVM. &amp;nbsp;Even though it is one of the most popular platforms for application development, there tends to be questioning on which path to take when developing certain applications. &amp;nbsp;I like to think of the myriad of options as &quot;tools&quot; that are in the toolshed. &amp;nbsp;We can utilize a Phillips screwdriver to tighten an Allen wrench screw, but it certainly may not be the optimal choice and there are more suitable options available. &amp;nbsp;Much in the same manner, one may use Jakarta EE to develop a microservice just because he or she may know that tech, but there may be better options out there for the particular solution at hand.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hopefully this blog series will provide you with a better understanding of which tool to choose for your future projects. &amp;nbsp;Just because you know one technology very well, it does not mean that you cannot pick up another technology easily enough and make your toolshed even more substantial for future endeavors. &amp;nbsp;One should continually learn new technologies so that they are not locked into using a single strategy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To that end...I will start this series by showing how to develop a very simple web service which will be used to provide a temperature reading. &amp;nbsp;The web service end point can be harnessed by clients to obtain the current temperature by reading a file that has been written by a temperature sensor connected to a raspberry pi. &amp;nbsp;In the first post, I will utilize Jakarta EE 8 to build this service.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;Note:&amp;nbsp; As you read on in this series, you will see that version numbers of APIs mean the world. &amp;nbsp;As with any technology, web and enterprise development are ever-changing, and so moving from one version to the next usually means that there may be a number of changes in the way a service or application needs to be developed. &amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The following index will be updated to include posts as they are written for inclusion in this series.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://jj-blogger.blogspot.com/2020/08/developing-simple-web-service-with.html&quot; target=&quot;_blank&quot;&gt;Developing a Simple Web Service with Jakarta EE 8&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://jj-blogger.blogspot.com/2020/09/developing-simple-service-with-spring.html&quot;&gt;Developing a Simple Service with Spring Boot&lt;/a&gt;&lt;/div&gt;</description><link>https://jj-blogger.blogspot.com/2020/08/developing-web-enterprise-applications.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-6761112295326911472</guid><pubDate>Sun, 23 Aug 2020 16:05:00 +0000</pubDate><atom:updated>2020-08-23T09:05:38.336-07:00</atom:updated><title>Developing a Simple Web Service with Jakarta EE 8</title><description>&lt;p style=&quot;text-align: left;&quot;&gt;For context, Jakarta EE 8 is very much the same as Java EE 6 through Java EE 8. &amp;nbsp;The main differences between Java EE 6 and Jakarta EE 8 are the inclusion of newer specifications and updated technologies that had been added over the years. &amp;nbsp;Moreover, Jakarta EE 8 is an open source platform, whereas Java EE was not open source. &amp;nbsp;When Oracle open sourced Java EE to the Eclipse Foundation, it became known as Jakarta EE.&lt;/p&gt;&lt;div&gt;&lt;div&gt;This example application (web service) will create a WAR file which can be deployed to any Jakarta EE 8-compliant application server container. &amp;nbsp;This includes micro-containers such as Payara Micro or WildFly. &amp;nbsp;To begin, create a Maven based WAR file project in your favorite Integrated Development Environment (IDE). &amp;nbsp;The most prevalent IDE&#39;s for developing Jakarta EE 8 applications include Eclipse, IntelliJ, or Apache NetBeans. &amp;nbsp;Another option is to download the &lt;a href=&quot;https://eclipse-ee4j.github.io/starter/&quot; target=&quot;_blank&quot;&gt;Jakarta EE starter&lt;/a&gt; project.&amp;nbsp; In this post, I start with the Jakarta EE starter project and then I will open and develop within Apache NetBeans 12.&amp;nbsp; I will deploy to Payara Micro.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To get started, grab a copy of the Jakarta EE starter project &lt;a href=&quot;https://eclipse-ee4j.github.io/starter/samples/simple-hello.zip&quot;&gt;simple-hello&lt;/a&gt;&amp;nbsp;and copy it into a working directory on your machine.&amp;nbsp; Open the project in your IDE and rename it to PoolService-1.0-SNAPSHOT, as seen in Figure 1.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhvF-io6ALR5bEnLyBxDFeFY55oVaQSZ703ftJnbzn_1rUpjdUXnUFZ_5VzfAp3MDxomj3lkyc1kxe88WDdAMhzKqgVrAXyOi2dOqJHje8MyqNmJCtsm_gMBfyCcm7gT7pc4s5Kg/s2048/PoolService_JakartaEE1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1323&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhvF-io6ALR5bEnLyBxDFeFY55oVaQSZ703ftJnbzn_1rUpjdUXnUFZ_5VzfAp3MDxomj3lkyc1kxe88WDdAMhzKqgVrAXyOi2dOqJHje8MyqNmJCtsm_gMBfyCcm7gT7pc4s5Kg/s640/PoolService_JakartaEE1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Figure 1:&amp;nbsp; Rename Project&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Modify the class named org.demo.simple.ApplicationConfig, by adding a path. Once finished, it should look as follows:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;package com.demo.simple;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

/**
 * Configures the Jakarta REST application.
 * 
 * @author Ivar Grimstad (ivar.grimstad@eclipse-foundation.org)
 */
@ApplicationPath(&quot;resources&quot;)
public class ApplicationConfig extends Application {
    
}
&lt;/pre&gt;This will create a root path for your Jakarta RESTful web services at the path &quot;resources&quot;, meaning that in order to access any JAX-RS resources, preface the service name with this path.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next, develop a controller class that can be utilized for reading the temperature file when invoked.&amp;nbsp; Create a new Java class named &lt;span style=&quot;font-family: courier;&quot;&gt;org.demo.simple.TemperatureController,&lt;/span&gt; which is responsible for reading the file and setting values within variables.&amp;nbsp; The temperature will be in the format&amp;nbsp;(23.5, 74.3) with the first reading being in Celsius, and the second reading being in Fahrenheit.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;package com.demo.simple;

import java.io.BufferedReader;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

/**
 *
 * @author juneau
 */
@Named
@RequestScoped
public class TemperatureController {
    
    private String currentTemperatureF;
    
    private String currentTemperatureC;
    
    public TemperatureController(){
        
    }
    
    protected String readTemperatureFile() {
        
        String temperatureFile = &quot;&amp;lt;&amp;lt;path-to-file&amp;gt;&amp;gt;/temperature.txt&quot;;
        java.nio.file.Path path = Paths.get(temperatureFile);
        String currentTemperature = null;
        try (BufferedReader reader = Files.newBufferedReader(path, Charset.forName(&quot;UTF-8&quot;))) {

            String currentLine = null;
            while ((currentLine = reader.readLine()) != null) {//while there is content on the current line
                currentTemperature = currentLine;
            }
        } catch (IOException ex) {
            ex.printStackTrace(); //handle an exception here
        }
        return currentTemperature;
    }

    /**
     * @return the currentTemperatureF
     */
    public String getCurrentTemperatureF() {
        String temp = readTemperatureFile();
        currentTemperatureF = temp.substring(temp.indexOf(&quot;,&quot;) + 1, temp.lastIndexOf(&quot;)&quot;));
        return currentTemperatureF;
    }

    /**
     * @param currentTemperatureF the currentTemperatureF to set
     */
    public void setCurrentTemperatureF(String currentTemperatureF) {
        this.currentTemperatureF = currentTemperatureF;
    }

    /**
     * @return the currentTemperatureC
     */
    public String getCurrentTemperatureC() {
        String temp = readTemperatureFile();
        currentTemperatureC = temp.substring(temp.indexOf(&quot;(&quot;) + 1, temp.lastIndexOf(&quot;,&quot;));
        return currentTemperatureC;
    }

    /**
     * @param currentTemperatureC the currentTemperatureC to set
     */
    public void setCurrentTemperatureC(String currentTemperatureC) {
        this.currentTemperatureC = currentTemperatureC;
    }
    
}&lt;/pre&gt;&lt;br /&gt;
An interested service can now inject &lt;span style=&quot;font-family: courier;&quot;&gt;TemperatureController&lt;/span&gt; using Contexts and Dependency Injection (CDI), and call upon &lt;span style=&quot;font-family: courier;&quot;&gt;getCurrentTemperatureF() &lt;/span&gt;or &lt;span style=&quot;font-family: courier;&quot;&gt;getCurrentTemperatureC()&lt;/span&gt; in order to obtain the requested temperature format.&amp;nbsp; As such, lastly create a Jakarta Restful Web Services file named &lt;span style=&quot;font-family: courier;&quot;&gt;TemperatureResource&lt;/span&gt;, and enter the following code:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;package com.demo.simple;

import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PUT;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.ws.rs.core.MediaType;

/**
 * JAX-RS Web Service
 *
 * @author juneau
 */
@Path(&quot;temperature&quot;)
@RequestScoped
public class TemperatureResource {
    
    @Inject
    private TemperatureController temperatureController;

    /**
     * Creates a new instance of TemperatureResource
     */
    public TemperatureResource() {
    }

    /**
     * Calls upon the TemperatureController and obtains the current temperature
     * in Fahrenheit.
     *
     * @return an instance of java.lang.String
     */
    @GET
    @Produces({MediaType.TEXT_PLAIN})
    public String getXml() {
        String currentTemperature = temperatureController.getCurrentTemperatureF();
        return currentTemperature;
    }

    /**
     * PUT method for updating or creating an instance of TemperatureResource
     *
     * @param content representation for the resource
     */
    @PUT
    @Consumes(MediaType.APPLICATION_XML)
    public void putXml(String content) {
    }
    
    /**
     * Calls upon the TemperatureController and retrieves the current temperature
     * in Fahrenheit.  Same as getXml();
     * @return 
     */
    @GET
    @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON})
    @Path(&quot;f&quot;)
    public String getF() {
        String currentTemperature = temperatureController.getCurrentTemperatureF();
        return currentTemperature;
    }

    /**
     * Calls upon the TemperatureController and retrieves the current temperature
     * in Celsius.
     * @return 
     */
    @GET
    @Produces({MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON})
    @Path(&quot;c&quot;)
    public String getC() {
        String currentTemperature = temperatureController.getCurrentTemperatureC();
        return currentTemperature;
    }
    
}

&lt;/pre&gt;
This is a web service that will be made available at the URI &lt;span style=&quot;font-family: courier;&quot;&gt;/resources/temperature&lt;/span&gt;, so when the URL &lt;span style=&quot;font-family: courier;&quot;&gt;http://localhost:8080/poolService/resources/temperature&lt;/span&gt; is entered, then the temperature in Fahrenheit should be displayed.  This happens because the method named &lt;span style=&quot;font-family: courier;&quot;&gt;getXml()&lt;/span&gt; is called by default since it is annotated with &lt;span style=&quot;font-family: courier;&quot;&gt;@GET&lt;/span&gt; and does not contain a path.  It will return plain text since it is annotated with &lt;span style=&quot;font-family: courier;&quot;&gt;@Produces({MediaType.TEXT_PLAIN})&lt;/span&gt;.  If I wish to change the default format to something else, say XML, then I could modify the &lt;span style=&quot;font-family: courier;&quot;&gt;@Produces&lt;/span&gt;&amp;nbsp;annotation to:  &lt;span style=&quot;font-family: courier;&quot;&gt;@Produces({MediaType.APPLICATION_JSON})&lt;/span&gt;.&amp;nbsp; The getXml() method invokes the &lt;span style=&quot;font-family: courier;&quot;&gt;TemperatureController getCurrentTemperatureF() &lt;/span&gt;method to read the temperature and return the result.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use your favorite IDE or the command line to compile and build the project to create a WAR (Web Archive) file named simple-hello.war.&lt;br /&gt;&amp;nbsp;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Deployment&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am going to use a micro container to deploy the application.&amp;nbsp; However, it could also be deployed into any other Jakarta EE compatible container such as GlassFish, Payara, or Open Liberty.&amp;nbsp; See the following link for compatible implementations:&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://jakarta.ee/compatibility/&quot;&gt;https://jakarta.ee/compatibility/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this case, download Payara Micro 5.2020.4 and place the downloaded JAR file into a directory.&amp;nbsp; Next, open a terminal and type in the following to start Payara Micro and deploy the WAR file:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;java -jar payara-micro-5.2020.4.jar --deploy &amp;lt;path-to-war-file&amp;gt;/simple-hello.war&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This will start the server and output something similar to the following in the terminal:&lt;/div&gt;
&lt;pre&gt;Payara Micro URLs:
http://&amp;lt;your-machine&amp;gt;:8080/simple-hello

&#39;simple-hello&#39; REST Endpoints:
GET	/simple-hello/resources/application.wadl
GET	/simple-hello/resources/hello
GET	/simple-hello/resources/temperature
PUT	/simple-hello/resources/temperature
GET	/simple-hello/resources/temperature/c
GET	/simple-hello/resources/temperature/f

]]
&lt;/pre&gt;
&lt;div&gt;Input the following URL into the browser to run the service:&amp;nbsp;&amp;nbsp;http://&amp;lt;your-machine&amp;gt;:8080/simple-hello/resources/temperature&lt;/div&gt;</description><link>https://jj-blogger.blogspot.com/2020/08/developing-simple-web-service-with.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhvF-io6ALR5bEnLyBxDFeFY55oVaQSZ703ftJnbzn_1rUpjdUXnUFZ_5VzfAp3MDxomj3lkyc1kxe88WDdAMhzKqgVrAXyOi2dOqJHje8MyqNmJCtsm_gMBfyCcm7gT7pc4s5Kg/s72-c/PoolService_JakartaEE1.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-4416616051170990044</guid><pubDate>Thu, 28 Nov 2019 21:32:00 +0000</pubDate><atom:updated>2019-11-28T13:32:28.945-08:00</atom:updated><title>Jakarta EE Contribution - Getting Started</title><description>Are you interested in helping out with moving Jakarta EE forward? &amp;nbsp;So am I, and I wanted to provide a few details that can be used to help those who are interested in getting started.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Step 1:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The first step to begin contributing is to sign the Eclipse Foundation Committer and Contributor Agreement (ECA): &amp;nbsp;&lt;a href=&quot;https://www.eclipse.org/legal/committer_process/re-sign/&quot;&gt;https://www.eclipse.org/legal/committer_process/re-sign/&lt;/a&gt;. The ECA must be signed by anyone who wants to contribute to an Eclipse open source software or specification project. &amp;nbsp;This allows one to have the ability to accept a contributor&#39;s pull requests. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The Eclipse ICA (Eclipse Individual Committer Agreement) can be signed by those who do not work for the Eclipse Foundation Member Company when they become a committer.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
** Note: &amp;nbsp;Be sure that your employer is okay with you signing the agreement. &amp;nbsp;In many cases it is a win-win for all...as your contributions will benefit the community, including your employer.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Step 2:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sign up for the mailing lists and get involved. &amp;nbsp;Certainly sign up for the Jakarta Platform Developer mailing list, as many of the details for moving the platform forward are being discussed here.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://accounts.eclipse.org/mailing-list/jakartaee-platform-dev&quot;&gt;https://accounts.eclipse.org/mailing-list/jakartaee-platform-dev&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Look through the list of projects that are part of Jakarta EE and sign up for the individual mailing lists for those projects which you are interested in helping out:&amp;nbsp;&lt;a href=&quot;https://projects.eclipse.org/projects/ee4j&quot;&gt;https://projects.eclipse.org/projects/ee4j&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
A few of the tasks for the delivery of Jakarta EE 9 include the following:&lt;br /&gt;
&lt;br /&gt;
* Take control of the CI/CD pipeline for release.&lt;br /&gt;
* Coordinate release across all the projects.&lt;br /&gt;
* Make the actual changes to the API, docs and TCK.&lt;br /&gt;
* Make the implementation changes on at least one server - probably Eclipse GlassFish.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hopefully this will be of use to hose who are interested in getting started. &amp;nbsp;&lt;/div&gt;
</description><link>https://jj-blogger.blogspot.com/2019/11/jakarta-ee-contribution-getting-started.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-2340947776981617035</guid><pubDate>Mon, 26 Nov 2018 16:17:00 +0000</pubDate><atom:updated>2018-11-26T08:17:16.317-08:00</atom:updated><title>Automating Docker Deployments Using Jib and Payara Micro</title><description>If you are like me, you spend most of your day developing applications.&amp;nbsp; During that time, it is difficult to carve out the time to manage containers.&amp;nbsp; Writing a Dockerfile has almost become part of the normal development process nowadays, but there is a different way.&amp;nbsp; I&#39;d rather spend as much time developing my applications as possible, and leave the Docker configuration as a minimal deployment procedure that is automatically completed for me.&lt;br /&gt;
&lt;br /&gt;
I believe that the folks at Google were thinking in this way when they produced &lt;a href=&quot;https://github.com/GoogleContainerTools/jib&quot; target=&quot;_blank&quot;&gt;Jib&lt;/a&gt;.&amp;nbsp; The Jib project allows one to automate the creation of a Docker image so that the container can simply be started up after building the project.&amp;nbsp; There is no need to create a Dockerfile, as Jib takes care of this for you.&amp;nbsp; Jib works with both Maven and Gradle, and in this post I will demonstrate how to use it with Maven and deploy to Payara Micro.&amp;nbsp; By default, Jib includes a Jetty distribution to which an application will deployed inside of the container.&amp;nbsp; However, I am familiar with Payara Micro and quite enjoy the Payara Micro environment, so I&#39;ll bypass the use of Jetty and deploy to Payara Micro in this example.&lt;br /&gt;
&lt;br /&gt;
To begin, it is important to get familiar with the Jib Maven process by reading through the &lt;a href=&quot;https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin&quot; target=&quot;_blank&quot;&gt;documentation&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In this example I am utilizing the SportsTeamQueryService microservice that I produced for a Java Magazine article in 2018, but simply modifying the POM file to incorporate the Jib build.&amp;nbsp; I will not go into full detail on Jib in this post, as the documentation itself does quite well.&amp;nbsp; Rather, I will explain how I was able to get this project to build and deploy to Docker on my Mac.&amp;nbsp; If using a different OS, you may have to configure host-container networking in order for the container to communicate with the host database.&lt;br /&gt;
&lt;br /&gt;
To begin, the POM file looks like the following, including only those dependencies that are required for the project.&amp;nbsp; I call your attention to the &amp;lt;plugins&amp;gt; section for the Jib hooks:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.javamagazine&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;SportsTeamQueryService&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;packaging&amp;gt;war&amp;lt;/packaging&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;name&amp;gt;SportsTeamQueryService&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;properties&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;endorsed.dir&amp;gt;${project.build.directory}/endorsed&amp;lt;/endorsed.dir&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;project.build.sourceEncoding&amp;gt;UTF-8&amp;lt;/project.build.sourceEncoding&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;javax.persistence&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;javax.persistence-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;org.eclipse.persistence.jpa&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;javax.ws.rs&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;javax.ws.rs-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.1&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;org.eclipse.persistence.core&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;javax.ejb&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;javax.ejb-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;3.2.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;org.eclipse.persistence.asm&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;org.eclipse.persistence.antlr&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;org.eclipse.persistence.jpa.jpql&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;javax.persistence&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.1.0&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;org.eclipse.persistence.jpa.modelgen.processor&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;build&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;plugins&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;3.1&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;source&amp;gt;1.8&amp;lt;/source&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;target&amp;gt;1.8&amp;lt;/target&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;compilerArguments&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;endorseddirs&amp;gt;${endorsed.dir}&amp;lt;/endorseddirs&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/compilerArguments&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;maven-war-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.3&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;failOnMissingWebXml&amp;gt;false&amp;lt;/failOnMissingWebXml&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;i&gt;&amp;lt;!-- Docker JIB Dependency--&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;plugin&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;com.google.cloud.tools&amp;lt;/groupId&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;jib-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;0.10.0&amp;lt;/version&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;configuration&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;from&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;image&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; payara/micro:latest&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/image&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/from&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;to&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;image&amp;gt;sportsteamqueryservice&amp;lt;/image&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/to&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;container&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;appRoot&amp;gt;/opt/payara/SportsTeamQueryService&amp;lt;/appRoot&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;args&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --addlibs&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/arg&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /jars/derbyclient.jar&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/arg&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --deploy&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/arg&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/payara/SportsTeamQueryService&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/arg&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/args&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;environment&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;DOCKER_HOST&amp;gt;docker.for.mac.localhost&amp;lt;/DOCKER_HOST&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;DB_NAME&amp;gt;ACME&amp;lt;/DB_NAME&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;DB_USER&amp;gt;acmeuser&amp;lt;/DB_USER&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;DB_PASSWORD&amp;gt;password&amp;lt;/DB_PASSWORD&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/environment&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/container&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/plugin&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/plugins&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/build&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
In the POM, I added the Jib workflow within the &amp;lt;plugins&amp;gt; section.&amp;nbsp; In this project I utilized the latest Jib dependency at the time of writing, using the following maven coordinates:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;groupId&amp;gt;com.google.cloud.tools&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;artifactId&amp;gt;jib-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;version&amp;gt;0.10.0&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;configuration&amp;gt; portion of the plugin specifies custom configuration for my project.&amp;nbsp; If I leave the &amp;lt;configuration&amp;gt; section off the declaration, then the WAR file generated by the project will be deployed to a Docker image containing a Jetty server.&amp;nbsp; The WAR file will be available at the Jetty ROOT.&amp;nbsp; Instead, since I am interested in using Payara Micro, I customized the Jib declaration as follows:&lt;br /&gt;
&lt;br /&gt;
1)&amp;nbsp; Inherit FROM the latest hosted Payara Micro image using the &amp;lt;from&amp;gt;&amp;lt;image&amp;gt; tags.&lt;br /&gt;
&lt;br /&gt;
2)&amp;nbsp; Next, the &amp;lt;to&amp;gt;&amp;lt;image&amp;gt; tags declare the name of the resulting Docker image.&lt;br /&gt;
&lt;br /&gt;
3)&amp;nbsp; Add a &amp;lt;container&amp;gt; section to specify details about the container.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; a)&amp;nbsp; First, I added an &amp;lt;appRoot&amp;gt; tag to specify that the WAR file will be loaded into the &quot;/opt/payara/&quot; location, within the &quot;SportsTeamQueryService&quot; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; b)&amp;nbsp; Next, I added a number of arguments by specifying &amp;lt;args&amp;gt;&amp;lt;arg&amp;gt;&amp;lt;/arg&amp;gt;&amp;lt;/args&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first argument adds the Apache Derby Jar file to the deployment.&amp;nbsp; One note is that in the project itself, there is a &quot;src/main/jib/jars&quot; folder.&amp;nbsp; &lt;b&gt;You must add the derbyclient.jar file inside of this &quot;jib/jars&quot; folder so that it is copied into the image.&amp;nbsp; &lt;/b&gt;By default, Jib adds anything within the &quot;src/main/jib&quot; folder into the project image.&lt;br /&gt;
&lt;br /&gt;
The second argument specifies the Payara Micro &quot;--deploy&quot; argument and points to the &quot;/opt/payara/SportsTeamQueryService&quot; directory...which is the exploded WAR for the project.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; c)&amp;nbsp; Lastly, add the &amp;lt;environment&amp;gt; section to specify any environment variables that will be passed into the image.&amp;nbsp; In this case, I added database-specific environment variables.&amp;nbsp; If you take a look at the glassfish-resources.xml file within the project, you can see that these environment variables are referenced to configure the datasource.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;!DOCTYPE resources PUBLIC &quot;-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN&quot; &quot;http://glassfish.org/dtds/glassfish-resources_1_5.dtd&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;resources&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;jdbc-connection-pool ..abbreviated for brevity...&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;&lt;b&gt;&amp;lt;property name=&quot;serverName&quot; value=&quot;${ENV=DOCKER_HOST}&quot;/&amp;gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;portNumber&quot; value=&quot;1527&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;databaseName&quot; value=&quot;${ENV=DB_NAME}&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;User&quot; value=&quot;${ENV=DB_USER}&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;Password&quot; value=&quot;${ENV=DB_PASSWORD}&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;URL&quot; value=&quot;jdbc:derby://${ENV=DOCKER_HOST}:1527/acme&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;driverClass&quot; value=&quot;org.apache.derby.jdbc.ClientDriver&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/jdbc-connection-pool&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;jdbc-resource enabled=&quot;true&quot; jndi-name=&quot;java:app/jdbc/acme&quot; object-type=&quot;user&quot; pool-name=&quot;derby_net_acme_acmeuserPool&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;/resources&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
Note that you may need to modify the servername environment variable if not using Docker for Mac.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That is it for configuring Jib!&amp;nbsp; Now all that is required is simply to build the project and deploy the image to your local Docker repository.&amp;nbsp; In this case, I open the terminal and traverse inside of the SportsTeamQueryService-Jib project directory and issue the following Maven build:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mvn clean install&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
After the project has been built, invoke the Jib build by issuing the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mvn compile jib:dockerBuild&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The Docker image should now be ready to start within the local Docker environment.&amp;nbsp; To start the container, issue the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;docker run -d -p 8080:8080 sportsteamqueryservice&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The container should now be up and running.&amp;nbsp; Visit the URL&amp;nbsp;http://localhost:8080/SportsTeamQueryService/rest/teamrosterqueryservice/findAll to see the list of players.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
In order to rebuild the Docker image, simply issue the command:&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;mvn compile jib:dockerBuild&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;Project Sources:&amp;nbsp;&amp;nbsp;https://github.com/juneau001/SportsTeamQueryService-Jib&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</description><link>https://jj-blogger.blogspot.com/2018/11/automating-docker-deployments-using-jib.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-6667636278089682895</guid><pubDate>Sun, 28 Oct 2018 06:35:00 +0000</pubDate><atom:updated>2018-10-28T08:39:22.033-07:00</atom:updated><title>Oracle Code One...A Conference I&#39;ll Never Forget</title><description>&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;In the spring of 2018 when Oracle Code One was first announced, I was fairly certain that I would not be attending this year.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;The main reason is because I normally only attended the JavaOne conference every couple of years, and I thought this would be an &quot;off&quot; year.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;Since I hadn&#39;t planned on attending, I did not submit any talks.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;I was happy to be asked to join the &quot;Content Selection Committee&quot; for Oracle Code One, as I had been a member of the selection committee for a number of JavaOne conferences in the past.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;I enjoy being part of the committee, as it is great to see the diversity of talks submitted to the conference each year.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;As the conference was about a month out, I received a surprise email congratulating me on being a 2018 Duke&#39;s Choice Award winner.&amp;nbsp; I was flabbergasted, and in complete disbelief.&amp;nbsp; So much so, that I replied to the email and asked if the sender had the correct person, and why I had been chosen to win this award.&amp;nbsp; I received an email response confirming that I indeed did win, and I had been chosen as the &quot;Java EE&quot; winner this year.&amp;nbsp; During the nomination period for the Duke&#39;s Choice Award, I had nominated a couple of projects...but I couldn&#39;t believe that someone had nominated me.&amp;nbsp; Still in disbelief, I knew that this had certainly changed things, and I was no doubt going to attend the conference this year.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;This was going to be a different type of conference, as I was not speaking for the first time at this conference in years.&amp;nbsp; Since I had no talks to prepare for, I signed up for a time slot in the Hackergarten on Tuesday.&amp;nbsp; My friend and podcast colleague Freddy Guime purchased recording equipment so I could get some interviews for the Java PubHouse and OffHeap podcasts...so I now had plenty of things to do while at the conference!&amp;nbsp; Luckily, I was able to have my wife attend the conference with me so that she could be there as I received this surprising Duke&#39;s Choice award. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;I was very lucky to have the opportunity to attend the Java Champions summit on Saturday before the conference.&amp;nbsp; It was great to meet up with old friends again and listen to some amazing speakers at the Java Champions summit.&amp;nbsp; There were talks covering: the new Java release cadence, Jakarta EE, MicroProfile, Machine Learning, OpenJFX, Java and Containers, Women In Tech, JUG Evolution in Latin America, and JCP EC Update.&amp;nbsp; Excellent speakers, great friends, and very awesome...especially because this was my first &quot;JavaOne&quot; (okay...Code One but JavaOne always holds a place in my heart) as a Java Champion...being that I was inducted into the program in March of 2017.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;I spent Sunday with my wife visiting the sites of San Francisco.&amp;nbsp; We were lucky to have such great weather to see places like Chinatown and Fisherman&#39;s Wharf.&amp;nbsp; We attended the &quot;Java in the Cloud&quot; event at the Thirsty Bear that evening, and it was great to see even more familiar faces that evening.&amp;nbsp; It really is the networking at conferences such as Oracle Code One that makes the event.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;Monday was full of great sessions, as I started off right with attending a talk from Adam Bien on Jakarta EE.&amp;nbsp; As per his standard, the talk contained some live coding and excellent examples of how to package Java EE applications into Docker containers.&amp;nbsp; I also attended a talk on &quot;Serverless&quot; from Ivar Grimstad, which focused on writing serverless functions and deploying to different cloud solutions.&amp;nbsp; After these talks, I attended a &quot;JUG Leaders and User Group Appreciation Luncheon&quot; with several other esteemed Java community members.&amp;nbsp; I had the honor of attending to represent the Chicago Java User&#39;s Group (CJUG).&amp;nbsp; After lunch, I attended a talk on MicroProfile by Emily Jiang and Antoine Sabot-Durand...excellent session!&amp;nbsp; Other sessions and an excellent Java Keynote concluded my Monday at the conference.&amp;nbsp; I then headed out with my wife to the annual JCP party.&amp;nbsp; This event has become one of my favorite gatherings whenever I attended the conference, and this year was no different...a great time was had by all who attended.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;Tuesday was full of more great sessions, and it was also award day!&amp;nbsp; I worked the Hackergarten in the morning, where I finished up some licensing reviews for Apache NetBeans enterprise modules, and worked on testing Mojarra 2.3.9.&amp;nbsp; This was an especially great day because I had learned on Monday that the Apache NetBeans community was going to be receiving the Duke&#39;s Choice Award this year also...so I had the very rare opportunity to celebrate the Duke&#39;s Choice Award with the NetBeans Community, as well as for &quot;Java EE&quot;.&amp;nbsp; Prior to the award ceremony in the afternoon, I visited the Java Hub with my wife and we explored the great vendor booths and fun activities such as the Java Escape Rooms.&amp;nbsp; As we gathered in the afternoon for the award ceremony, I saw and congratulated other members of the Apache NetBeans team. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;The first Duke&#39;s Choice Award was presented to Apache NetBeans, and it was surreal as we community members went on stage to receive the award as a community.&amp;nbsp; Many other great projects won the award as well.&amp;nbsp; MicroProfile was then presented the award, and to my surprise it was being presented to me!&amp;nbsp; This was the award that I was emailed about a month earlier...it was not for &quot;Java EE&quot;, but rather, it was for MicroProfile!&amp;nbsp; I was shocked, surprised, and truly honored to have the privilege to accept the Duke&#39;s Choice Award on behalf of the MicroProfile community!!&amp;nbsp; Luckily enough, my friend David Heffelfinger was in attendance for the Apache NetBeans award, so I was able to get a photo with the Duke&#39;s Choice Award with him, as he is another member of the Java EE and MicroProfile community.&amp;nbsp; I was glad to have the great privilege of taking a photo together with some members of the MicroProfile community later that evening after the MicroProfile BoF session.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;As mentioned, I am truly honored for having the opportunity to receive the award on behalf of the MicroProfile community.&amp;nbsp; This community has done amazing things in a very short time.&amp;nbsp; There are so many esteemed members of the Java community that contribute to the MicroProfile project...and I only wish that I had known that the award was for MicroProfile so that I could have invited them all to attend the award event to celebrate as a community.&amp;nbsp; Regardless...the MicroProfile community has made a tremendous impact to enterprise Java, and every member of the community should be proud of this win!!&amp;nbsp; The Dukes Choice Award is the most highly regarded award in the Java Ecosystem...and MicroProfile has achieved this award in such a short time...it is amazing!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDOXtht7lrrpGb0p4v0VgaMSq2PQk-oXp2GOwVs8dbiq_2GNqLTt2PH-btYlJ95SUuUjKFvzHMF5jO5mdp4NpmayxGqyjHx4X2eCLINV4NdqJnKAKRcrh_lm1w_ANW8uiu3j7LAQ/s1600/2891DC98-04A0-4E74-8AAF-00988CF87443.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDOXtht7lrrpGb0p4v0VgaMSq2PQk-oXp2GOwVs8dbiq_2GNqLTt2PH-btYlJ95SUuUjKFvzHMF5jO5mdp4NpmayxGqyjHx4X2eCLINV4NdqJnKAKRcrh_lm1w_ANW8uiu3j7LAQ/s320/2891DC98-04A0-4E74-8AAF-00988CF87443.jpeg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Photo:&amp;nbsp; Josh Juneau and David Heffelfinger&lt;/div&gt;
&lt;div style=&quot;font-size: 19.1px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;; font-size: 19.08pt;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;I spent much of my Wednesday attending other sessions and recording interviews for the Java PubHouse and OffHeap podcasts.&amp;nbsp; I was so lucky to have well known members of the Java Community take a few moments out of their day to give me insight to their conference experience.&amp;nbsp; I wish I had more time to meet with many others in the community...but time flies so fast at the conference that it seemed as though I never had a spare minute!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal; min-height: 22.8px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;I mentioned before that the Java Community makes the conferences worth attending.&amp;nbsp; That is what it is all about!&amp;nbsp; I met so many old friends and made many new acquaintances.&amp;nbsp; Not only did I meet up with many amazing Java luminaries, but I was lucky enough to finally meet up with a fellow Apress author Alex Jecan and Apress editor Jonathan Gennick.&amp;nbsp; It was also great to meet up with so many others such as Oracle Java Magazine editor in chief Andrew Binstock.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;I also had the unique opportunity to be with the Apache NetBeans community to accept the 2018 Duke&#39;s Choice Award, and I had the honor of accepting the 2018 Duke&#39;s Choice Award on behalf of the MicroProfile community!&amp;nbsp; This will certainly be a conference that I will never forget.&amp;nbsp; I want to thank the folks are Oracle, including those that run the Java Champions program, and my organization for helping to make this year&#39;s trip to Oracle Code One possible for me. Thanks Oracle Code One for an amazing conference...and I look forward to attending again and meeting up with all of my friends in the amazing Java community!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-family: &amp;quot;.sf ui text&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;.sfuitext&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRby2cwt9vHWSsNFoCdXwXbapCjwQhGFQ22N0-Zs4zYIxJaxQZC82IgM2IGvzdhWMrG08QxYXOioB8dmq2mdd2rquW48NLQ1BfzZJw45XvTDjvqGXYYF1PraCEjJ3yv2lIZNxvw/s1600/04AE5FDF-EAE7-4544-B6DE-79DADF3B0EE7.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRby2cwt9vHWSsNFoCdXwXbapCjwQhGFQ22N0-Zs4zYIxJaxQZC82IgM2IGvzdhWMrG08QxYXOioB8dmq2mdd2rquW48NLQ1BfzZJw45XvTDjvqGXYYF1PraCEjJ3yv2lIZNxvw/s320/04AE5FDF-EAE7-4544-B6DE-79DADF3B0EE7.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: #454545; font-stretch: normal; line-height: normal;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;sfuitext&amp;quot;;&quot;&gt;Photo (left-to-right): John Clingan, Ken Finnigan, Mark Little, Ian Robinson, Reza Rahman, Emily Jiang, Josh Juneau&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>https://jj-blogger.blogspot.com/2018/10/oracle-code-onea-conference-ill-never.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDOXtht7lrrpGb0p4v0VgaMSq2PQk-oXp2GOwVs8dbiq_2GNqLTt2PH-btYlJ95SUuUjKFvzHMF5jO5mdp4NpmayxGqyjHx4X2eCLINV4NdqJnKAKRcrh_lm1w_ANW8uiu3j7LAQ/s72-c/2891DC98-04A0-4E74-8AAF-00988CF87443.jpeg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-7709094545728834972</guid><pubDate>Tue, 18 Sep 2018 11:12:00 +0000</pubDate><atom:updated>2018-09-20T04:33:11.365-07:00</atom:updated><title>Micronaut for Java EE/Jakarta EE Developers</title><description>&lt;h2&gt;
&lt;/h2&gt;
There is a new microservices framework in town called &lt;a href=&quot;http://micronaut.io/&quot; target=&quot;_blank&quot;&gt;Micronaut&lt;/a&gt;.&amp;nbsp; In this post, I&#39;ll discuss how I&#39;ve ventured into working with the Micronaut framework from a Java EE/Jakarta EE perspective.&amp;nbsp; I am a Java EE developer, so developing microservices using solutions such as &lt;a href=&quot;https://microprofile.io/&quot; target=&quot;_blank&quot;&gt;Eclipse MicroProfile&lt;/a&gt; are closer to my line of expertise, but Micronaut caught my attention since it offers the following abilities:&lt;br /&gt;
&lt;br /&gt;
- Develop in Java, Groovy, or Kotlin&lt;br /&gt;
- Easy to test..fully integrated testing with Spock or JUnit&lt;br /&gt;
- Embedded Server &amp;amp; Compile Time HTTP Client&lt;br /&gt;
- Easy packaging for Docker&lt;br /&gt;
- Fast startup time, low memory consumption&lt;br /&gt;
- Fully Reactive&lt;br /&gt;
&lt;br /&gt;
As an enterprise developer at heart, my first thought usually goes to the database, as the majority of applications that I author utilize an RDBMS.&amp;nbsp; I found the number of examples using Micronaut with an RDBMS to be few and far between, so I thought it may be useful for me to create another example for that use case.&amp;nbsp; In this example, I utilize PostgreSQL.&amp;nbsp; However, most other RDBMS are also supported.&amp;nbsp; This article is not meant to be a full explanation of installing Micronaut or utilizing all of the many Micronaut features.&amp;nbsp; Instead, it is a primer for those looking to get started utilizing Micronaut with a relational database...particularly geared towards those with some Java EE/Jakarta EE background.&lt;br /&gt;
&lt;br /&gt;
In my particular case, I am interested in quickly spinning up Microservices that are fully testable, extensible, and efficient.&amp;nbsp; Although I can do this with MicroProfile or standard Java EE, I thought it would be interesting to learn something new and also have the ability to utilize Groovy or Kotlin.&amp;nbsp; I also wanted to put a Java EE/Jakarta EE spin on it...so I&#39;m using JPA for working with the data.&amp;nbsp; Many of the Micronaut examples utilize Groovy and GORM for persistence...but I likely wouldn&#39;t be using that in any of my applications.&lt;br /&gt;
&lt;br /&gt;
The example was developed using &lt;a href=&quot;https://netbeans.apache.org/&quot; target=&quot;_blank&quot;&gt;Apache NetBeans 9.0&lt;/a&gt; and the &lt;a href=&quot;https://docs.micronaut.io/latest/guide/index.html#buildCLI&quot; target=&quot;_blank&quot;&gt;Command Line Interface (CLI)&lt;/a&gt; that comes packaged with Micronaut.&amp;nbsp; This particular example was written against Micronaut 1.0.0.M4.&amp;nbsp; In this case, I kept it simple and utilized only a single, basic database table for persistence within a PostgreSQL database.&lt;br /&gt;
&lt;br /&gt;
To begin, I created an app by utilizing the CLI by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px &#39;Helvetica Neue&#39;; color: #454545}
&lt;/style&gt;   &lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mn create-app org.acme.books --features hibernate-jpa,jdbc-tomcat&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
This simply creates a skeleton for my app within a directory named &quot;books&quot;, and the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Application.java &lt;/span&gt;main class will be placed within the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;org.acme.books&lt;/span&gt; package.&amp;nbsp; By default, there are basic features supported by an application, but in this case I&#39;ve added support for the Tomcat connection pool.&amp;nbsp; This will be utilized when creating database connections via the Java Persistence API (JPA).&amp;nbsp; The default application is also generated with support for the Gradle build system.&amp;nbsp; Therefore, a build.gradle is created, and that is the file in which dependency management will take place.&amp;nbsp; Note that an application can also be generated utilizing the Apache Maven build system, but I had issues running Maven projects under Micronaut 1.0.0.M4...so I stuck with Gradle for this example.&lt;br /&gt;
&lt;br /&gt;
If using Apache NetBeans 9.0, you can install the &quot;Groovy and Grails&quot; and &quot;Gradle&quot; plugins (currently available in the NetBeans 8.2 plugin center) to provide support for opening the project.&amp;nbsp; Once this is completed, the project can be opened within NetBeans and development can begin.&amp;nbsp; After installing the plugins and opening the project within Apache NetBeans, the completed project structure should look like that in the following figure:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPX7qT4lrQcrye2DnazaxwqYn8Hk6ytylEISqz3WMS96xGC1Y7wWANlntDZYHVCY8Frhn8MaLwtN3WlLhAWywuLzffNPZGuYnVM7QinNmDSNRFoMjqgv3og_S_reTNMaj_wjl04w/s1600/netbeans-project.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;383&quot; data-original-width=&quot;360&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPX7qT4lrQcrye2DnazaxwqYn8Hk6ytylEISqz3WMS96xGC1Y7wWANlntDZYHVCY8Frhn8MaLwtN3WlLhAWywuLzffNPZGuYnVM7QinNmDSNRFoMjqgv3og_S_reTNMaj_wjl04w/s320/netbeans-project.png&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
To provide support for the PostgreSQL database, I added the dependencies to build.gradle:&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;compile group: &#39;org.postgresql&#39;, name: &#39;postgresql&#39;, version: &#39;42.2.5&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Next, I opened up the application.yml file and added a datasource for the application.&amp;nbsp; This is the file that takes place of a persistence.xml within a traditional Java EE application.&amp;nbsp; Also, JPA support is added via this file, indicating which package includes the entity classes, as well as configuration of Hibernate.&amp;nbsp; Port 8080 is also set, as by default Micronaut will choose a random port on which to start the server.&amp;nbsp; The full sources of application.xml are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span courier=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; monospace=&quot;&quot; new=&quot;&quot; quot=&quot;&quot; style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot; xx-small=&quot;&quot;&gt;micronaut:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; application:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: books&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;#Uncomment to set server port&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; server:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; port: 8080&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;---&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;datasources:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; default:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: jdbc:postgresql://localhost/postgres&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; username: postgres&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; password: yourpassword&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; driverClassName: org.postgresql.Driver&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; connectionTimeout: 4000&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;jpa:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; default:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; packages-to-scan:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - &#39;org.acme.domain&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; properties:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; hibernate:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hbm2ddl:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; auto: update&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show_sql: true&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now that the configuration is out of the way, I can get to the fun part...development.&amp;nbsp; In this example, I create a basic service allowing one to create, read, update, or delete records in the BOOK table.&amp;nbsp; The automatically generated &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Application&lt;/span&gt; class within the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;org.acme &lt;/span&gt;package, which starts the service.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;package org.acme;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.runtime.Micronaut;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;public class Application {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public static void main(String[] args) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Micronaut.run(Application.class);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To begin development, create two packages within the application for organizing the source code.&amp;nbsp; First, create &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;org.acme.domain&lt;/span&gt;, which will contain the entity class.&amp;nbsp; Next, create &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;org.acme.book&lt;/span&gt;, which will contain the implementation classes.&amp;nbsp; Create a Book.java class within the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;org.acme.domain&lt;/span&gt; package, which will be the entity class containing a standard JPA mapping for the database.&amp;nbsp; In this case, note that I utilize&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt; java.time.LocalDate&lt;/span&gt; for the date fields, and I utilize a database sequence generator for population of the primary key.&amp;nbsp; The sources are as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;package org.acme.domain;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.time.LocalDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.Column;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.Entity;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.GeneratedValue;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.GenerationType;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.Id;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.SequenceGenerator;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.Table;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.validation.constraints.NotNull;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;* JPA Mappings for the BOOK database table.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Entity&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Table(name=&quot;BOOK&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;public class Book {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Id&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @GeneratedValue(strategy=GenerationType.SEQUENCE,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; generator=&quot;book_generator&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @SequenceGenerator(name=&quot;book_generator&quot;,sequenceName=&quot;book_s&quot;, allocationSize=1)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private Long id;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Column(name=&quot;PUBLISH_DATE&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotNull&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private LocalDate publishDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Column(name=&quot;TITLE&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotNull&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private String title;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Column(name=&quot;AUTHOR_FIRST&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotNull&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private String authorFirst;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Column(name=&quot;AUTHOR_LAST&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotNull&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private String authorLast;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private Long pages;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public Book(){}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public Book(@NotNull Long id, @NotNull LocalDate publishDate, @NotNull String title, String authorFirst, String authorLast, Long pages){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.id = id;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.publishDate = publishDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.title = title;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.authorFirst = authorFirst;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.authorLast = authorLast;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.pages = pages;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public Book(@NotNull LocalDate publishDate, @NotNull String title, String authorFirst, String authorLast, Long pages){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.publishDate = publishDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.title = title;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.authorFirst = authorFirst;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.authorLast = authorLast;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.pages = pages;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return the id&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public Long getId() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return id;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param id the id to set&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void setId(Long id) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.id = id;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return the publishDate&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public LocalDate getPublishDate() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return publishDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param publishDate the publishDate to set&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void setPublishDate(LocalDate publishDate) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.publishDate = publishDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return the title&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public String getTitle() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return title;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param title the title to set&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void setTitle(String title) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.title = title;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return the authorFirst&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public String getAuthorFirst() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return authorFirst;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param authorFirst the authorFirst to set&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void setAuthorFirst(String authorFirst) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.authorFirst = authorFirst;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return the authorLast&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public String getAuthorLast() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return authorLast;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param authorLast the authorLast to set&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void setAuthorLast(String authorLast) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.authorLast = authorLast;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return the pages&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public Long getPages() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return pages;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param pages the pages to set&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void setPages(Long pages) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.pages = pages;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public String toString() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;Book{&quot; +&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;id=&quot; + id +&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;, publishDate=&#39;&quot; + publishDate + &#39;\&#39;&#39; +&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;, title=&#39;&quot; + title + &#39;\&#39;&#39; +&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;, authorFirst=&#39;&quot; + authorFirst + &#39;\&#39;&#39; +&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;, authorLast=&#39;&quot; + authorLast + &#39;\&#39;&#39; +&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;, pages=&#39;&quot; + pages +&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;}&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In a Micronaut application, HTTP requests and responses need to be encapsulated in Serializable classes for processing, and therefore it makes sense to generate some simple &quot;Plain Old Java Objects&quot; (POJOs) for encapsulating the data that will be used within database operations.&amp;nbsp; In the same &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;org.acme.domain&lt;/span&gt; package, I created two such classes, BookSaveOperation.java and BookUpdateOperation.java.&amp;nbsp; These classes will define the fields required for passing data from the HTTP request to the controller class.&amp;nbsp; The sources for BookSaveOperation.java are as follows (see the GitHub repository for full sources):&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;package org.acme.domain;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.time.LocalDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.validation.constraints.NotBlank;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.validation.constraints.NotNull;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;* @author Josh Juneau&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;public class BookSaveOperation implements java.io.Serializable {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotNull&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private LocalDate publishDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotNull&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotBlank&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private String title;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotNull&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotBlank&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private String authorFirst;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotNull&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @NotBlank&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private String authorLast;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private Long pages;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public BookSaveOperation(){}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public BookSaveOperation(LocalDate publishDate, String title,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String authorFirst, String authorLast, Long pages){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.publishDate = publishDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.title = title;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.authorFirst = authorFirst;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.authorLast = authorLast;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.pages = pages;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;// ...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;// getters and setters&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;// ...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The application business logic occurs within a class which is much like an EJB or DAO implementation, and the class must implement an interface that has defined each of the business logic methods.&amp;nbsp; In this case, I created an interface org.acme.book.BookRepository.java, and define a few standard operational methods:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;package org.acme.book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.time.LocalDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.util.List;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.util.Optional;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.acme.domain.Book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;public interface BookRepository {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Book save(LocalDate publishDate, String title, String authorFirst, String authorLast, Long pages);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Optional&amp;lt;Book&amp;gt; findById(Long id);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; void deleteById(Long id);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; List&amp;lt;Book&amp;gt; findAll();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; int update(Long id, LocalDate publishDate, String title, String authorFirst, String authorLast, Long pages);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Next, implement that interface within a class entitled org.acme.book.BookRepositoryImpl.java, and annotate as a &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Singleton&lt;/span&gt;.&amp;nbsp; Since this is the class which will implement business logic, inject a PersistenceContext, which provides the JPA EntityManager that will be used for performing database operations.&amp;nbsp; Simply implement each of the operations outlined within the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookRepository&lt;/span&gt; interface, marking each with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Transactional&lt;/span&gt; (io.micronaut.spring.tx.annotation.Transactional), implying read only for those methods that will not modify any data.&amp;nbsp; The sources for BookRepositoryImpl.java are as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;package org.acme.book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.configuration.hibernate.jpa.scope.CurrentSession;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.spring.tx.annotation.Transactional;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.time.LocalDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.util.List;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.util.Optional;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.inject.Singleton;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.EntityManager;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.persistence.PersistenceContext;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.acme.domain.Book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;* Business logic for the service.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Singleton&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;public class BookRepositoryImpl implements BookRepository {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @PersistenceContext&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private EntityManager entityManager;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public BookRepositoryImpl(@CurrentSession EntityManager entityManager) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.entityManager = entityManager;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Transactional&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public Book save(LocalDate publishDate, String title, String authorFirst, String authorLast, Long pages) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Book book = new Book(publishDate, title, authorFirst, authorLast, pages);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entityManager.persist(book);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Transactional(readOnly = true)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public Optional&amp;lt;Book&amp;gt; findById(Long id) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return Optional.ofNullable(entityManager.find(Book.class, id));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Transactional(readOnly = true)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public List&amp;lt;Book&amp;gt; findAll() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return entityManager&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .createQuery(&quot;SELECT b FROM Book b&quot;, Book.class)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .getResultList();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Transactional&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public int update(Long id, LocalDate publishDate, String title, String authorFirst, String authorLast, Long pages) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return entityManager.createQuery(&quot;UPDATE Book b SET publishDate = :publishDate, title = :title, &quot; +&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;authorFirst = :authorFirst, authorLast = :authorLast, pages = :pages where id = :id&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&quot;publishDate&quot;, publishDate)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&quot;title&quot;, title)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&quot;authorFirst&quot;, authorFirst)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&quot;authorLast&quot;, authorLast)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&quot;pages&quot;, pages)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&quot;id&quot;, id)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .executeUpdate();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Transactional&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void deleteById(Long id) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; findById(id).ifPresent(book -&amp;gt; entityManager.remove(book));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In an effort to explain the Micronaut application infrastructure from a Java EE perspective, I&#39;ll compare the implementation with a simple JAX-RS application.&amp;nbsp; Micronaut utilizes io.micronaut.http.annotation.Controller classes to perform the request-response handling for a service.&amp;nbsp; This is much like a JAX-RS controller class, with a few slight differences.&amp;nbsp; This very much reminds me of the &lt;a href=&quot;https://www.mvc-spec.org/&quot; target=&quot;_blank&quot;&gt;Eclipse Krazo project&lt;/a&gt;, or MVC 1.0 for Java EE.&amp;nbsp; For instance, instead of annotating methods with the JAX-RS annotations javax.ws.rs.GET, javax.ws.rs.POST, or javax.ws.rs.Path, Micronaut uses io.micronaut.http.annotation.Get and io.micronaut.http.annotation.Post, among others.&amp;nbsp; The URI path for each of the methods can be directly declared via the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Get&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Post&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Put&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Delete &lt;/span&gt;annotations.&amp;nbsp; Each controller class will implement the functionality for the service and handles the request-response life cycle.&amp;nbsp; The business logic for persistence (contained within the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookRepositoryImpl&lt;/span&gt; class) is injected into the controller class via the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Inject&lt;/span&gt; annotation or via constructor injection.&amp;nbsp; In the sources for this example, constructor injection is used.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;package org.acme.book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.acme.domain.Book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.HttpHeaders;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.HttpResponse;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.annotation.Body;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.annotation.Controller;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.annotation.Delete;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.annotation.Get;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.annotation.Post;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.annotation.Put;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.validation.Validated;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import javax.validation.Valid;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.net.URI;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.util.List;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.acme.domain.BookSaveOperation;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.acme.domain.BookUpdateOperation;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Validated&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Controller(&quot;/books&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;public class BookController {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; protected final BookRepository bookRepository;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public BookController(BookRepository bookRepository) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.bookRepository = bookRepository;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Get(&quot;/&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public List&amp;lt;Book&amp;gt; list() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return bookRepository.findAll();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Put(&quot;/&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public HttpResponse update(@Body @Valid BookUpdateOperation operation) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bookRepository.update(operation.getId(), operation.getPublishDate(),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operation.getTitle(), operation.getAuthorFirst(), operation.getAuthorLast(), operation.getPages());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return HttpResponse.noContent().header(HttpHeaders.LOCATION, location(operation.getId()).getPath());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Get(&quot;/{id}&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Book show(Long id) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return bookRepository&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .findById(id)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .orElse(null);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Delete(&quot;/{id}&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; HttpResponse delete(Long id) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bookRepository.deleteById(id);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return HttpResponse.noContent();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Post(&quot;/&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; HttpResponse&amp;lt;Book&amp;gt; save(@Body @Valid BookSaveOperation operation) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Book book = bookRepository.save(operation.getPublishDate(), operation.getTitle(),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operation.getAuthorFirst(), operation.getAuthorLast(), operation.getPages());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return HttpResponse&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .created(book)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .headers(headers -&amp;gt; headers.location(location(book)));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; protected URI location(Book book) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return location(book.getId());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; protected URI location(Long id) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return URI.create(&quot;/books/&quot; + id);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Testing the Application&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Micronaut provides easy testing with Spock or JUnit and an embedded server...making it easy to create tests for each of the controllers.&amp;nbsp; In this case, I utilize JUnit to test the application.&amp;nbsp; I created a testing class within the test folder of the project named org.acme.BookControllerTest.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;package org.acme;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.context.ApplicationContext;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.core.type.Argument;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.HttpHeaders;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.HttpRequest;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.HttpResponse;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.HttpStatus;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.http.client.HttpClient;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import io.micronaut.runtime.server.EmbeddedServer;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.time.LocalDate;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.util.ArrayList;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import java.util.List;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.acme.domain.Book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.acme.domain.BookSaveOperation;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.acme.domain.BookUpdateOperation;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.junit.AfterClass;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import static org.junit.Assert.assertEquals;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.junit.BeforeClass;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import org.junit.Test;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;* Test cases for BookController&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;public class BookControllerTest {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private static EmbeddedServer server;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private static HttpClient client;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private&amp;nbsp; Book book;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; HttpRequest request;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; HttpResponse response;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Long id;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; List&amp;lt;Long&amp;gt; bookIds = new ArrayList&amp;lt;&amp;gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @BeforeClass&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public static void setupServer() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; server = ApplicationContext.run(EmbeddedServer.class);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; client = server.getApplicationContext().createBean(HttpClient.class, server.getURL());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @AfterClass&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public static void stopServer() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (server != null) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; server.stop();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (client != null) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; client.stop();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Test&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void testInsertBooks() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = HttpRequest.POST(&quot;/books&quot;, new BookSaveOperation(LocalDate.now(), &quot;Java EE 8 Recipes&quot;, &quot;Josh&quot;, &quot;Juneau&quot;, new Long(750)));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response = client.toBlocking().exchange(request);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(HttpStatus.CREATED, response.getStatus());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = HttpRequest.POST(&quot;/books&quot;, new BookSaveOperation(LocalDate.now(), &quot;Java 9 Recipes&quot;, &quot;Josh&quot;, &quot;Juneau&quot;, new Long(600)));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response = client.toBlocking().exchange(request);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; id = entityId(response, &quot;/books/&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(HttpStatus.CREATED, response.getStatus());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Test&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void testBookRetrieve() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = HttpRequest.GET(&quot;/books&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;Book&amp;gt; books = client.toBlocking().retrieve(request, Argument.of(List.class, Book.class));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Populate a book instance for later&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(Book b:books){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; book = b;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(2, books.size());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @Test&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void testBookOperations() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = HttpRequest.GET(&quot;/books&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;Book&amp;gt; books = client.toBlocking().retrieve(request, Argument.of(List.class, Book.class));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Populate a book instance for later&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(Book b:books){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; book = b;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = HttpRequest.PUT(&quot;/books/&quot;, new BookUpdateOperation(book.getId(),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; book.getPublishDate(),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Java 10 Recipes&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; book.getAuthorFirst(),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; book.getAuthorLast(),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; book.getPages()));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response = client.toBlocking().exchange(request);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(HttpStatus.NO_CONTENT, response.getStatus());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = HttpRequest.GET(&quot;/books/&quot; + book.getId());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; book = client.toBlocking().retrieve(request, Book.class);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&quot;Java 10 Recipes&quot;, book.getTitle());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; testDelete();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public void testDelete(){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;request = HttpRequest.GET(&quot;/books&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;Book&amp;gt; books = client.toBlocking().retrieve(request, Argument.of(List.class, Book.class));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Populate a book instance for later&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(Book b:books){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request = HttpRequest.DELETE(&quot;/books/&quot; + b.getId());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response = client.toBlocking().exchange(request);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(HttpStatus.NO_CONTENT, response.getStatus());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Long entityId(HttpResponse response, String path) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String value = response.header(HttpHeaders.LOCATION);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (value == null) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int index = value.indexOf(path);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (index != -1) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return Long.valueOf(value.substring(index + path.length()));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Walk-Through of the Logic in Testing Class&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the method that runs &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@BeforeClass&lt;/span&gt;, the HTTP server and client are created.&amp;nbsp; Similarly, when the tests have finished executing, the method that is annotated with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@AfterClass&lt;/span&gt; is invoked, which stops the server if it is running.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
From within the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;textInsertBooks()&lt;/span&gt; method, two new book records are created by passing new &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookSaveOperation&lt;/span&gt; objects populated with data to the service that is available via the &quot;/books&quot; path with the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Post&lt;/span&gt; designation.&amp;nbsp; In this case, the controller method&amp;nbsp; &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookController.save()&lt;/span&gt; is invoked.&amp;nbsp; Taking a look at the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;save()&lt;/span&gt; method, you can see that the method simply passes the contents of &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookSaveOperation&lt;/span&gt; to the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookRepository.save()&lt;/span&gt; business method (utilizing the interface), persisting the object.&amp;nbsp; In the end, an &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;HttpResponse&lt;/span&gt; is returned.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;testBookRetrieve()&lt;/span&gt; method calls upon the service that is available via the &quot;/books&quot; path containing the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Get&lt;/span&gt; designation.&amp;nbsp; This, in-turn, calls upon the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookController.list()&lt;/span&gt; method, which performs a &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;findAll()&lt;/span&gt; on the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookRepository&lt;/span&gt;, returning a List of &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Book&lt;/span&gt; objects.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;testBookOperations() &lt;/span&gt;method is responsible for performing updates to the records.&amp;nbsp; First, the list of &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Book&lt;/span&gt; objects is retrieved from the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookController&lt;/span&gt;, and then one of the books is updated via the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookController.update()&lt;/span&gt; method by populating a &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookUpdateOperation&lt;/span&gt; object with the contents to be updated.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
** Keep in mind, the BookSaveOperation.java and BookUpdateOperation.java objects are simply POJOs that are used to move the data&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Lastly, the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;testDelete() &lt;/span&gt;method is invoked, which traverses the List of &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Book&lt;/span&gt; objects, calling upon the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BookController.delete()&lt;/span&gt; method via the service call to the &quot;/books&quot; path and invoking the method designated as &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@Delete&lt;/span&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To execute the tests, simply right-click the project in NetBeans and choose &quot;Test&quot;, or use the command line to invoke using the following command&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;./gradlew test&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If the database table has not yet been created, then it will be generated for you.&amp;nbsp; Note that you may need to modify the database configuration within application.yml accordingly for your environment.&lt;/div&gt;
&lt;h2&gt;
Running the Service&lt;/h2&gt;
&lt;div&gt;
Micronaut is self-contained, allowing a service to be executed using the embedded server which is built on Netty.&amp;nbsp; This can be done by right-clicking the project in Apache NetBeans and selecting &quot;Run&quot;.&amp;nbsp; You could also go to the command line and invoke using the following command:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;./gradlew run&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You should see the URL on which the server is hosted displayed within the output in the terminal or Apache NetBeans output panel.&lt;/div&gt;
&lt;h2&gt;
Summary&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As a Java EE developer, I have to say that Micronaut does have a different development approach.&amp;nbsp; It is not too much different than that of Spring Boot or Grails, but it is different enough that it took me some time to find my way around.&amp;nbsp; In the end, I find it an easy to use framework that has a lot of potential for quickly developing services or scheduled tasks, while still harnessing some of the concepts from Java EE/Jakarta EE.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are a number of features that I&#39;ve not played much with yet, such as creating scheduled tasks via the Micronaut framework, and developing using Groovy or Kotlin, rather than Java.&amp;nbsp; I hope to follow up to this post in the future with more information for Java EE and Jakarta EE developers who are interested in beginning their journey with Micronaut.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
GitHub Project:&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://github.com/juneau001/micronaut-books&quot;&gt;https://github.com/juneau001/micronaut-books&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Micronaut JPA-Hibernate Guide:&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://guides.micronaut.io/micronaut-data-access-jpa-hibernate/guide/index.html&quot;&gt;http://guides.micronaut.io/micronaut-data-access-jpa-hibernate/guide/index.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>https://jj-blogger.blogspot.com/2018/09/micronaut-for-java-eejakarta-ee.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPX7qT4lrQcrye2DnazaxwqYn8Hk6ytylEISqz3WMS96xGC1Y7wWANlntDZYHVCY8Frhn8MaLwtN3WlLhAWywuLzffNPZGuYnVM7QinNmDSNRFoMjqgv3og_S_reTNMaj_wjl04w/s72-c/netbeans-project.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-1649399020463885374</guid><pubDate>Fri, 22 Jun 2018 17:12:00 +0000</pubDate><atom:updated>2018-06-22T10:12:03.627-07:00</atom:updated><title>Apache NetBeans 9.0 - How to Build &amp; Run the Latest</title><description>In my last post, I spoke about how to obtain the Release Candidate of Apache NetBeans 9.0.&amp;nbsp; There have been some changes made since the Release Candidate (including the addition of a very nice updated splash screen), so in this post I will cover how to build and run the latest sources.&amp;nbsp; I really is quite simple to run the latest code...here&#39;s how:&lt;br /&gt;
&lt;br /&gt;
1)&amp;nbsp; Clone the latest source code from the GitHub repository to your local machine:&lt;br /&gt;
&lt;br /&gt;
git clone&amp;nbsp;https://github.com/apache/incubator-netbeans.git&lt;br /&gt;
&lt;br /&gt;
2)&amp;nbsp; Open your terminal and traverse inside of the cloned directory named &quot;incubator-netbeans&quot;&lt;br /&gt;
&lt;br /&gt;
3)&amp;nbsp; Build the IDE using Apache Ant.&amp;nbsp; If you do not have it installed, please download from here:&amp;nbsp;https://ant.apache.org/&lt;br /&gt;
&lt;br /&gt;
To build, simply issue the &quot;ant&quot; command from within the &quot;incubator-netbeans&quot; directory.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg6m76A-NOp5DTZG8c3XfMYZM3POqnQwChUOxo5lMl0pN-kPPYyWTS6M_uKbqiqzmD4gAQAGwYMuVoTtMS31XTnR-32_m1CPxmz8cnXAL8Y6wilANKgyTPPXJUJoDMTfl6BwH8zA/s1600/nb-build.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;819&quot; data-original-width=&quot;1600&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg6m76A-NOp5DTZG8c3XfMYZM3POqnQwChUOxo5lMl0pN-kPPYyWTS6M_uKbqiqzmD4gAQAGwYMuVoTtMS31XTnR-32_m1CPxmz8cnXAL8Y6wilANKgyTPPXJUJoDMTfl6BwH8zA/s320/nb-build.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
4)&amp;nbsp; The build process will take several minutes, as it obtains all of the dependencies and performs the compilation process.&amp;nbsp; Once completed, open the incubator-netbeans/nbbuild directory, and you should see a directory entitled &quot;netbeans&quot;.&amp;nbsp; Inside this directory are all of the files required to run the Apache NetBeans IDE.&amp;nbsp; You can run the IDE by invoking the incubator-netbeans/nbbuild/netbeans/bin/netbeans executable.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6CfeTCti_5Aorlj8xRPKAeiJLwNuk9ExqIXkqeEtR71MCzZf3ZzXirvZZciEcfgi5LDc08M8uhGFQms1xTDZdi27zjw3NKcXfwCtwedZ-l5WDD9nx831O06LINMpou4jLmDHx0w/s1600/nb-directories1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;922&quot; data-original-width=&quot;1600&quot; height=&quot;184&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6CfeTCti_5Aorlj8xRPKAeiJLwNuk9ExqIXkqeEtR71MCzZf3ZzXirvZZciEcfgi5LDc08M8uhGFQms1xTDZdi27zjw3NKcXfwCtwedZ-l5WDD9nx831O06LINMpou4jLmDHx0w/s320/nb-directories1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Once the executable is started, you will be presented with the new Apache NetBeans 9.0 splash screen, and you can then begin to use the latest build.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3gzBl7tUR-gPCJFgpOJ_qFsBbsHDdhajLA4kp-x74IhMhv0YSdCeV3BdwzBQXPv6UGMYZd9_vna9zzmFRb12OUxqLmjdWgjB8QjRVWlLGyTG6HHSs0LHWoPZtdLKkCHWef2FeQA/s1600/nb-splash.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;300&quot; data-original-width=&quot;473&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3gzBl7tUR-gPCJFgpOJ_qFsBbsHDdhajLA4kp-x74IhMhv0YSdCeV3BdwzBQXPv6UGMYZd9_vna9zzmFRb12OUxqLmjdWgjB8QjRVWlLGyTG6HHSs0LHWoPZtdLKkCHWef2FeQA/s320/nb-splash.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>https://jj-blogger.blogspot.com/2018/06/apache-netbeans-90-how-to-build-run.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg6m76A-NOp5DTZG8c3XfMYZM3POqnQwChUOxo5lMl0pN-kPPYyWTS6M_uKbqiqzmD4gAQAGwYMuVoTtMS31XTnR-32_m1CPxmz8cnXAL8Y6wilANKgyTPPXJUJoDMTfl6BwH8zA/s72-c/nb-build.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-7186457973013524520</guid><pubDate>Mon, 21 May 2018 11:53:00 +0000</pubDate><atom:updated>2018-05-21T04:55:40.642-07:00</atom:updated><title>Apache NetBeans 9.0 - Release Candidate Review</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijtjfoHzRrVTxbfuXDHkbUpgu_py0MW6pW1ts0n6lnmofkrhUmRUjl4MFuCsG3lptUofJaMfopPIKd-l0-Cj07v565uwhfbVNjk6TPbueiCCD_usVZVwGoP-Id1HatW73psoHqkA/s1600/apachenetbeans-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;51&quot; data-original-width=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijtjfoHzRrVTxbfuXDHkbUpgu_py0MW6pW1ts0n6lnmofkrhUmRUjl4MFuCsG3lptUofJaMfopPIKd-l0-Cj07v565uwhfbVNjk6TPbueiCCD_usVZVwGoP-Id1HatW73psoHqkA/s1600/apachenetbeans-logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
First, I want to thank all of the developers that have been working hard on the Apache NetBeans 9.0 release.&amp;nbsp; I am on the mailing lists and these developers have been working around the clock to ensure that this release is solid.&amp;nbsp; I was part of the NetBeans 9.0 NETCAT testing team for the profiler tool this year.&amp;nbsp; I only contributed a few hours of testing, but it was a great experience to be part of the team helping to move NetBeans forward.&amp;nbsp; There are plenty of people who have contributed dozens of hours...so thank you!&lt;br /&gt;
&lt;br /&gt;
Release Candidate 1 (currently in testing and not yet officially released) can be downloaded using the following links:&lt;br /&gt;
&lt;br /&gt;
Build Artifacts:&lt;br /&gt;
&lt;a data-saferedirecturl=&quot;https://www.google.com/url?hl=en&amp;amp;q=https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-java/incubating-9.0-rc1-rc1&amp;amp;source=gmail&amp;amp;ust=1526755662390000&amp;amp;usg=AFQjCNGJDP1vaYJ5xzhylyDrc917i3nMRw&quot; href=&quot;https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-java/incubating-9.0-rc1-rc1&quot; rel=&quot;noreferrer&quot; style=&quot;background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;&quot; target=&quot;_blank&quot;&gt;https://dist.apache.org/repos/&lt;wbr&gt;&lt;/wbr&gt;dist/dev/incubator/netbeans/&lt;wbr&gt;&lt;/wbr&gt;incubating-netbeans-java/&lt;wbr&gt;&lt;/wbr&gt;incubating-9.0-rc1-rc1&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
ZIP Artifact:&lt;br /&gt;
&lt;a data-saferedirecturl=&quot;https://www.google.com/url?hl=en&amp;amp;q=https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-java/incubating-9.0-rc1-rc1/incubating-netbeans-java-9.0-rc1-source.zip&amp;amp;source=gmail&amp;amp;ust=1526755662390000&amp;amp;usg=AFQjCNGet5CFdcFxKOBy5M5l2vXSKp-6wg&quot; href=&quot;https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-java/incubating-9.0-rc1-rc1/incubating-netbeans-java-9.0-rc1-source.zip&quot; rel=&quot;noreferrer&quot; style=&quot;background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;&quot; target=&quot;_blank&quot;&gt;https://dist.apache.org/repos/&lt;wbr&gt;&lt;/wbr&gt;dist/dev/incubator/netbeans/&lt;wbr&gt;&lt;/wbr&gt;incubating-netbeans-java/&lt;wbr&gt;&lt;/wbr&gt;incubating-9.0-rc1-rc1/&lt;wbr&gt;&lt;/wbr&gt;incubating-netbeans-java-9.0-&lt;wbr&gt;&lt;/wbr&gt;rc1-source.zip&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This release of NetBeans constitutes all of the modules within the Apache NetBeans GitHub repository ((https://github.com/apache/incubator-netbeans).&amp;nbsp; These modules include the NetBeans Platform and the full IDE for Java SE development.&lt;br /&gt;
&lt;br /&gt;
There are still a number of tasks that will need to be performed before moving forward, but Release Candidate 1 is a huge step.&amp;nbsp; In the coming days/weeks, there will likely be another release candidate which will include some final pieces, such as a new splash screen.&amp;nbsp; We are getting very close to the official Apache NetBeans IDE 9.0 release.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that this first release does not include the transfer of all NetBeans modules.&amp;nbsp; For instance, the Java EE modules have not yet been transferred or included in Apache NetBeans 9.0.&amp;nbsp; That transfer will occur sometime in the future.&amp;nbsp; However, it is still possible to develop Java EE applications using Apache NetBeans 9.0 by simply installing the Java EE related NetBeans 8.2 plugins.&amp;nbsp; I am doing this today and it works well!&lt;br /&gt;
&lt;br /&gt;
Stay tuned during the coming weeks for the official release of Apache NetBeans 9.0.&amp;nbsp; In the meantime, get involved!&amp;nbsp; Please download the Release Candidate and take it for a spin.&amp;nbsp; Join the NetBeans developer mailing list to provide feedback and/or vote on upcoming release candidates.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://netbeans.apache.org/&quot;&gt;https://netbeans.apache.org/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>https://jj-blogger.blogspot.com/2018/05/apache-netbeans-90-release-candidate.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijtjfoHzRrVTxbfuXDHkbUpgu_py0MW6pW1ts0n6lnmofkrhUmRUjl4MFuCsG3lptUofJaMfopPIKd-l0-Cj07v565uwhfbVNjk6TPbueiCCD_usVZVwGoP-Id1HatW73psoHqkA/s72-c/apachenetbeans-logo.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-7795875440388488832</guid><pubDate>Wed, 29 Nov 2017 14:31:00 +0000</pubDate><atom:updated>2020-06-19T04:13:31.676-07:00</atom:updated><title>Easy Java EE Microservices with Payara Micro</title><description>Wondering how to get started with Java EE Microservices?&amp;nbsp; It only takes a few quick steps to deploy a Microservice using Java EE APIs.&amp;nbsp; Many think that Java EE is too heavyweight for use with Microservices, but that is simply not the case...especially if you only utilize the Java EE specifications that are required by your service.&amp;nbsp; In this brief post, I&#39;ll demonstrate how to quickly develop a Microservice with Java EE and then deploy to Payara Micro.&lt;br /&gt;
&lt;br /&gt;
To download the example project, please go to GitHub:&amp;nbsp;&lt;a href=&quot;https://github.com/juneau001/SimpleService&quot;&gt;https://github.com/juneau001/SimpleService&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For the purposes of this example, I will utilize NetBeans, but any Java IDE will suffice.&amp;nbsp; To get started, create a Maven web application and name it SimpleService.&amp;nbsp; Next, create two Java packages:&amp;nbsp; org.simpleservice and org.simpleservice.entity.&amp;nbsp; Once complete, the project should resemble the following figure:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3idKywmb-zx35KBJ83DkF1Tgjj0djn1jzVtTIUHGHXPMCsFioVTWJ1x1kUyy3DlJE0kbqfW3ItvJPfDBeAwurEheZe3APs_ahnfsr7xnBlkI3bC8CyPC-rZXaP7rqv9Tkqdwc5g/s1600/microservice-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;240&quot; data-original-width=&quot;348&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3idKywmb-zx35KBJ83DkF1Tgjj0djn1jzVtTIUHGHXPMCsFioVTWJ1x1kUyy3DlJE0kbqfW3ItvJPfDBeAwurEheZe3APs_ahnfsr7xnBlkI3bC8CyPC-rZXaP7rqv9Tkqdwc5g/s320/microservice-1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now many believe that a Microservice should not connect to an enterprise database, but I will leave that for those who wish to debate.&amp;nbsp; In this example, I will connect this service to a central Apache derby database to obtain data because I believe this to be a very likely scenario in many organizations.&amp;nbsp; In this case, we&#39;ll create a &quot;Suggested Name&quot; database web service, which will query a database table of suggested names for the upcoming EE4J platform.&amp;nbsp; To create the infrastructure, connect to a local Apache Derby database and create it using the following SQL:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;create table SUGGESTED_NAME (
id numeric primary key,
name varchar(150));

insert into suggested_name values(1, &#39;Open EE&#39;);
insert into suggested_name values(2, &#39;Open JOE&#39;);
insert into suggested_name values(3, &#39;Cappucino&#39;);
&lt;/pre&gt;
&lt;br /&gt;
Next, open the Maven POM file for the SimpleService project and add the following dependencies:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;dependencies&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;javax.ws.rs&amp;lt;/groupId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;javax.ws.rs-api&amp;lt;/artifactId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.1&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;javax.persistence&amp;lt;/groupId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;javax.persistence-api&amp;lt;/artifactId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;javax.validation&amp;lt;/groupId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;validation-api&amp;lt;/artifactId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.0.0.Final&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;javax.ejb&amp;lt;/groupId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;javax.ejb-api&amp;lt;/artifactId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;3.2&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;jar&amp;lt;/type&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;eclipselink&amp;lt;/artifactId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.eclipse.persistence&amp;lt;/groupId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;org.eclipse.persistence.jpa.modelgen.processor&amp;lt;/artifactId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.derby&amp;lt;/groupId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;derbyclient&amp;lt;/artifactId&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;10.14.1.0&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dependency&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/dependencies&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
Note that there is no Java EE dependency.&amp;nbsp; This is because I am utilizing only those dependencies that are required for the service.&amp;nbsp; Each dependency is added separately.&lt;br /&gt;
&lt;br /&gt;
Next, create a package org.simpleservice.entity, and create an entity class named SuggestedName within it.&amp;nbsp; For brevity, I&#39;m not going into all of the sources here, but you can check the sources out on GitHub (&lt;a href=&quot;https://github.com/juneau001/SimpleService&quot;&gt;https://github.com/juneau001/SimpleService&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
We&#39;ll need to implement our JAX-RS web service class next.&amp;nbsp; To configure the Java EE application for JAX-RS, let&#39;s create a class named ApplicationConfig and place it within the org.simpleservice package:&lt;br /&gt;
&lt;pre&gt;import java.util.Set;
import javax.ws.rs.core.Application;

/**
&amp;nbsp;*
&amp;nbsp;* @author Juneau
&amp;nbsp;*/
@javax.ws.rs.ApplicationPath(&quot;rest&quot;)
public class ApplicationConfig extends Application {
&amp;nbsp; &amp;nbsp; @Override
&amp;nbsp; &amp;nbsp; public Set&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt; getClasses() {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt; resources = new java.util.HashSet&amp;lt;&amp;gt;();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resources.add(org.simpleservice.SuggestedNameService.class);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return resources;
&amp;nbsp; &amp;nbsp; }
}
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Next, I&#39;ll create the JAX-RS web service class itself, and I will name it SuggestedNameService.&amp;nbsp; Here are the sources for the SuggestedNameService class.&amp;nbsp; Note that I have injected a Persistence Unit.&amp;nbsp; I will get to that next.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;div&gt;
&lt;div&gt;
@Stateless&lt;/div&gt;
&lt;div&gt;
@Path(&quot;suggestedNameService&quot;)&lt;/div&gt;
&lt;div&gt;
public class SuggestedNameService {&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @PersistenceContext(unitName = &quot;SimpleService_1.0PU&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private EntityManager em;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @GET&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Path(&quot;{id}&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public SuggestedName find(@PathParam(&quot;id&quot;) BigDecimal id) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SuggestedName suggestedName = null;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; suggestedName = (SuggestedName)&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; em.createQuery(&quot;select object(o) from&amp;nbsp;SuggesetedName o &quot; +&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;where o.id = :id&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .setParameter(&quot;id&quot;, id)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .getSingleResult();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (NoResultException ex){&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Error: &quot;&amp;nbsp; + ex);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return suggestedName;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @GET&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public List&amp;lt;SuggestedName&amp;gt; findAll() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;SuggestedName&amp;gt; suggestedNames = null;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; suggestedNames = em.createQuery(&quot;select object(o) from SuggestedName o&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .getResultList();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (NoResultException ex){&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Error: &quot;&amp;nbsp; + ex);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return suggestedNames;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; protected EntityManager getEntityManager() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return em;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div&gt;
Since this service will connect to a database, I will create a persistence unit for the project.&amp;nbsp; This can be easily done in NetBeans by right-clicking the project and choosing New-&amp;gt;Persistence-&amp;gt;Persistence Unit.&amp;nbsp; Name the persistence unit SimpleService_1.0PU and use EclipseLink as the provider.&amp;nbsp; Do not add a data source at this point.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDFTBeFpJk4xkyNmD7g5H7BO4sYOljGFEiCQG4plQvziDrmLZnIMQbwqDVxFLGWL3lGywObZhpecF91eYg3ZVagHaw9VggSuwLvcEdK2-rZZZ_Y5feSOcMmsAYrQLR_HQLGxVlrA/s1600/microservice-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;503&quot; data-original-width=&quot;783&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDFTBeFpJk4xkyNmD7g5H7BO4sYOljGFEiCQG4plQvziDrmLZnIMQbwqDVxFLGWL3lGywObZhpecF91eYg3ZVagHaw9VggSuwLvcEdK2-rZZZ_Y5feSOcMmsAYrQLR_HQLGxVlrA/s320/microservice-2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
Once created, open the Persistence Unit and add the connection information.&amp;nbsp; In this case, I will connect to a JTA data source that I&#39;ll define next.&amp;nbsp; The data source is named DerbyDataSource, so the content of the Persistence Unit (persistence.xml) should look as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;div&gt;
&lt;div&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&lt;/div&gt;
&lt;div&gt;
&amp;lt;persistence version=&quot;2.1&quot; xmlns=&quot;http://xmlns.jcp.org/xml/ns/persistence&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;persistence-unit name=&quot;AuthorService_1.0PU&quot; transaction-type=&quot;JTA&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;jta-data-source&amp;gt;java:global/DerbyDataSource&amp;lt;/jta-data-source&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;exclude-unlisted-classes&amp;gt;false&amp;lt;/exclude-unlisted-classes&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;properties/&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/persistence-unit&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/persistence&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div&gt;
Create a web.xml deployment descriptor for the project.&amp;nbsp; If doing this within NetBeans, simply right-click the project and choose New-&amp;gt;Web-&amp;gt;&quot;Standard Deployment Descriptor (web.xml) and click Finish.&amp;nbsp; Once the web.xml deployment descriptor has been generated, add the data source to it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;div&gt;
&lt;div&gt;
&amp;lt;web-app xmlns=&quot;http://xmlns.jcp.org/xml/ns/javaee&quot;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xsi:schemaLocation=&quot;http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;version=&quot;3.1&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;session-config&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;session-timeout&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/session-timeout&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/session-config&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;data-source&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;name&amp;gt;java:global/DerbyDataSource&amp;lt;/name&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;class-name&amp;gt;org.apache.derby.jdbc.ClientDriver&amp;lt;/class-name&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;server-name&amp;gt;localhost&amp;lt;/server-name&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;port-number&amp;gt;1527&amp;lt;/port-number&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;url&amp;gt;jdbc:derby://localhost:1527/acme&amp;lt;/url&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;user&amp;gt;acmeuser&amp;lt;/user&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;password&amp;gt;yourpassword&amp;lt;/password&amp;gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/data-source&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;lt;/web-app&amp;gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;div&gt;
That&#39;s it for the Java EE application.&amp;nbsp; You should now be able to compile the project into a WAR file and deploy to GlassFish, Payara, or another Java EE application server of your choice.&amp;nbsp; In this case, let&#39;s deploy to Payara Micro.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To begin, download the latest Payara Micro JAR file from the website:&amp;nbsp;https://www.payara.fish/payara_micro&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Once downloaded, the server can be started up by opening a command prompt and executing the JAR with your local Java runtime by typing:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;java -jar payara-micro-4.1.2.174.jar
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To deploy the application (microservice) that we&#39;ve created, simply utilize the --deploy option when executing the Payara Micro JAR, and point it to the SimpleService WAR file:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;java -jar payara-micro-4.1.2.174.jar --deploy SimpleService-1.0.war
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The SimpleService microservice can now be accessed via the following URL:&amp;nbsp;&amp;nbsp;http://localhost:8080/SimpleService-1.0/rest/suggestedNameService&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;&quot;&gt;
To learn more about Java EE:&amp;nbsp;&lt;a href=&quot;https://examples.javacodegeeks.com/what-is-java-ee/&quot; target=&quot;_blank&quot;&gt;https://examples.javacodegeeks.com/what-is-java-ee/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>https://jj-blogger.blogspot.com/2017/11/easy-java-ee-microservices-with-payara.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3idKywmb-zx35KBJ83DkF1Tgjj0djn1jzVtTIUHGHXPMCsFioVTWJ1x1kUyy3DlJE0kbqfW3ItvJPfDBeAwurEheZe3APs_ahnfsr7xnBlkI3bC8CyPC-rZXaP7rqv9Tkqdwc5g/s72-c/microservice-1.png" height="72" width="72"/><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-5028777776091608241</guid><pubDate>Sat, 04 Nov 2017 18:08:00 +0000</pubDate><atom:updated>2017-11-04T11:08:15.608-07:00</atom:updated><title>Utilizing Apache NetBeans with JDK 9</title><description>Did you know that you can build Apache NetBeans from scratch today and utilize the latest JDK 9 features?&amp;nbsp; Here is how to do it:&lt;br /&gt;
&lt;br /&gt;
Clone the NetBeans Incubator sources to your machine:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;git clone&amp;nbsp;https://github.com/apache/incubator-netbeans&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Build using JDK 8 and Ant 1.9.9 by traversing into the cloned incubator-netbeans directory and invoking the ant build:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ant&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
Once the build is complete, traverse into the nbbuild/netbeans directory to see the resulting IDE build.&amp;nbsp; Run the IDE by invoking the executable or shell script contained within nbbuild/netbeans/bin.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG1hS1Ck9Mf3j-iroBIHUnG4QcE8AvOPDR-MeBrWLxb3kbZncmsX7NbPJFwRTi0xO4GPh4KAL0b2M2Csoe6NPG3CeAO3_-JK4123nSUTDw714BVuQJSlZyhBn8wfxJLqh_WIMtpQ/s1600/nb9build.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1270&quot; data-original-width=&quot;1082&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG1hS1Ck9Mf3j-iroBIHUnG4QcE8AvOPDR-MeBrWLxb3kbZncmsX7NbPJFwRTi0xO4GPh4KAL0b2M2Csoe6NPG3CeAO3_-JK4123nSUTDw714BVuQJSlZyhBn8wfxJLqh_WIMtpQ/s320/nb9build.png&quot; width=&quot;272&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>https://jj-blogger.blogspot.com/2017/11/utilizing-apache-netbeans-with-jdk-9.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG1hS1Ck9Mf3j-iroBIHUnG4QcE8AvOPDR-MeBrWLxb3kbZncmsX7NbPJFwRTi0xO4GPh4KAL0b2M2Csoe6NPG3CeAO3_-JK4123nSUTDw714BVuQJSlZyhBn8wfxJLqh_WIMtpQ/s72-c/nb9build.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-930710407084625437</guid><pubDate>Sat, 09 Sep 2017 05:41:00 +0000</pubDate><atom:updated>2017-09-09T10:04:59.046-07:00</atom:updated><title>Open EE:  My Thoughts on an Open Java EE Platform</title><description>About two years ago, thousands of Java developers attended the JavaOne 2015 conference and learned about specifications and features that would be part of the Java EE 8 platform. &amp;nbsp;These features included the MVC 1.0 specification, Java EE Security 1.0, Microservices, CDI and more. &amp;nbsp;Java EE 8 was shaping up to be a great follow-up to the excellent Java EE 7 release. &lt;br /&gt;
&lt;br /&gt;
After JavaOne 2015, progress and news around Java EE went silent. &amp;nbsp;In early January 2016, I received an invite to a Slack group that was created by some members of the Java EE community. &amp;nbsp;On the Slack channel, there were discussions around the halt of Java EE, and what the community may be able to do in order to keep it moving forward. &amp;nbsp;I was humbled by the sense of community from the members of the channel and the devotion to the platform was very evident. &amp;nbsp;Not long after, the Java EE Guardians were formed, &lt;a href=&quot;http://jj-blogger.blogspot.com/2016/04/java-ee-8-what-is-current-status-case.html&quot; target=&quot;_blank&quot;&gt;focusing on publicizing the stall of Java EE&lt;/a&gt;. &amp;nbsp;The group put forth effort pressuring Oracle to make a statement and continue moving Java EE forward. &amp;nbsp;Especially in this fast paced space, looming silence regarding the future of any technology can be taxing on those involved. &amp;nbsp;Others worked on the Java EE specifications as much as possible, making strides forward.&lt;br /&gt;
&lt;br /&gt;
After almost a year of silence, we started to hear music around Java EE again, and at JavaOne 2016 Oracle unveiled the plan to continue moving Java EE 8 forward, albeit a bit differently than originally planned. &amp;nbsp;The newly envisioned Java EE centered around Microservices and dropped a few of the specifications that no longer fit into the puzzle. &amp;nbsp;MVC 1.0, JMS 2.1, and Management 2.0 were taken out of the picture, while the newly proposed Health Checking and Configuration APIs were added. &amp;nbsp;&lt;a href=&quot;http://www.agilejava.eu/2017/01/18/mvc-1-0-is-back/&quot; target=&quot;_blank&quot;&gt;MVC was eventually handed over to the community&lt;/a&gt;, which I think was a great move. &amp;nbsp;The Health Checking and Configuration APIs, which were clearly aimed toward microservices support, were later taken out of the picture for Java EE 8 due to lack of time. &amp;nbsp;&lt;a href=&quot;http://arjan-tijms.omnifaces.org/2017/03/jsf-23-released.html&quot; target=&quot;_blank&quot;&gt;Java EE 8 had more community involvement than any previous Java EE release, and much of this is likely due to the hiatus&lt;/a&gt;. &amp;nbsp;Java EE 8 moves forward, albeit a bit more lean than originally planned, we are moving forward. &lt;br /&gt;
&lt;br /&gt;
Now, nearing the JavaOne 2017 conference, we are on the heels of a Java EE 8 release. &amp;nbsp;This release includes much of the original core Java EE 8 plan, bringing the Java EE platform in-line with Java SE 8. &amp;nbsp;It also enhances CDI support throughout the specifications, brings forth Security 1.0, which is long overdue, and JSON-B, closing the JSON to Java conversion gap that was left after JSON-P was released. &amp;nbsp;Java EE 8 will be a solid release, and I am thankful to all who are involved in making it happen. &amp;nbsp;I am sorry to say that I will not be at the JavaOne conference this year when it will likely be released, but I know that my colleagues will keep me in-tune with the latest news coming from the conference! &amp;nbsp;If you are going, make sure you check out the many great Java EE talks that will be presented.&lt;br /&gt;
&lt;br /&gt;
Almost like a professional sports superstar going out on a high note, Oracle recently announced that they are planning to open source Java EE. &amp;nbsp;I have to applaud Oracle for all of the great work they&#39;ve done and the support that they&#39;ve given to Java EE through the years. &amp;nbsp;I am hopeful that they will remain engaged even after Java EE is open sourced, as they are a very important player in this space. &amp;nbsp;In my mind, they chose a perfect time to announce the opening of Java EE, as the Java EE 8 release will mark a great milestone making Java EE even more productive and relevant as one of the top application development platforms in the industry. &amp;nbsp;The community around Java EE seems as though it has never been more engaged than it is now. &amp;nbsp;Over the years since the cumbersome J2EE morphed into the productive platform that we call Java EE today, the community has continued to grow by the thousands. &amp;nbsp;The Java EE Guardians have thousands of supporters, each of them hoping to help move Java EE forward for years to come.&lt;br /&gt;
&lt;br /&gt;
I see a great future for an open Java EE. &amp;nbsp;However, many questions are left to be answered. &amp;nbsp;Will the JCP still be used to manage the changes that are proposed for the platform? &amp;nbsp;Perhaps this is one of the questions that has the potential to impact the platform the most. &amp;nbsp;If the JCP will still be used to manage the platform, can it be changed in such a way that it will be conducive to a faster moving platform? &amp;nbsp;Do we want Java EE to become a faster moving platform, much to the likes of other frameworks such as Spring? &lt;br /&gt;
&lt;br /&gt;
One of the main strongholds of Java EE is standardization. &amp;nbsp;If the open Java EE were to become more dynamic, can it maintain its place as a standard in the industry? &amp;nbsp;I think so. &amp;nbsp;I think that ideally the JCP could still be used to move the specifications forward, with a bit of a modernizing on the approach. &amp;nbsp;I like the idea of having shorter Java EE release cycles with fewer changes in each release. &amp;nbsp;Such an approach can really help the platform to retain its relevancy in this fast moving space.&lt;br /&gt;
&lt;br /&gt;
What are your thoughts on the opening of Java EE? &amp;nbsp;I welcome it and look forward to seeing what is to come for JavaOne 2018.</description><link>https://jj-blogger.blogspot.com/2017/09/open-ee-my-thoughts-on-open-java-ee.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-4448318737822838800</guid><pubDate>Wed, 26 Jul 2017 12:29:00 +0000</pubDate><atom:updated>2017-07-26T05:29:51.451-07:00</atom:updated><title>Java EE 8:  Start Testing Today</title><description>Java EE 8 will be finalized and ready for public use soon. &amp;nbsp;There is no better time to get started testing the new features than now. &amp;nbsp;You can do so by grabbing a copy of my &lt;a href=&quot;https://github.com/juneau001/JavaEE8-Playground&quot; target=&quot;_blank&quot;&gt;Java EE 8 Playground project&lt;/a&gt; and deploying to &lt;a href=&quot;http://download.oracle.com/glassfish/5.0/promoted/index.html&quot; target=&quot;_blank&quot;&gt;GlassFish 5&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve just updated the project to repair bugs and include better formatted table data within the tables. &amp;nbsp;I&#39;ve also added a couple of examples:&lt;br /&gt;
&lt;br /&gt;
- JSON-B example: Allows one to fetch the JSON for customer objects. &lt;br /&gt;
&lt;br /&gt;
- CDI 2.0 Async: &amp;nbsp;Add a new Job object to see async event output in server log&lt;br /&gt;
&lt;br /&gt;
GitHub Project: &amp;nbsp;https://github.com/juneau001/JavaEE8-Playground</description><link>https://jj-blogger.blogspot.com/2017/07/java-ee-8-start-testing-today.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-1859548177221800055</guid><pubDate>Sat, 10 Jun 2017 14:57:00 +0000</pubDate><atom:updated>2020-01-25T22:18:05.824-08:00</atom:updated><title>Java 9 Recipes Published!</title><description>A bit ahead of schedule, my latest book entitled Java 9 Recipes: A Problem-Solution Approach, has just been published! &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrEh_dLh6p4yhACXAisDB5uWFAHgmFKK5tXzenfTkD58a6DEBQjhCsEspRSNLcrgIRy0QInKmFmhCHqSnzWZU-Y3zvDjBirHTaNpItsuW-3mm_oThCUnNTHZElLIFGgkHJOyKLPg/s1600/9781484219751.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1181&quot; data-original-width=&quot;827&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrEh_dLh6p4yhACXAisDB5uWFAHgmFKK5tXzenfTkD58a6DEBQjhCsEspRSNLcrgIRy0QInKmFmhCHqSnzWZU-Y3zvDjBirHTaNpItsuW-3mm_oThCUnNTHZElLIFGgkHJOyKLPg/s320/9781484219751.jpg&quot; width=&quot;224&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This book is the 3rd Edition in the Java Recipes series. &amp;nbsp;It covers all of the information that was in the previous editions, including the new content for Java 9. &amp;nbsp;Specifically, you will learn how to use new Java 9 features including:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Modularity&lt;/li&gt;
&lt;li&gt;Private Method Implementations in Interfaces&lt;/li&gt;
&lt;li&gt;Process API Enhancements&lt;/li&gt;
&lt;li&gt;New Streams API Enhancements&lt;/li&gt;
&lt;li&gt;HTTP/2 Client API&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
I&#39;d like to thank Apress for providing me with the opportunity to help share my knowledge of the Java platform.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Helvetica; font-size: 12px; font-stretch: normal; line-height: normal;&quot;&gt;
For more information on using Java 9, check out the tutorials found in this post:&amp;nbsp;&lt;a href=&quot;https://www.javacodegeeks.com/java-9-tutorials&quot;&gt;https://www.javacodegeeks.com/java-9-tutorials&lt;/a&gt;&lt;/div&gt;
</description><link>https://jj-blogger.blogspot.com/2017/06/java-9-recipes-published.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrEh_dLh6p4yhACXAisDB5uWFAHgmFKK5tXzenfTkD58a6DEBQjhCsEspRSNLcrgIRy0QInKmFmhCHqSnzWZU-Y3zvDjBirHTaNpItsuW-3mm_oThCUnNTHZElLIFGgkHJOyKLPg/s72-c/9781484219751.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-1647594588148616621</guid><pubDate>Wed, 29 Mar 2017 17:13:00 +0000</pubDate><atom:updated>2017-03-29T10:14:22.858-07:00</atom:updated><title>Testing the Java EE 8 Specifications</title><description>The Java EE 8 Platform has definitely been moving along within the past couple of months. &amp;nbsp;Specifications have been releasing early draft reviews, milestones, and even final releases. &amp;nbsp;As a matter of fact, JSR-372 has just gone final, as JSF 2.3 has been released. &amp;nbsp;For more information, please see &lt;a href=&quot;http://arjan-tijms.omnifaces.org/2017/03/jsf-23-released.html&quot; target=&quot;_blank&quot;&gt;Arjan&#39;s Post&lt;/a&gt;. &amp;nbsp;It had the privilege to be a part of the JSR-372 expert group, and I really appreciate the opportunity to work with these experts on a specification that I use every day.&lt;br /&gt;
&lt;br /&gt;
I created a &lt;a href=&quot;https://github.com/juneau001/JavaEE8-Playground&quot; target=&quot;_blank&quot;&gt;Github Project&lt;/a&gt; entitled the Java EE 8 Playground, and it includes a Java EE application that contains a number of the latest updates to those specifications that will be part of the Java EE 8 release. &amp;nbsp;I will make an effort to update this project often so that it includes current dependencies for the specifications. &amp;nbsp;I will also try to add demos for the specifications so that it will be easy to build upon the examples. &amp;nbsp;In the current project, some of the JSF 2.3 features are used.&lt;br /&gt;
&lt;br /&gt;
It is important that as a community we test and provide feedback for the Java EE 8 specifications as they are being developed. &amp;nbsp;It is in these stages that you have a voice that can make a change to an upcoming specification. &amp;nbsp;Please test, read the latest specification documents, and provide feedback to the respective JSRs.&lt;br /&gt;
&lt;br /&gt;
Java EE 8 Playground Project: &amp;nbsp;&lt;a href=&quot;https://github.com/juneau001/JavaEE8-Playground&quot;&gt;https://github.com/juneau001/JavaEE8-Playground&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Java EE 8 JSRs:&lt;br /&gt;
&lt;br /&gt;
JSR 365 (CDI 2.0): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=365&quot;&gt;https://www.jcp.org/en/jsr/detail?id=365&lt;/a&gt;&lt;br /&gt;
JSR 366 (Java EE 8): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=366&quot;&gt;https://www.jcp.org/en/jsr/detail?id=366&lt;/a&gt;&lt;br /&gt;
JSR 367 (JSON Binding): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=367&quot;&gt;https://www.jcp.org/en/jsr/detail?id=367&lt;/a&gt;&lt;br /&gt;
JSR 369 (Servlet 4.0): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=369&quot;&gt;https://www.jcp.org/en/jsr/detail?id=369&lt;/a&gt;&lt;br /&gt;
JSR 370 (JAX-RS 2.1): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=370&quot;&gt;https://www.jcp.org/en/jsr/detail?id=370&lt;/a&gt;&lt;br /&gt;
JSR 372 (JSF 2.3 - FINAL): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=372&quot;&gt;https://www.jcp.org/en/jsr/detail?id=372&lt;/a&gt;&lt;br /&gt;
JSR 374 (JSON &amp;nbsp;Processing 1.1): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=374&quot;&gt;https://www.jcp.org/en/jsr/detail?id=374&lt;/a&gt;&lt;br /&gt;
JSR 375 (Java EE Security 1.0): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=375&quot;&gt;https://www.jcp.org/en/jsr/detail?id=375&lt;/a&gt;&lt;br /&gt;
JSR 380 (Bean Validation 2.0): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=380&quot;&gt;https://www.jcp.org/en/jsr/detail?id=380&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
JSR 371 (MVC - No longer officially part of Java EE 8): &amp;nbsp;&lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=371&quot;&gt;https://www.jcp.org/en/jsr/detail?id=371&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>https://jj-blogger.blogspot.com/2017/03/testing-java-ee-8.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-8784034496056930581</guid><pubDate>Sat, 04 Mar 2017 15:53:00 +0000</pubDate><atom:updated>2017-03-04T07:53:31.496-08:00</atom:updated><title>JSR 365 Update:  Digging Into CDI 2.0</title><description>Contexts and Dependency Injection 2.0 (&lt;a href=&quot;https://jcp.org/en/jsr/detail?id=365&quot; target=&quot;_blank&quot;&gt;JSR 365&lt;/a&gt;), is an update to CDI 1.2, which is currently part of the Java EE 7 platform. &amp;nbsp;It is currently in &lt;a href=&quot;https://jcp.org/en/jsr/stage?listBy=public&quot; target=&quot;_blank&quot;&gt;Public Review stage&lt;/a&gt;. &amp;nbsp;For those of you who are not very familiar with CDI, it defines a powerful set of complimentary services that act as a gel that help to improve the coordination and structure of application code. &amp;nbsp;For more details, please visit the &lt;a href=&quot;http://www.cdi-spec.org/&quot; target=&quot;_blank&quot;&gt;specification page&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
CDI 2.0 expands the usability of the Contexts and Dependency Injection services to Java SE as well, as it will now target both the Java SE and Java EE platforms. &amp;nbsp;The CDI specification has been organized into 3 parts, &lt;a href=&quot;http://docs.jboss.org/cdi/spec/2.0-PRD/cdi-spec.html#part_1&quot; target=&quot;_blank&quot;&gt;Part I - Core CDI&lt;/a&gt;, &lt;a href=&quot;http://docs.jboss.org/cdi/spec/2.0-PRD/cdi-spec.html#part_2&quot; target=&quot;_blank&quot;&gt;Part II - CDI in Java SE&lt;/a&gt;, and &lt;a href=&quot;http://docs.jboss.org/cdi/spec/2.0-PRD/cdi-spec.html#part_3&quot; target=&quot;_blank&quot;&gt;Part III - CDI in Java EE&lt;/a&gt;. &amp;nbsp;The major changes for CDI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Better alignment with Java SE 8&lt;/li&gt;
&lt;li&gt;API for booting CDI within a Java SE application&lt;/li&gt;
&lt;li&gt;Ability to provide observer ordering&lt;/li&gt;
&lt;li&gt;Ability to fire asynchronous events&lt;/li&gt;
&lt;li&gt;New Configurators Interfaces for Service Provider Interface (SPI) elements&lt;/li&gt;
&lt;li&gt;Ability to configure or veto an observer method in ProcessObserverEvent event&lt;/li&gt;
&lt;li&gt;Support for inline instantiation of specific annotation types&lt;/li&gt;
&lt;li&gt;Addition of the InterceptionFactory interface, &amp;nbsp;which allows to create a wrapper instance whose method invocations are intercepted by method interceptors and forwarded to a provided instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
I encourage you to take a look at the &lt;a href=&quot;http://docs.jboss.org/cdi/spec/2.0-PRD/cdi-spec.html&quot; target=&quot;_blank&quot;&gt;CDI 2.0 Public Review Draft&lt;/a&gt; for more details on the specifics of each enhancement listed, as well as a complete listing of new features. &amp;nbsp;Read through the draft and provide feedback to the expert group. &amp;nbsp;All of the pertinent details for providing feedback can be found on the &lt;a href=&quot;https://jcp.org/en/jsr/detail?id=365&quot; target=&quot;_blank&quot;&gt;JSR 365 page&lt;/a&gt;. &amp;nbsp;To get started testing, create a new maven based Java EE application in your &lt;a href=&quot;https://netbeans.org/&quot; target=&quot;_blank&quot;&gt;favorite IDE&lt;/a&gt;, and add the following dependencies:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dependency&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;groupid&amp;gt;javax.enterprise&amp;lt;/groupid&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;artifactid&amp;gt;cdi-api&amp;lt;/artifactid&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.0-PFD&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/dependency&amp;gt;&lt;br /&gt;
&amp;lt;dependency&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;groupid&amp;gt;org.jboss.weld&amp;lt;/groupid&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;artifactid&amp;gt;weld-core-bom&amp;lt;/artifactid&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;3.0.0.Alpha14&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;&lt;br /&gt;
&amp;lt;/dependency&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In this post, we will dig into one of the new features to get you started working with the API. &amp;nbsp;Let&#39;s take a look at asynchronous events. &amp;nbsp;Until CDI 2.0, &amp;nbsp;events could only be fired in a synchronous manner. &amp;nbsp;They&#39;ve been enhanced in this latest iteration for asynchronous processing. &amp;nbsp;Here&#39;s how it works:&lt;br /&gt;
&lt;br /&gt;
Create an event of some type. &amp;nbsp;Next, fire the event in an asynchronous manner, and handle accordingly once the event is complete. &amp;nbsp;In this example, I have created a MovieEvent class, which will be utilized whenever a persist event occurs for a Movie object. &amp;nbsp;The MovieEvent class is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;public class MovieEvent {
    
    private String message;
    private Movie movie;
    
    public MovieEvent(String message, Movie movie){
        this.message = message;
        this.movie = movie;
    }
    
    public String getMessage(){
        return this.message;
    }
    
    public void setMessage(String message){
        this.message = message;
    }
    
    public Movie getMovie(){
        return this.movie;
    }
    
    public void setMovie(Movie movie){
        this.movie = movie;
    }
    
}
&lt;/pre&gt;
&lt;br /&gt;
In the following scenario, we are firing an event when a new Movie is persisted. &amp;nbsp;The following code resides within a MovieController CDI bean of an example JSF application:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;@Named(&quot;movieController&quot;)
@SessionScoped
public class MovieController implements Serializable {

    @EJB
    private com.mycompany.cditest.session.MovieFacade ejbFacade;
    private List&lt;movie&gt; items = null;
    private Movie selected;
    
    @Inject
    Event&amp;lt;MovieEvent&amp;gt; movieEvents;&lt;movieevent&gt;
. . .
   private void persist(PersistAction persistAction, String successMessage) {
        if (selected != null) {
            setEmbeddableKeys();
            try {
                if (persistAction != PersistAction.DELETE) {
                    getFacade().edit(selected);
                    movieEvents.fireAsync(new MovieEvent(&quot;New Movie Released&quot;, selected))
                            .whenComplete((event, throwable) -&amp;gt; {
                                if(throwable != null){
                                    System.out.println(&quot;Error has occurred: &quot; + throwable.getMessage());
                                } else {
                                    System.out.println(&quot;Successful Movie Processing...&quot;);
                                }
                            });
                } else {
                    getFacade().remove(selected);
                }
                JsfUtil.addSuccessMessage(successMessage);
            } catch (Exception ex) {
                Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex);
                JsfUtil.addErrorMessage(ex, ResourceBundle.getBundle(&quot;/Bundle&quot;).getString(&quot;PersistenceErrorOccured&quot;));
            }
        }
. . .
&lt;/movieevent&gt;&lt;/movie&gt;&lt;/pre&gt;
&lt;br /&gt;
When the event is fired, it creates a new MovieEvent object, and if it successfully completes then a message is printed to indicate success. &amp;nbsp;In this example, a stream is used to process the &quot;whenComplete&quot; action. &lt;br /&gt;
&lt;br /&gt;
Feel free to clone the repository located at&amp;nbsp;&lt;a href=&quot;https://github.com/juneau001/CdiTest&quot;&gt;https://github.com/juneau001/CdiTest&lt;/a&gt; and take CDI 2.0 test for a spin. &amp;nbsp;This example is just one simple test of CDI 2.0. &amp;nbsp;You can clone and utilize this test project as a starting point to work with other aspects of the specification. &amp;nbsp;Keep an eye on JSR 365, which is currently in the Public Review Ballot stages.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>https://jj-blogger.blogspot.com/2017/03/jsr-365-update-digging-into-cdi-20.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-6018682033614928791</guid><pubDate>Wed, 28 Sep 2016 17:16:00 +0000</pubDate><atom:updated>2016-09-28T10:21:15.804-07:00</atom:updated><title>JavaOne 2016 Follow-Up</title><description>I had the pleasure of attending JavaOne this year, and I can sum up the experience in one word: &amp;nbsp;Brilliant. &amp;nbsp;This year was much different than in years past for me, as I had one talk to co-present on Sunday and I had the rest of the week wide open for attending sessions. &amp;nbsp;As such, I&#39;ve learned that it really is nice to have a lighter schedule at JavaOne so that you can take in all of the expertise and networking...that is what JavaOne is all about...learning from the experts and growing your network. &amp;nbsp;I also had my lovely wife along with for part of this trip, which made my stay in San Francisco very nice, as I finally took a few minutes to enjoy the city this year...never had done that in the past.&lt;br /&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;
My conference experience started off with the excellent NetBeans party on Saturday evening. &amp;nbsp;I am a member of the NetBeans Dream Team, so many of my colleagues were in attendance at this party. &amp;nbsp;It was the first time I had seen many old friends, and it was great to have a chance to catch up without needing to worry about rushing to the next session. &amp;nbsp;I want to thank Geertjan Wielenga and Oracle for hosting this excellent event, and I cannot wait until the next Apache NetBeans party.&lt;br /&gt;
&lt;br /&gt;
On Sunday at NetBeans Day, I had the pleasure of presenting &quot;Enterprise Modeling of MVC and Java EE Artifacts&quot; with experts Ivar Grimstad and Gaurav Gupta. &amp;nbsp;Ivar is on the expert group for &lt;a href=&quot;https://java.net/projects/mvc-spec/pages/Home&quot; target=&quot;_blank&quot;&gt;JSR 371 (MVC 1.0)&lt;/a&gt;...which we hope to move forward for use with Java EE 8. &amp;nbsp;Gaurav is the lead developer for the excellent &lt;a href=&quot;http://jpamodeler.github.io/&quot; target=&quot;_blank&quot;&gt;JPA Modeler&lt;/a&gt; tool. &amp;nbsp;During our session, Ivar gave an overview of MVC 1.0, Gaurav highlighted the JPA Modeler utility, and I demonstrated how the JPA Modeler could be utilized with JSF applications, as well as MVC 1.0. &amp;nbsp;I want to thank Geertjan again for getting the three of us together for this excellent talk.&lt;br /&gt;
&lt;br /&gt;
The opening keynote was amazing. &amp;nbsp;A large portion was devoted to showing how the world is using Java, including the outstanding Mars rover presentation by Dr. Anita Sengupta (@Doctor_Astro). &amp;nbsp;It was amazing to see the complexity and detail that went into ensuring the Curiosity rover landed without issues. &amp;nbsp;Of course, Java 9 was mentioned, along with a demo of modularity and the jshell by Mark Reinhold...very informative, as always. &lt;br /&gt;
&lt;br /&gt;
During the opening keynote, I anxiously awaited word on the status of Java EE, and after quite a long wait, the announcement was made. &amp;nbsp;I am very excited that Java EE 8 efforts are moving forward, albeit a bit differently than previously planned. &amp;nbsp;Essentially most of the specifications for Java EE 8 is moving forward, and it is proposed that the following be removed so that resources can spend time in other areas:&amp;nbsp;&lt;a href=&quot;https://java.net/projects/mvc-spec/pages/Home&quot; target=&quot;_blank&quot;&gt;JSR 371 (MVC 1.0)&lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;https://jcp.org/en/jsr/detail?id=368&quot; target=&quot;_blank&quot;&gt;JSR 368 (JMS 2.1)&lt;/a&gt;, &lt;a href=&quot;https://www.jcp.org/en/jsr/detail?id=373&quot; target=&quot;_blank&quot;&gt;JSR 373 (Management 2.0).&lt;/a&gt;&amp;nbsp; &lt;i&gt;I will cover my thoughts on these proposed dropped specifications in a follow-up post. &amp;nbsp;&lt;/i&gt;The main focus for Java EE 8 will be to start paving the path for a more micoservices focused platform, whereby Java EE 9 will be released a year later and it will include the full microservices implementation. &amp;nbsp;The addition of Health Checking and Configuration specifications would be beneficial for providing a standard means by which to monitor services and dynamically configure our applications. &amp;nbsp;Overall, it is great to see things moving forward for Java EE, although I do have some reservations on the overall approach. &amp;nbsp;I do not believe that every industry will adopt the microservices architecture, so there needs to be a path for those who will be continuing with the standard Java EE application architecture.&lt;br /&gt;
&lt;br /&gt;
Rather than going through detail on each of the sessions that I had attended, I will provide a summary of my thoughts on the conference overall. &amp;nbsp;As I have said many times before, time is not our friend...and this certainly was the case this year at JavaOne, as there were too many great tutorials, sessions, and networking events that it was difficult to see everything. &amp;nbsp;Hats off to&amp;nbsp;&lt;a href=&quot;https://twitter.com/sharat_chander&quot; target=&quot;_blank&quot;&gt;Sharat Chander&lt;/a&gt;&amp;nbsp;and others at Oracle for organizing such a great conference. &amp;nbsp;I also want to thank the content review committees for reviewing and choosing such great conference tutorials and sessions...the content was excellent!&lt;br /&gt;
&lt;br /&gt;
The tutorials and hands-on labs dealing with Microservices were hot this year. &amp;nbsp;I attended two of them myself. &amp;nbsp;One of them was a hands on lab that enabled us to develop Microservices using JBoss Forge and WildFly Swarm. &amp;nbsp;It was a fast pace tutorial covering everything from setting up Eclipse (unfortunately not my favorite IDE), through utilizing Forge, constructing services, and deployment. &amp;nbsp;I am glad I attended, as it gave me a different perspective on development from what I am used to. &amp;nbsp;The second was a tutorial on utilizing Payara Micro and the Payara MicroProfile. &amp;nbsp;I found this tutorial very in-depth, covering these technologies from the ground-up, with lots of detailed explanation. &amp;nbsp;I learned it is quite easy to add the Payara Microprofile to a project, simply by including the dependency in the POM:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; box-sizing: border-box; color: #0a303d; font-size: 22px; line-height: 27.5px; overflow-x: auto;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt;dependency&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt;groupId&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;fish&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #0000cc;&quot;&gt;payara&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #0000cc;&quot;&gt;extras&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;lt;/&lt;/span&gt;groupId&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt;artifactId&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;payara&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;-&lt;/span&gt;microprofile&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;lt;/&lt;/span&gt;artifactId&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt;version&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #6600ee; font-weight: bold;&quot;&gt;1.0&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;lt;/&lt;/span&gt;version&lt;span style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;&amp;gt;
   &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; box-sizing: border-box; color: #0a303d; font-size: 22px; line-height: 27.5px; overflow-x: auto;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 16px;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 16px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
Deploying is as simple as: &lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; box-sizing: border-box; color: #0a303d; font-size: 22px; overflow-x: auto;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 16px;&quot;&gt;java -jar payara-microprofile-1.0.jar --deploy test-app.war &lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
I attended many key Java EE sessions, including those given by Linda DeMichiel and others leading the specifications. &amp;nbsp;All of these were informative, covering content from previous Java EE incarnations through what to expect in Java EE 8. &amp;nbsp;Linda&#39;s presentation on Monday went into a bit more detail on the plans for Java EE 8, and it is clear to see that Oracle is &quot;all in&quot; on moving forward with the newly proposed plan for Java EE 8...which is great! &amp;nbsp;Each of the specification-specific talks that I attended were excellent, including CDI 2.0, &amp;nbsp;JAX-RS 2.1, and JSF 2.3. &amp;nbsp;Great to hear from the experts for these areas. &amp;nbsp;I also took in a couple of other key talks: &amp;nbsp;Java EE Extendable to Functional by David Blevins, and 50 Java EE Best Practices by Ryan Cuprak and Michael Remijan...both great!&lt;br /&gt;
&lt;br /&gt;
There were a lot of sessions on Java 9 and modularity this year. &amp;nbsp;I attended a session on modularity, which was a great introduction for those hadn&#39;t yet had a chance to experiment with it. &amp;nbsp;Docker was another hot topic at the conference, and I had the opportunity to attend a couple of sessions covering this great tech. &lt;br /&gt;
&lt;br /&gt;
I had the privilege to attend the JCP Party on Monday evening. &amp;nbsp;Always an excellent opportunity to network with others in the JCP, and this year&#39;s event did not let us down. &amp;nbsp;The Chicago Java Users Group (CJUG), Bob Paulin, and myself won an award at the JCP Party on Monday evening for Adopt-a-JSR participants of the year. &amp;nbsp;This was a very nice surprise! &amp;nbsp;I also attended PartyOne, hosted by Tomitribe, ZeroTurnaround, BainCapital, and Hazelcast. &amp;nbsp;This was a great opportunity to network with so many experts...and there was also a great view of the Bay Bridge off the balcony. &amp;nbsp;I want to thank &lt;a href=&quot;http://www.tomitribe.com/&quot; target=&quot;_blank&quot;&gt;Tomitribe&lt;/a&gt; for the invitation! &amp;nbsp;Lastly, I attended the Oracle Appreciation Event, which was very nice. &amp;nbsp;The Oracle OpenWorld and JavaOne attendees had AT&amp;amp;T Park to themselves, and we got to see Sting and Gwen Stefani. &amp;nbsp;Great networking opportunity with many great friends.&lt;br /&gt;
&lt;br /&gt;
Overall, JavaOne 2016 was another great conference...very glad to have been a part of it. &amp;nbsp;If you have not done so already, please take the Java EE Survey and provide your thoughts on the upcoming Java EE 8 proposal:&lt;br /&gt;
&lt;a href=&quot;https://www.blogger.com/goog_357195127&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;a href=&quot;http://glassfish.org/survey&quot;&gt;http://glassfish.org/survey&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</description><link>https://jj-blogger.blogspot.com/2016/09/javaone-2016-follow-up.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-3698141603374383186</guid><pubDate>Thu, 15 Sep 2016 17:24:00 +0000</pubDate><atom:updated>2020-11-14T08:37:53.769-08:00</atom:updated><title>NetBeans Java EE 8 MVC Plugin Enhancements</title><description>A while back, &lt;a href=&quot;https://blogs.oracle.com/geertjan/entry/tools_for_mvc_in_java2&quot; target=&quot;_blank&quot;&gt;Geertjan Wielenga had posted&lt;/a&gt; about a NetBeans plugin that had been developed for the upcoming Java EE 8 MVC framework. &amp;nbsp;The plugin was originally developed by Manfred Riem, co-spec lead for &lt;a href=&quot;https://java.net/projects/mvc-spec/pages/Home&quot; target=&quot;_blank&quot;&gt;JSR 371&lt;/a&gt;, and Geertjan had extended it to add functionality for viewing all of the MVC controllers within an application. &amp;nbsp;This plugin is a great start to a useful MVC plugin for NetBeans.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve since taken the plugin and extended it further, adding the following enhancements:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;NetBeans workspace now scanned to apply plugin only to those projects that contain MVC controller classes.&lt;/li&gt;
&lt;li&gt;Ability to create a new MVC application which includes a basic controller class and corresponding view.&lt;/li&gt;
&lt;li&gt;Ability to add new MVC controller class to a project.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Come and check out the new plugin functionality at JavaOne. &amp;nbsp;I have the honor of presenting along with Ivar Grimstad (JSR 371 Expert Group) and Gaurav Gupta (JPA Modeler) in the presentation&amp;nbsp;&lt;span style=&quot;color: #222222;&quot;&gt;UGF6435 -- Enterprise Modeling of MVC and Java EE Artifacts for &lt;a href=&quot;https://netbeans.org/community/articles/javaone/2016/netbeans-day-2016.html&quot; target=&quot;_blank&quot;&gt;NetBeans Day 2016&lt;/a&gt;. &amp;nbsp;I&#39;ll demo the plugin during the session, alongside the powerful &lt;a href=&quot;http://jpamodeler.github.io/&quot; target=&quot;_blank&quot;&gt;JPA Modeler&lt;/a&gt; utility. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times&amp;quot; , &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Hope to see you there!&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;color: #222222; font-family: times, times new roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #222222; font-family: times, times new roman, serif;&quot;&gt;For more information on NetBeans IDE, please check out the &lt;a href=&quot;https://examples.javacodegeeks.com/java-netbeans-ide-tutorial/&quot;&gt;Java NetBeans IDE Tutorial&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;&lt;/div&gt;</description><link>https://jj-blogger.blogspot.com/2016/09/netbeans-java-ee-8-mvc-plugin.html</link><author>noreply@blogger.com (Josh Juneau)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-25636372.post-198902477706863370</guid><pubDate>Fri, 15 Jul 2016 15:28:00 +0000</pubDate><atom:updated>2016-07-15T08:28:49.324-07:00</atom:updated><title>NetBeans 8.2 Profiler:  Colored Results</title><description>One of the new features in NetBeans 8.2 is the ability to color profiler results differently based upon filters. &amp;nbsp;This can make things visually stand out, and easier to follow in the profiler output. &lt;br /&gt;
&lt;br /&gt;
To enable colored profiler results, go into the NetBeans &quot;Preferences&quot;-&amp;gt;&quot;Java&quot;-&amp;gt;&quot;Profiler&quot; menu, as seen in Figure 1. &amp;nbsp;Check the box to &quot;Use defined filters for coloring results&quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3naWYPCsSPcwEKB2ZDXf-kv3FI64K-uSBZRM_brsv2TTv7mfxQjE_lgWh2qCqVAGvf1tCEAdvWblRmXt2KRlTbAwEw3Dao8mUFoa4SEGUMsnK4T03W05DefzzbT9SOkrDK5IYyg/s1600/nb-colorprofiler4.tiff&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;288&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3naWYPCsSPcwEKB2ZDXf-kv3FI64K-uSBZRM_brsv2TTv7mfxQjE_lgWh2qCqVAGvf1tCEAdvWblRmXt2KRlTbAwEw3Dao8mUFoa4SEGUMsnK4T03W05DefzzbT9SOkrDK5IYyg/s400/nb-colorprofiler4.tiff&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;Figure 1: &amp;nbsp;NetBeans Profiler Colored Filter Results&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Add any filter(s) you wish, and assign a color to the results of those filters (Figure 2). &amp;nbsp;If you wish to display the output from one of the existing filters in a different color, click the tool icon and change the colors. &amp;nbsp;As you can see in the previous figure, I updated the Java EE Frameworks filter to be a green color.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggs3RuYHIl6PtSwZv3tutBFvoc8RCLfEWHQaYT3kJJuzSm8oUz7y65bUZZpTZfCu7rUcrIDcszf1uprsTTV4AS5rQoMJnpJQeyN2ldm-WFFI0B60LWMHfTi8XhNZskSH7krjFsSg/s1600/nb-colorprofiler1.tiff&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggs3RuYHIl6PtSwZv3tutBFvoc8RCLfEWHQaYT3kJJuzSm8oUz7y65bUZZpTZfCu7rUcrIDcszf1uprsTTV4AS5rQoMJnpJQeyN2ldm-WFFI0B60LWMHfTi8XhNZskSH7krjFsSg/s400/nb-colorprofiler1.tiff&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;Figure 2: &amp;nbsp;Assign Colors to Filters&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
After applying the colors to the filters, run the profiler and see the results!&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9POvZHVAzjDpRzHlhdCAK1w_kstzo1pku9IBU0uRCloZcQwIQgdArRALbGZTWeEAGoyFpz2OMoWeZNVObKMSXZlz0yXcHYT-xl4BltVn_muCkoPD6NoduipoaJXg3KrGcg7J3Nw/s1600/nb-colorprofiler3.tiff&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9POvZHVAzjDpRzHlhdCAK1w_kstzo1pku9IBU0uRCloZcQwIQgdArRALbGZTWeEAGoyFpz2OMoWeZNVObKMSXZlz0yXcHYT-xl4BltVn_muCkoPD6NoduipoaJXg3KrGcg7J3Nw/s320/nb-colorprofiler3.tiff&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;Figure 3: &amp;nbsp;Colored Results!&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
More Info: &amp;nbsp;&lt;a href=&quot;http://wiki.netbeans.org/NewAndNoteworthyNB82#Colored_Profiling_Results&quot;&gt;http://wiki.netbeans.org/NewAndNoteworthyNB82#Colored_Profiling_Results&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>https://jj-blogger.blogspot.com/2016/07/netbeans-82-profiler-colored-results.html</link><author>noreply@blogger.com (Josh Juneau)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3naWYPCsSPcwEKB2ZDXf-kv3FI64K-uSBZRM_brsv2TTv7mfxQjE_lgWh2qCqVAGvf1tCEAdvWblRmXt2KRlTbAwEw3Dao8mUFoa4SEGUMsnK4T03W05DefzzbT9SOkrDK5IYyg/s72-c/nb-colorprofiler4.tiff" height="72" width="72"/><thr:total>1</thr:total></item></channel></rss>