Java Magazine, Mar/Apr 2018
ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 24 microservices and containers repository contained within double quotes If there is more than one repository separate them with commas java jar payara micro 412174 jar deployFromGAV my repository EmployeeService 10 By default when more than one instance is started on the same machine the instances are clustered via Hazelcast Clustering means that the session data will be replicated between the two instances Hazelcast is an in memory data grid which Payara uses to implement caching The output will display a list of the members that have been clustered together Members 2 Member 192168132 5900 9f8c400c 9af203bbeec9 Member 192168132 5901 32b2bb1f 88eb47273d5b this The output was truncated to fit Ed To see a full list of Payara Micro options specify the help option when executing the Payara Micro JAR file Java EE Application as an Executable JAR A true microservice should be self contained meaning the application server container is packaged with the service in a portable manner One such way to package a microservice is to create an executable JAR file that can be ported across environments as needed Payara Micro enables you to create such an Uber JAR by simply specifying the option outputUberJar when executing the Payara Micro JAR as follows java jar payara micro 412174 jar deploy EmployeeService 10 war outputUberJar EmployeeService jar
You must have JavaScript enabled to view digital editions.