Java Magazine, Mar/Apr 2018
Creating Microservices with Payara Micro How to build small lightweight services with Java EE ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 15 microservices and containers Microservices have become a very trendy architecture over the past few years Because the HTML5 JSON and RESTful web service technologies have matured theyve made it easier to construct applications as small simple services that communicate with one another to perform a specific task When orchestrated with other services they come together to create powerful decoupled applications A design that uses these services together can work well in a single application server environment However to truly separate each service from the others the services need to stand alone within separate application server containers Payara Micro provides a fully functional Java application server container at a fraction of the size of a standard application server container a mere 70 MB In addition Payara Micro provides several different ways to deploy applications and services from standard WAR file deployment to executable JAR packaging This article covers deployment of microservices from the ground up using Payara Micro In it I demonstrate how to get started with Payara Micro by deploying a simple service I then explain how to create an Uber JAR a JAR file with the JAR youve created plus all its dependencies and how to deploy to Docker containers Lastly Ill cover some custom configuration options for Payara Micro The Payara Micro server is compatible with the Java EE MicroProfile which was described in detail in the November December 2017 issue of this magazine Payara Micro provides a more optimized set of APIs for targeting enterprise Java microservices and it ofers portability across multiple MicroProfile runtimes The following APIs are currently supported in Payara Micro Bean Validation Contexts and Dependency Injection CDI Concurrency EJB Lite JAX RS JBatch JOSH JUNEAU
You must have JavaScript enabled to view digital editions.