anchor.diff:  
   Clone the Git repository: `git clone https://github.com/protean-project/quickstarts.git`, or download an https://github.com/protean-project/quickstarts/archive/master.zip[archive].
   
  -The solution is located in the `application-configuration` directory.
  +The solution is located in the `application-lifecycle-events` directory.
   
   == Creating the Maven project
   
  
positive.code: ```
  mvn org.jboss.shamrock:shamrock-maven-plugin:1.0.0.Alpha1-SNAPSHOT:create \
      -DprojectGroupId=org.acme \
      -DprojectArtifactId=application-configuration \
      -DclassName="org.acme.config.GreetingResource" \
      -Dpath="/greeting"
  ```
  
  It generates:
  
negative.code: * an `org.acme.scheduling.GreetingResource` resource
  * an associated test
  
  == Listening for startup and shutdown events
  
  Create a new class named `AppLifecycleBean` (or pick another name) in the `org.acme.events` package, and copy the
  following content:
  
  [source,java]
  ----
  package org.acme.events;
  
  import javax.enterprise.context.ApplicationScoped;
  import javax.enterprise.event.Observes;
  
  import org.jboss.shamrock.runtime.ShutdownEvent;
  import org.jboss.shamrock.runtime.StartupEvent;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
  @ApplicationScoped
  public class AppLifecycleBean {
  
      private static final Logger LOGGER = LoggerFactory.getLogger("ListenerBean");
  
      void onStart(@Observes StartupEvent ev) {               // <1>
          LOGGER.info("The application is starting...");
      }
  
      void onStop(@Observes ShutdownEvent ev) {               // <2>
          LOGGER.info("The application is stopping...");
      }
  
  }
  ----
  1. Method called when the application is starting
  2. Method called when the application is terminating
  
  [INFO]
  ====
  The events are also called in _dev mode_ between each redeployment.
  ====
  
  [INFO]
  ====
  The methods can access injected beans. Check the https://github.com/protean-project/quickstarts/blob/master/application-lifecycle-events/src/main/java/org/acme/events/AppLifecycleBean.java[AppLifecycleBean.java] class for details.
  ====
  
  == Package and run the application
  
  