Java Magazine, Mar/Apr 2018
ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 54 microservices and containers The Wookiee Service The Service is the root of your application it is your access point to add your key functions and it lets you branch out into using Wookiees features class MyMicroService extends Service As you can see implementing the Service interface is the only required code integration Now you point to a configuration file that lets you tweak your Service or Wookiee itself by specifying the VM option Dconfig file wookiee system services internal MyMicroService In this configuration I tell Wookiee that there is one Service to initialize The Java main method is actually wrapped by another internal class HarnessService and on initialization it will instantiate MyMicroService along with any Components which I will cover later Upon running the new Service youll see the following on your console INFO MyMicroService The service MyMicroService started INFO ServiceManager Service Manager started INFO ServiceManager Wookiee Started Lets Go You are now set up and ready to start coding You now have logging access everywhere HTTPaccessible health checks and pings configuration loading watching local Akka messaging and helpful utility functions You can even connect a companion test library that will let you spin up a mock Wookiee Service for build time integration testing Next I will examine the extra functionality you can add with Components
You must have JavaScript enabled to view digital editions.