title: CDI extension, how to know the Application name that a bean belongs to
body: <p>I am new to CDI and I am writing a new CDI portable extension. My CDI extension will listen to events that are fired by the CDI container. I was wondering if there is a way to tell the name of the application that a class belongs to and what are the events that would provide that information.</p>
  
  <p>by application I mean a ear application archive that is deployed on an application server. My goal is to create an extension that looks into applications deployed and for  each add an annotation on some of it's classes. Each application classes would have a unique annotation. Example if we have app1 and app2 deployed on an app server. I want to create an extension that would annotate all/some classes contained in app1 with with @x1   and all classes of app2 with @x2 and so on.</p>